AnsPress_Admin::options_general_layout()
Description #
Register AnsPress general layout options.
Source #
File: admin/anspress-admin.php
public static function options_general_layout() { $opt = ap_opt(); $form = array( 'fields' => array( 'load_assets_in_anspress_only' => array( 'name' => '', 'label' => __( 'Load assets in AnsPress page only?', 'anspress-question-answer' ), 'desc' => __( 'Check this to load AnsPress JS and CSS on the AnsPress page only. Be careful, this might break layout.', 'anspress-question-answer' ), 'type' => 'checkbox', 'value' => $opt['load_assets_in_anspress_only'], ), 'avatar_size_list' => array( 'label' => __( 'List avatar size', 'anspress-question-answer' ), 'desc' => __( 'User avatar size for questions list.', 'anspress-question-answer' ), 'subtype' => 'number', 'value' => $opt['avatar_size_list'], ), 'avatar_size_qquestion' => array( 'label' => __( 'Question avatar size', 'anspress-question-answer' ), 'desc' => __( 'User avatar size for question.', 'anspress-question-answer' ), 'subtype' => 'number', 'value' => $opt['avatar_size_qquestion'], ), 'avatar_size_qanswer' => array( 'label' => __( 'Answer avatar size', 'anspress-question-answer' ), 'desc' => __( 'User avatar size for answer.', 'anspress-question-answer' ), 'subtype' => 'number', 'value' => $opt['avatar_size_qanswer'], ), 'avatar_size_qcomment' => array( 'label' => __( 'Comment avatar size', 'anspress-question-answer' ), 'desc' => __( 'User avatar size for comments.', 'anspress-question-answer' ), 'subtype' => 'number', 'value' => $opt['avatar_size_qcomment'], ), 'question_per_page' => array( 'label' => __( 'Questions per page', 'anspress-question-answer' ), 'desc' => __( 'Questions to show per page.', 'anspress-question-answer' ), 'subtype' => 'number', 'value' => $opt['question_per_page'], ), 'answers_per_page' => array( 'label' => __( 'Answers per page', 'anspress-question-answer' ), 'desc' => __( 'Answers to show per page.', 'anspress-question-answer' ), 'subtype' => 'number', 'value' => $opt['answers_per_page'], ), ), ); /** * Filter to override layout options form. * * @param array $form Form arguments. * @since 4.1.0 */ return apply_filters( 'ap_options_form_layout', $form ); }
Expand full source code Collapse full source code View on GitHub: admin/anspress-admin.php:937
Add your comment