Fix notification position, set default values, and fix AJAX nonce issues

This commit is contained in:
Marcus Quinn
2025-03-16 04:08:10 +00:00
parent 330cacb0be
commit 2773c49bb0
3 changed files with 23 additions and 26 deletions

View File

@ -655,7 +655,7 @@ input:checked + .wp-toggle-slider:before {
.wp-allstars-setting-row label .wp-setting-notification {
position: absolute;
right: -60px;
top: 0;
top: -2px;
transform: translateY(0);
line-height: 1.4;
}

View File

@ -161,11 +161,11 @@ jQuery(document).ready(function($) {
$.ajax({
url: ajaxurl,
type: 'POST',
type: 'GET',
data: {
action: 'wp_allstars_get_plugins',
category: category || 'minimal',
security: wpAllstars.nonce
_ajax_nonce: wpAllstars.nonce
},
success: function(response) {
if (response.success) {
@ -196,10 +196,10 @@ jQuery(document).ready(function($) {
$.ajax({
url: ajaxurl,
type: 'POST',
type: 'GET',
data: {
action: 'wp_allstars_get_theme',
security: wpAllstars.nonce
_ajax_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,
security: wpAllstars.nonce
_ajax_nonce: wpAllstars.nonce
},
success: function(response) {
if (response.success) {

View File

@ -681,25 +681,22 @@ function wp_allstars_settings_page() {
</div>
<div class="wp-allstars-toggle-settings">
<div class="wp-allstars-setting-row">
<label for="wp_max_width"><?php esc_html_e('Max Width', 'wp-allstars'); ?></label>
<label for="wp_allstars_max_width"><?php esc_html_e('Max Width', 'wp-allstars'); ?></label>
<input type="number"
id="wp_max_width"
name="wp_max_width"
value="<?php echo esc_attr(get_option('wp_allstars_max_width', 1920)); ?>"
min="0"
id="wp_allstars_max_width"
name="wp_allstars_max_width"
value="<?php echo esc_attr(get_option('wp_allstars_max_width', 2560)); ?>"
/>
<p class="description"><?php esc_html_e('Maximum width of uploaded images (px). Leave empty for no limit.', 'wp-allstars'); ?></p>
<p class="description"><?php esc_html_e('Maximum width for uploaded images in pixels.', 'wp-allstars'); ?></p>
</div>
<div class="wp-allstars-setting-row">
<label for="wp_max_height"><?php esc_html_e('Max Height', 'wp-allstars'); ?></label>
<label for="wp_allstars_max_height"><?php esc_html_e('Max Height', 'wp-allstars'); ?></label>
<input type="number"
id="wp_max_height"
name="wp_max_height"
value="<?php echo esc_attr(get_option('wp_allstars_max_height', 1080)); ?>"
min="0"
id="wp_allstars_max_height"
name="wp_allstars_max_height"
value="<?php echo esc_attr(get_option('wp_allstars_max_height', 2560)); ?>"
/>
<p class="description"><?php esc_html_e('Maximum height of uploaded images (px). Leave empty for no limit.', 'wp-allstars'); ?></p>
<p class="description"><?php esc_html_e('Maximum height for uploaded images in pixels.', 'wp-allstars'); ?></p>
</div>
<div class="wp-allstars-setting-row">