admin_url('admin-ajax.php') ) ); } } public function theme_switch( $new_name, $new_theme ) { update_option('admintosh_last_theme_change', [ 'name' => $new_name, // Theme display name 'slug' => $new_theme->get_stylesheet(), 'time' => current_time('mysql') ]); } public function plugin_activated( $plugin ) { if ( ! function_exists( 'get_plugin_data' ) ) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } $plugin_data = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin ); update_option('admintosh_last_activated_plugin', [ 'plugin' => $plugin_data['Name'] ?? '', 'time' => current_time('mysql') ]); } public function register_user( $user_id ) { $user = get_userdata($user_id); update_option('admintosh_last_registered_user', [ 'name' => $user->display_name, 'time' => current_time('mysql') ]); } }