diff --git a/includes/Data/Options.php b/includes/Data/Options.php index df9826886..d8ccdb2ee 100644 --- a/includes/Data/Options.php +++ b/includes/Data/Options.php @@ -5,19 +5,19 @@ * Stores all the WordPress Options used in the module. */ final class Options { - /** - * Prefix for options in the module. - * - * @var string - */ + /** + * Prefix for options in the module. + * + * @var string + */ protected static $prefix = 'nfd_module_onboarding_'; - /** - * List of all the options. - * - * @var array - */ + /** + * List of all the options. + * + * @var array + */ protected static $options = array( 'redirect' => 'redirect', @@ -28,6 +28,7 @@ final class Options { 'close_comments_days_old' => 'close_comments_days_old', 'comments_per_page' => 'comments_per_page', 'install_date' => 'mm_install_date', + 'start_date' => 'start_date', 'allow_major_auto_core_updates' => 'allow_major_auto_core_updates', 'allow_minor_auto_core_updates' => 'allow_minor_auto_core_updates', 'auto_update_plugin' => 'auto_update_plugin', @@ -76,21 +77,21 @@ final class Options { * @return string|boolean */ public static function get_option_name( $option_key, $attach_prefix = true ) { - return isset( self::$options[ $option_key ] ) - ? ( $attach_prefix - ? self::$prefix . self::$options[ $option_key ] - : self::$options[ $option_key ] - ) - : false; + return isset( self::$options[ $option_key ] ) + ? ( $attach_prefix + ? self::$prefix . self::$options[ $option_key ] + : self::$options[ $option_key ] + ) + : false; } - /** - * Get the list of all options. - * - * @return array - */ + /** + * Get the list of all options. + * + * @return array + */ public static function get_all_options() { - return self::$options; + return self::$options; } /** @@ -99,6 +100,6 @@ public static function get_all_options() { * @return array */ public static function get_initialization_options() { - return self::$initialization_options; + return self::$initialization_options; } } diff --git a/includes/RestApi/SettingsController.php b/includes/RestApi/SettingsController.php index 6280bd095..a59456c11 100644 --- a/includes/RestApi/SettingsController.php +++ b/includes/RestApi/SettingsController.php @@ -255,7 +255,7 @@ public function initialize() { \update_option( Options::get_option_name( $option_key, false ), $option_value ); } // Can't be part of initialization constants as they are static. - \update_option( Options::get_option_name( 'install_date', false ), gmdate( 'M d, Y' ) ); + \update_option( Options::get_option_name( 'start_date' ), gmdate( 'U' ) ); // Flush permalinks flush_rewrite_rules();