Plugin Directory

Changeset 3351997


Ignore:
Timestamp:
08/28/2025 12:30:32 PM (7 months ago)
Author:
ollybach
Message:

3.19.8.2

  • Fix: Nonce may have been missing on some admin pages - depending on setup

28th Aug 2025

Location:
wppizza/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • wppizza/trunk/classes/admin/class.wppizza.wp_admin.php

    r3346577 r3351997  
    1616
    1717    function __construct() {
    18         /*register settings*/
     18        /**
     19            register settings
     20        **/
    1921        add_action('admin_init', array( $this, 'admin_register_settings' ) );
    2022
    21         /***enqueue backend scripts and styles***/
     23        /**
     24            enqueue backend scripts and styles
     25        **/
    2226        add_action('admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts_and_styles'));
    2327
    24         /**admin ajax**/
     28        /**
     29            admin ajax
     30        **/
    2531        add_action('wp_ajax_wppizza_admin_ajax', array($this, 'set_admin_ajax') );
    2632
    27         /** admin ajax **/
     33        /**
     34            admin ajax
     35        **/
    2836        add_action('wppizza_ajax_admin', array( $this, 'admin_ajax'));
     37
     38        /******************
     39            ajax nonce in footer for all admin pages
     40           
     41            Note: also needed for non-wppizza admin pages for:
     42            -   dashboard widgets,
     43            -   order notifications on non-wppizza pages,
     44            -   dismissal of install notices
     45            etc
     46        ******************/
     47        add_action('admin_footer', array($this, 'wppizza_ajax_nonce'));
    2948
    3049    }
     
    148167        wp_register_script(WPPIZZA_SLUG.'-global', plugins_url( 'js/scripts.admin.global.js', WPPIZZA_PLUGIN_PATH ), array('jquery'), WPPIZZA_VERSION ,true);
    149168        wp_enqueue_script(WPPIZZA_SLUG.'-global');
    150 
    151 
    152         /******************
    153             ajax nonce in footer for all wppizza admin pages
    154             Note: dashboard and nag notices have their own nonce added
    155             to not fall foul of ajax nonce checks
    156         ******************/
    157         if($current_screen->post_type == WPPIZZA_POST_TYPE || $current_screen->id == WPPIZZA_POST_TYPE ){
    158             /*** add wppizza_ajax_nonce to footer ***/
    159             add_action('admin_footer', array($this, 'wppizza_ajax_nonce'));
    160         }
    161169
    162170
  • wppizza/trunk/classes/modules/mod.settings.new_orders_notify.php

    r2953519 r3351997  
    127127                    var poll_and_notify = function(){                       
    128128                        /* ajax get new orders */
    129                         jQuery.post(ajaxurl , {action :'wppizza_admin_orderhistory_ajax',vars:{'field':'new_orders'}}, function(orders) {
     129                        var nonce  = $('#wppizza_ajax_nonce').val();
     130                        jQuery.post(ajaxurl , {action :'wppizza_admin_orderhistory_ajax',vars:{'field':'new_orders', 'nonce':nonce}}, function(orders) {
    130131                            /* we have orders ! */
    131132                            if(typeof orders.new_orders !=='undefined' && orders.new_orders > 0 ){
  • wppizza/trunk/readme.txt

    r3347049 r3351997  
    88Requires at least: 3.3
    99Tested up to: 6.8
    10 Version: 3.19.8.1
    11 Stable tag: 3.19.8.1
     10Version: 3.19.8.2
     11Stable tag: 3.19.8.2
    1212License: GPLv2 or later
    1313License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    164164== Changelog ==
    165165
     1663.19.8.2 
     167* Fix: Nonce may have been missing on some admin pages - depending on setup 
     16828th Aug 2025 
     169
    1661703.19.8.1 
    167171* Fix: Not able to save post meta values (in 3.19.8). 
  • wppizza/trunk/wppizza.php

    r3347049 r3351997  
    44#* Plugin URI: https://wordpress.org/extend/plugins/wppizza/
    55#* Description: A Restaurant Plugin (not only for Pizza)
    6 #* Version: 3.19.8.1
     6#* Version: 3.19.8.2
    77#* Requires PHP: 5.3
    88#* Author: ollybach
     
    5858***************************************************************/
    5959if(!defined('WPPIZZA_VERSION')){
    60     define('WPPIZZA_VERSION', '3.19.8.1');
     60    define('WPPIZZA_VERSION', '3.19.8.2');
    6161}
    6262if(!defined('WPPIZZA_VERSION_MAJOR')){
Note: See TracChangeset for help on using the changeset viewer.