Email::register_option()

Description #

Register options

Source #

File: addons/email/email.php

	public function register_option() {
		$opt = ap_opt();

		$form = array(
			'fields' => array(
				'sep1'                       => array(
					'html' => '<h3>' . __( 'Admin Notifications', 'anspress-question-answer' ) . '<p>' . __( 'Select types of notification which will be sent to admin.', 'anspress-question-answer' ) . '</p></h3>',
				),
				'email_admin_emails'         => array(
					'label' => __( 'Admin email(s)', 'anspress-question-answer' ),
					'desc'  => __( 'Email where all admin notification will be sent. It can have multiple emails separated by comma.', 'anspress-question-answer' ),
					'value' => $opt['email_admin_emails'],
				),
				'email_admin_new_question'   => array(
					'label' => __( 'New question', 'anspress-question-answer' ),
					'desc'  => __( 'Send new question notification to admin.', 'anspress-question-answer' ),
					'type'  => 'checkbox',
					'value' => $opt['email_admin_new_question'],
				),
				'email_admin_new_answer'     => array(
					'label' => __( 'New answer', 'anspress-question-answer' ),
					'desc'  => __( 'Send new answer notification to admin.', 'anspress-question-answer' ),
					'type'  => 'checkbox',
					'value' => $opt['email_admin_new_answer'],
				),
				'email_admin_new_comment'    => array(
					'label' => __( 'New comment', 'anspress-question-answer' ),
					'desc'  => __( 'Send new comment notification to admin.', 'anspress-question-answer' ),
					'type'  => 'checkbox',
					'value' => $opt['email_admin_new_comment'],
				),
				'email_admin_edit_question'  => array(
					'label' => __( 'Edit question', 'anspress-question-answer' ),
					'desc'  => __( 'Send notification to admin when question is edited.', 'anspress-question-answer' ),
					'type'  => 'checkbox',
					'value' => $opt['email_admin_edit_question'],
				),
				'email_admin_edit_answer'    => array(
					'label' => __( 'Edit answer', 'anspress-question-answer' ),
					'desc'  => __( 'Send email to admin when answer is edited.', 'anspress-question-answer' ),
					'type'  => 'checkbox',
					'value' => $opt['email_admin_edit_answer'],
				),
				'email_admin_trash_question' => array(
					'label' => __( 'Delete question', 'anspress-question-answer' ),
					'desc'  => __( 'Send email to admin when question is trashed.', 'anspress-question-answer' ),
					'type'  => 'checkbox',
					'value' => $opt['email_admin_trash_question'],
				),
				'email_admin_trash_answer'   => array(
					'label' => __( 'Delete answer', 'anspress-question-answer' ),
					'desc'  => __( 'Send email to admin when answer is trashed.', 'anspress-question-answer' ),
					'type'  => 'checkbox',
					'value' => $opt['email_admin_trash_answer'],
				),
				'sep2'                       => array(
					'html' => '<h3>' . __( 'User Notifications', 'anspress-question-answer' ) . '<p>' . __( 'Select the types of notification which will be sent to user.', 'anspress-question-answer' ) . '</p></h3>',
				),
				'email_user_new_question'    => array(
					'label' => __( 'New question', 'anspress-question-answer' ),
					'desc'  => __( 'Send new question notification to user?', 'anspress-question-answer' ),
					'type'  => 'checkbox',
					'value' => $opt['email_user_new_question'],
				),
				'email_user_new_answer'      => array(
					'label' => __( 'New answer', 'anspress-question-answer' ),
					'desc'  => __( 'Send new answer notification to user?', 'anspress-question-answer' ),
					'type'  => 'checkbox',
					'value' => $opt['email_user_new_answer'],
				),
				'email_user_new_comment'     => array(
					'label' => __( 'New comment', 'anspress-question-answer' ),
					'desc'  => __( 'Send new comment notification to user?', 'anspress-question-answer' ),
					'type'  => 'checkbox',
					'value' => $opt['email_user_new_comment'],
				),
				'email_user_edit_question'   => array(
					'label' => __( 'Edit question', 'anspress-question-answer' ),
					'desc'  => __( 'Send edit question notification to user?', 'anspress-question-answer' ),
					'type'  => 'checkbox',
					'value' => $opt['email_user_edit_question'],
				),
				'email_user_edit_answer'     => array(
					'label' => __( 'Edit answer', 'anspress-question-answer' ),
					'desc'  => __( 'Send edit answer notification to user?', 'anspress-question-answer' ),
					'type'  => 'checkbox',
					'value' => $opt['email_user_edit_answer'],
				),
				'email_user_select_answer'   => array(
					'label' => __( 'Answer selected', 'anspress-question-answer' ),
					'desc'  => __( 'Send notification to user when their answer get selected?', 'anspress-question-answer' ),
					'type'  => 'checkbox',
					'value' => $opt['email_user_select_answer'],
				),
			),
		);

		return $form;
	}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment