id = 'notification-center'; $this->title = __( 'Notification Center', 'better-wp-security' ); $this->description = __( 'Manage and configure email notifications sent by iThemes Security related to various settings modules.', 'better-wp-security' ); $this->type = 'recommended'; $this->can_save = true; $this->validator = ITSEC_Modules::get_validator( 'notification-center' ); if ( ITSEC_Modules::get_setting( 'notification-center', 'last_mail_error' ) ) { $this->status = 'warning'; } parent::__construct(); } public function enqueue_scripts_and_styles() { wp_enqueue_style( 'itsec-notification-center-admin', plugins_url( 'css/settings-page.css', __FILE__ ), array(), $this->version ); wp_enqueue_script( 'itsec-notification-center-admin', plugins_url( 'js/settings-page.js', __FILE__ ), array( 'jquery', 'itsec-settings-page-script' ), $this->version ); } public function handle_ajax_request( $data ) { if ( empty( $data['method'] ) ) { return; } switch ( $data['method'] ) { case 'dismiss-mail-error': ITSEC_Modules::set_setting( 'notification-center', 'last_mail_error', '' ); ITSEC_Response::set_success( true ); break; } } protected function render_description( $form ) { ?>
last_sent = ITSEC_Modules::get_setting( 'notification-center', 'last_sent' ); $this->render_mail_errors(); ?>
add_text( 'from_email' ); ?>
|
|
add_input_group( 'default_recipients' );
$this->render_user_list_fieldset( $form, ITSEC_Notification_Center::R_USER_LIST );
$form->remove_input_group();
?>
|
", '' ); ?>
add_checkbox( 'enabled', array( 'data-slug' => $slug ) ); ?> | |
add_text( 'subject' ); ?> | |
add_textarea( 'message' ); ?>
validator->get_allowed_html() ) ); ?> {{ $tag_name }}' ); ?> |
|
add_select( 'schedule', $this->validator->get_schedule_options( $config['schedule'] ) ); ?>
last_sent[ $slug ] ) ): ?> last_sent[ $slug ] ) ); ?> |
|
add_textarea( 'email_list', array( 'class' => 'textarea-small' ) ); ?> |