From 330cacb0be58a5c6cda5ba7fec005a3c4a121f9c Mon Sep 17 00:00:00 2001 From: Marcus Quinn Date: Sun, 16 Mar 2025 04:00:48 +0000 Subject: [PATCH] Fix expandable panel clickability, notification alignment, and AJAX nonce issues --- admin/css/wp-allstars-admin.css | 12 ++++++++++-- admin/js/wp-allstars-admin.js | 12 ++++++------ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/admin/css/wp-allstars-admin.css b/admin/css/wp-allstars-admin.css index 9c0a1be..e1064ec 100644 --- a/admin/css/wp-allstars-admin.css +++ b/admin/css/wp-allstars-admin.css @@ -91,6 +91,8 @@ height: 20px; flex-shrink: 0; cursor: pointer; + pointer-events: all; + z-index: 2; } .wp-toggle-switch input { @@ -220,6 +222,11 @@ input:checked + .wp-toggle-slider:before { transform: translateY(-50%) rotate(180deg); } +/* Make sure the label doesn't interfere with clickability */ +.wp-allstars-toggle-left label { + pointer-events: none; +} + .wp-allstars-expand-settings { display: none; } @@ -648,8 +655,9 @@ input:checked + .wp-toggle-slider:before { .wp-allstars-setting-row label .wp-setting-notification { position: absolute; right: -60px; - top: 50%; - transform: translateY(-50%); + top: 0; + transform: translateY(0); + line-height: 1.4; } @keyframes fadeIn { diff --git a/admin/js/wp-allstars-admin.js b/admin/js/wp-allstars-admin.js index 1795bb9..8150596 100644 --- a/admin/js/wp-allstars-admin.js +++ b/admin/js/wp-allstars-admin.js @@ -29,9 +29,9 @@ jQuery(document).ready(function($) { url: ajaxurl, type: 'POST', data: { - action: 'wp_allstars_update_option', - option: option, - value: value, + action: 'wp_allstars_update_option', + option: option, + value: value, _wpnonce: wpAllstars.nonce } }).then(function(response) { @@ -165,7 +165,7 @@ jQuery(document).ready(function($) { data: { action: 'wp_allstars_get_plugins', category: category || 'minimal', - nonce: wpAllstars.nonce + security: wpAllstars.nonce }, success: function(response) { if (response.success) { @@ -199,7 +199,7 @@ jQuery(document).ready(function($) { type: 'POST', data: { action: 'wp_allstars_get_theme', - nonce: wpAllstars.nonce + security: wpAllstars.nonce }, success: function(response) { if (response.success) { @@ -264,7 +264,7 @@ jQuery(document).ready(function($) { data: { action: 'wp_allstars_activate_theme', theme: slug, - nonce: wpAllstars.nonce + security: wpAllstars.nonce }, success: function(response) { if (response.success) {