wp_create_nonce('wp-allstars-nonce'), 'ajaxurl' => admin_url('admin-ajax.php') )); } /** * Register plugin settings */ public static function register_settings() { // Removed minification settings // This is a placeholder for future settings registration } /** * AJAX handler for updating options */ public static function update_option() { check_ajax_referer('wp-allstars-nonce', 'nonce'); $option = sanitize_text_field($_POST['option']); $value = intval($_POST['value']); update_option($option, $value); wp_send_json_success('Option updated'); } /** * Register the admin menu item */ public static function register_admin_menu() { add_options_page( 'WP ALLSTARS Settings', 'WP ALLSTARS', 'manage_options', 'wp-allstars', 'wp_allstars_settings_page' ); } }