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:
@ -48,12 +48,12 @@
|
|||||||
|
|
||||||
// Load plugins
|
// Load plugins
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: seoProStack.ajaxurl,
|
url: wpSeoProStack.ajaxurl,
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
data: {
|
data: {
|
||||||
action: 'seoprostack_get_pro_plugins',
|
action: 'seoprostack_get_pro_plugins',
|
||||||
category: category,
|
category: category,
|
||||||
nonce: seoProStack.nonce
|
nonce: wpSeoProStack.nonce
|
||||||
},
|
},
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
$('#seoprostack-plugins-grid').removeClass('loading');
|
$('#seoprostack-plugins-grid').removeClass('loading');
|
||||||
@ -84,12 +84,12 @@
|
|||||||
|
|
||||||
// Send activation request
|
// Send activation request
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: seoProStack.ajaxurl,
|
url: wpSeoProStack.ajaxurl,
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
data: {
|
data: {
|
||||||
action: 'seoprostack_activate_plugin',
|
action: 'seoprostack_activate_plugin',
|
||||||
plugin: plugin,
|
plugin: plugin,
|
||||||
nonce: seoProStack.nonce
|
nonce: wpSeoProStack.nonce
|
||||||
},
|
},
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
@ -168,7 +168,7 @@
|
|||||||
var formData = $form.serializeArray();
|
var formData = $form.serializeArray();
|
||||||
var data = {
|
var data = {
|
||||||
action: 'seoprostack_save_advanced_settings',
|
action: 'seoprostack_save_advanced_settings',
|
||||||
nonce: seoProStack.nonce
|
nonce: wpSeoProStack.nonce
|
||||||
};
|
};
|
||||||
|
|
||||||
// Convert form data to proper format
|
// Convert form data to proper format
|
||||||
@ -230,11 +230,11 @@
|
|||||||
|
|
||||||
// Send AJAX request
|
// Send AJAX request
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: seoProStack.ajaxurl,
|
url: wpSeoProStack.ajaxurl,
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
data: {
|
data: {
|
||||||
action: 'seoprostack_optimize_database',
|
action: 'seoprostack_optimize_database',
|
||||||
nonce: seoProStack.nonce
|
nonce: wpSeoProStack.nonce
|
||||||
},
|
},
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
// Hide loading
|
// Hide loading
|
||||||
@ -302,11 +302,11 @@
|
|||||||
|
|
||||||
// Send AJAX request
|
// Send AJAX request
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: seoProStack.ajaxurl,
|
url: wpSeoProStack.ajaxurl,
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
data: {
|
data: {
|
||||||
action: 'seoprostack_generate_robots',
|
action: 'seoprostack_generate_robots',
|
||||||
nonce: seoProStack.nonce
|
nonce: wpSeoProStack.nonce
|
||||||
},
|
},
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
// Hide loading
|
// Hide loading
|
||||||
|
@ -28,11 +28,11 @@ define('SEOPROSTACK_PLUGIN_BASENAME', plugin_basename(__FILE__));
|
|||||||
// Load autoloader
|
// Load autoloader
|
||||||
require_once SEOPROSTACK_PLUGIN_DIR . 'includes/core/class-seoprostack-autoloader.php';
|
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
|
// This will be removed in future iterations
|
||||||
if (is_admin()) {
|
if (is_admin()) {
|
||||||
require_once SEOPROSTACK_PLUGIN_DIR . 'admin/pro-plugins-config.php';
|
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
|
// Activation hook
|
||||||
|
Reference in New Issue
Block a user