move schedule to scheduler-class

This commit is contained in:
Matthias Pfefferle 2023-05-31 10:48:06 +02:00
parent ab0f48389c
commit c04cf3fc7e

View file

@ -15,7 +15,6 @@ class Admin {
public static function init() { public static function init() {
\add_action( 'admin_menu', array( self::class, 'admin_menu' ) ); \add_action( 'admin_menu', array( self::class, 'admin_menu' ) );
\add_action( 'admin_init', array( self::class, 'register_settings' ) ); \add_action( 'admin_init', array( self::class, 'register_settings' ) );
\add_action( 'admin_init', array( self::class, 'schedule_migration' ) );
\add_action( 'show_user_profile', array( self::class, 'add_profile' ) ); \add_action( 'show_user_profile', array( self::class, 'add_profile' ) );
\add_action( 'personal_options_update', array( self::class, 'save_user_description' ) ); \add_action( 'personal_options_update', array( self::class, 'save_user_description' ) );
\add_action( 'admin_enqueue_scripts', array( self::class, 'enqueue_scripts' ) ); \add_action( 'admin_enqueue_scripts', array( self::class, 'enqueue_scripts' ) );
@ -146,12 +145,6 @@ class Admin {
); );
} }
public static function schedule_migration() {
if ( ! \wp_next_scheduled( 'activitypub_schedule_migration' ) ) {
\wp_schedule_single_event( \time(), 'activitypub_schedule_migration' );
}
}
public static function add_settings_help_tab() { public static function add_settings_help_tab() {
require_once ACTIVITYPUB_PLUGIN_DIR . 'includes/help.php'; require_once ACTIVITYPUB_PLUGIN_DIR . 'includes/help.php';
} }