AnsPress_Admin::options_uac_other()
Description #
Register other UAC options.
Source #
File: admin/anspress-admin.php
public static function options_uac_other() {
$opt = ap_opt();
$form = array(
'fields' => array(
'allow_upload' => array(
'label' => __( 'Allow image upload', 'anspress-question-answer' ),
'desc' => __( 'Allow logged-in users to upload image.', 'anspress-question-answer' ),
'type' => 'checkbox',
'value' => $opt['allow_upload'],
),
'uploads_per_post' => array(
'label' => __( 'Max uploads per post', 'anspress-question-answer' ),
'desc' => __( 'Set numbers of media user can upload for each post.', 'anspress-question-answer' ),
'value' => $opt['uploads_per_post'],
),
'max_upload_size' => array(
'label' => __( 'Max upload size', 'anspress-question-answer' ),
'desc' => __( 'Set maximum upload size in bytes.', 'anspress-question-answer' ),
'value' => $opt['max_upload_size'],
),
'allowed_file_mime' => array(
'label' => __( 'Allowed file mime types', 'anspress-question-answer' ),
'desc' => __( "Enter comma separated file mime. Format: extension(s) => MIME type.\nUse | for multiple file types and ensure each entry is on a new line.\nExample: jpeg|jpg=>image/jpeg", 'anspress-question-answer' ),
'value' => $opt['allowed_file_mime'],
'type' => 'textarea',
'validate' => 'required,valid_mimes',
),
'allow_private_posts' => array(
'label' => __( 'Allow private posts', 'anspress-question-answer' ),
'desc' => __( 'Allows users to create private question and answer. Private Q&A are only visible to admin and moderators.', 'anspress-question-answer' ),
'type' => 'checkbox',
'value' => $opt['allow_private_posts'],
),
'trashing_question_with_answer' => array(
'label' => __( 'Trashing Question', 'anspress-question-answer' ),
'desc' => __( 'Disable trashing the question if there are answers already available to the question.', 'anspress-question-answer' ),
'type' => 'checkbox',
'value' => $opt['trashing_question_with_answer'],
),
'deleting_question_with_answer' => array(
'label' => __( 'Deleting Question', 'anspress-question-answer' ),
'desc' => __( 'Disable deleting the question permanently if there are answers already available to the question.', 'anspress-question-answer' ),
'type' => 'checkbox',
'value' => $opt['deleting_question_with_answer'],
),
),
);
return $form;
}
Expand full source code Collapse full source code View on GitHub: admin/anspress-admin.php:1177
Add your comment