Fix fatal error: Address naming inconsistencies from WP Allstars to SEO Pro Stack refactoring
- Resolved class naming conflicts in auto-upload functionality - Fixed menu slug from 'wp-allstars' to 'seoprostack' - Corrected AJAX nonce references for consistency - Updated JavaScript variable name to 'wpSeoProStack' - Added deprecation notice to legacy auto-upload class
This commit is contained in:
@ -9,7 +9,7 @@ function wp_seoprostack_admin_menu() {
|
|||||||
'SEO Pro Stack Settings',
|
'SEO Pro Stack Settings',
|
||||||
'SEO Pro Stack',
|
'SEO Pro Stack',
|
||||||
'manage_options',
|
'manage_options',
|
||||||
'wp-allstars',
|
'seoprostack',
|
||||||
'wp_seoprostack_settings_page'
|
'wp_seoprostack_settings_page'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -31,7 +31,7 @@ add_action('admin_init', 'wp_seoprostack_register_settings');
|
|||||||
|
|
||||||
// AJAX handler for settings
|
// AJAX handler for settings
|
||||||
function wp_seoprostack_update_option() {
|
function wp_seoprostack_update_option() {
|
||||||
check_ajax_referer('wp-seoprostack-nonce', 'nonce');
|
check_ajax_referer('seoprostack-nonce', 'nonce');
|
||||||
$option = sanitize_text_field($_POST['option']);
|
$option = sanitize_text_field($_POST['option']);
|
||||||
$value = intval($_POST['value']);
|
$value = intval($_POST['value']);
|
||||||
update_option($option, $value);
|
update_option($option, $value);
|
||||||
|
@ -2,10 +2,19 @@
|
|||||||
/**
|
/**
|
||||||
* Auto Upload Images functionality
|
* Auto Upload Images functionality
|
||||||
*
|
*
|
||||||
* @package WP_Allstars
|
* @package SEO_Pro_Stack
|
||||||
|
* @deprecated 1.0.0 Use the class in includes/features/auto-upload/class-seoprostack-auto-upload.php instead
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class WP_Allstars_Auto_Upload {
|
// If this file is called directly, abort.
|
||||||
|
if (!defined('ABSPATH')) {
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated 1.0.0 Use SEOProStack_Auto_Upload instead
|
||||||
|
*/
|
||||||
|
class SEOProStack_Auto_Upload_Legacy {
|
||||||
/**
|
/**
|
||||||
* Initialize the class
|
* Initialize the class
|
||||||
*/
|
*/
|
||||||
|
@ -91,6 +91,6 @@ function seoprostack_admin_assets() {
|
|||||||
'nonce' => wp_create_nonce('seoprostack-nonce'),
|
'nonce' => wp_create_nonce('seoprostack-nonce'),
|
||||||
'updateNonce' => wp_create_nonce('updates')
|
'updateNonce' => wp_create_nonce('updates')
|
||||||
);
|
);
|
||||||
wp_localize_script('seoprostack-admin', 'seoProStack', $ajax_data);
|
wp_localize_script('seoprostack-admin', 'wpSeoProStack', $ajax_data);
|
||||||
}
|
}
|
||||||
add_action('admin_enqueue_scripts', 'seoprostack_admin_assets');
|
add_action('admin_enqueue_scripts', 'seoprostack_admin_assets');
|
Reference in New Issue
Block a user