Fix plugin activation and critical errors

- Fixed class naming inconsistency in auto-upload functionality
- Resolved duplicate menu items by removing direct inclusion of settings.php
- Fixed JavaScript variable naming from seoProStack to wpSeoProStack
- Added deprecation notice to legacy auto-upload class
- Updated AJAX nonce references for consistency
This commit is contained in:
Marcus Quinn
2025-03-24 03:11:03 +00:00
parent 7f4ea3ec0c
commit 6fc054f2bf
2 changed files with 11 additions and 11 deletions

View File

@ -48,12 +48,12 @@
// Load plugins
$.ajax({
url: seoProStack.ajaxurl,
url: wpSeoProStack.ajaxurl,
type: 'POST',
data: {
action: 'seoprostack_get_pro_plugins',
category: category,
nonce: seoProStack.nonce
nonce: wpSeoProStack.nonce
},
success: function(response) {
$('#seoprostack-plugins-grid').removeClass('loading');
@ -84,12 +84,12 @@
// Send activation request
$.ajax({
url: seoProStack.ajaxurl,
url: wpSeoProStack.ajaxurl,
type: 'POST',
data: {
action: 'seoprostack_activate_plugin',
plugin: plugin,
nonce: seoProStack.nonce
nonce: wpSeoProStack.nonce
},
success: function(response) {
if (response.success) {
@ -168,7 +168,7 @@
var formData = $form.serializeArray();
var data = {
action: 'seoprostack_save_advanced_settings',
nonce: seoProStack.nonce
nonce: wpSeoProStack.nonce
};
// Convert form data to proper format
@ -230,11 +230,11 @@
// Send AJAX request
$.ajax({
url: seoProStack.ajaxurl,
url: wpSeoProStack.ajaxurl,
type: 'POST',
data: {
action: 'seoprostack_optimize_database',
nonce: seoProStack.nonce
nonce: wpSeoProStack.nonce
},
success: function(response) {
// Hide loading
@ -302,11 +302,11 @@
// Send AJAX request
$.ajax({
url: seoProStack.ajaxurl,
url: wpSeoProStack.ajaxurl,
type: 'POST',
data: {
action: 'seoprostack_generate_robots',
nonce: seoProStack.nonce
nonce: wpSeoProStack.nonce
},
success: function(response) {
// Hide loading

View File

@ -28,11 +28,11 @@ define('SEOPROSTACK_PLUGIN_BASENAME', plugin_basename(__FILE__));
// Load autoloader
require_once SEOPROSTACK_PLUGIN_DIR . 'includes/core/class-seoprostack-autoloader.php';
// Backward compatibility - load the existing functionality
// Backward compatibility - load only necessary legacy files
// This will be removed in future iterations
if (is_admin()) {
require_once SEOPROSTACK_PLUGIN_DIR . 'admin/pro-plugins-config.php';
require_once SEOPROSTACK_PLUGIN_DIR . 'admin/settings.php';
// Legacy settings.php is now handled through the OOP structure
}
// Activation hook