Fix notification positioning, clickable areas, and AJAX nonce issues
This commit is contained in:
@ -199,6 +199,8 @@ input:checked + .wp-toggle-slider:before {
|
||||
/* Expandable Panel Component */
|
||||
.wp-allstars-toggle-header {
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.wp-allstars-toggle-header::after {
|
||||
@ -634,14 +636,15 @@ input:checked + .wp-toggle-slider:before {
|
||||
.wp-allstars-toggle-left label,
|
||||
.wp-allstars-setting-row label {
|
||||
position: relative;
|
||||
padding-right: 80px;
|
||||
padding-right: 40px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.wp-setting-left label .wp-setting-notification,
|
||||
.wp-allstars-toggle-left label .wp-setting-notification,
|
||||
.wp-allstars-setting-row label .wp-setting-notification {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
right: -5px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
@ -662,4 +665,10 @@ input:checked + .wp-toggle-slider:before {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.wp-allstars-toggle-main {
|
||||
padding-right: 40px; /* Space for chevron */
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
@ -106,10 +106,7 @@ jQuery(document).ready(function($) {
|
||||
var $input = $(this);
|
||||
var option = $input.attr('name');
|
||||
var value = $input.val();
|
||||
var $label = $input.prev('label');
|
||||
if (!$label.length) {
|
||||
$label = $input.closest('.wp-allstars-setting-row').find('label');
|
||||
}
|
||||
var $label = $input.closest('.wp-allstars-setting-row').find('label').first();
|
||||
|
||||
updateOption(option, value)
|
||||
.then(function() {
|
||||
@ -159,13 +156,16 @@ jQuery(document).ready(function($) {
|
||||
// Show loading overlay
|
||||
$('.wpa-loading-overlay').fadeIn();
|
||||
|
||||
// Log the nonce for debugging
|
||||
console.log('Using nonce:', wpAllstars.nonce);
|
||||
|
||||
$.ajax({
|
||||
url: ajaxurl,
|
||||
type: 'POST',
|
||||
data: {
|
||||
action: 'wp_allstars_get_plugins',
|
||||
category: category || 'minimal',
|
||||
_ajax_nonce: wpAllstars.nonce
|
||||
nonce: wpAllstars.nonce
|
||||
},
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
@ -199,7 +199,7 @@ jQuery(document).ready(function($) {
|
||||
type: 'POST',
|
||||
data: {
|
||||
action: 'wp_allstars_get_theme',
|
||||
_ajax_nonce: wpAllstars.nonce
|
||||
nonce: wpAllstars.nonce
|
||||
},
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
@ -264,7 +264,7 @@ jQuery(document).ready(function($) {
|
||||
data: {
|
||||
action: 'wp_allstars_activate_theme',
|
||||
theme: slug,
|
||||
_ajax_nonce: wpAllstars.nonce
|
||||
nonce: wpAllstars.nonce
|
||||
},
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
|
Reference in New Issue
Block a user