'yes', 'core' => 'minor', 'plugin' => false, 'theme' => false, 'translation' => true, 'toggleadvanced' => 'hide', 'vcscheck' => true, 'emailactive' => 'yes', 'successemail' => true, 'failureemail' => true, 'criticalemail' => true, 'debugemail' => false, ); $args = get_option( 'update_control_options', array() ); return wp_parse_args( $args, $defaults ); } public static function get_option( $key ) { $options = self::get_options(); if ( isset( $options[ $key ] ) ) { return $options[ $key ]; } return null; } public static function register_settings() { add_settings_section( 'update-control', esc_html__( 'Automatic Updates', 'update-control' ), array( __CLASS__, 'update_control_settings_section' ), 'general' ); if ( defined( 'AUTOMATIC_UPDATER_DISABLED' ) && AUTOMATIC_UPDATER_DISABLED ) { return; } add_settings_field( 'update_control_active', sprintf( '', __( 'Automatic Updates Enabled?', 'update-control' ) ), array( __CLASS__, 'update_control_active_cb' ), 'general', 'update-control' ); add_settings_field( 'update_control_core', sprintf( '', __( 'Automatic Core Update Level?', 'update-control' ) ), array( __CLASS__, 'update_control_core_cb' ), 'general', 'update-control' ); add_settings_field( 'update_control_plugin', sprintf( '', __( 'Permit Automatic Plugin Updates?', 'update-control' ) ), array( __CLASS__, 'update_control_plugin_cb' ), 'general', 'update-control' ); add_settings_field( 'update_control_theme', sprintf( '', __( 'Permit Automatic Theme Updates?', 'update-control' ) ), array( __CLASS__, 'update_control_theme_cb' ), 'general', 'update-control' ); add_settings_field( 'update_control_translation', sprintf( '', __( 'Permit Automatic Translation Updates?', 'update-control' ) ), array( __CLASS__, 'update_control_translation_cb' ), 'general', 'update-control' ); add_settings_field( 'update_control_toggleadvanced', sprintf( '', __( 'Advanced Settings', 'update-control' ) ), array( __CLASS__, 'update_control_toggleadvanced_cb' ), 'general', 'update-control' ); add_settings_field( 'update_control_vcscheck', sprintf( '', __( 'Disable VCS Check?', 'update-control' ) ), array( __CLASS__, 'update_control_vcscheck_cb' ), 'general', 'update-control' ); add_settings_field( 'update_control_email_active', sprintf( '', __( 'Update Emails Enabled?', 'update-control' ) ), array( __CLASS__, 'update_control_email_active_cb' ), 'general', 'update-control' ); add_settings_field( 'update_control_email_success', sprintf( '', __( 'Send Emails for Successful Updates?', 'update-control' ) ), array( __CLASS__, 'update_control_email_success_cb' ), 'general', 'update-control' ); add_settings_field( 'update_control_email_failure', sprintf( '', __( 'Send Emails for Failed Updates?', 'update-control' ) ), array( __CLASS__, 'update_control_email_failure_cb' ), 'general', 'update-control' ); add_settings_field( 'update_control_email_critical', sprintf( '', __( 'Send Emails for Critically Failed Updates?', 'update-control' ) ), array( __CLASS__, 'update_control_email_critical_cb' ), 'general', 'update-control' ); add_settings_field( 'update_control_email_debug', sprintf( '', __( 'Send Update Debug Emails?', 'update-control' ) ), array( __CLASS__, 'update_control_email_debug_cb' ), 'general', 'update-control' ); register_setting( 'general', 'update_control_options', array( __CLASS__, 'sanitize_options' ) ); } public static function update_control_settings_section() { if ( defined( 'AUTOMATIC_UPDATER_DISABLED' ) && AUTOMATIC_UPDATER_DISABLED ) : ?>
AUTOMATIC_UPDATER_DISABLED constant set. Automatic updates are disabled.', 'update-control' ); ?>
last_checked; ?> /> /> /> /> /> /> /> />