Changeset 3267053
- Timestamp:
- 04/04/2025 07:00:28 PM (12 months ago)
- Location:
- showcase-creator
- Files:
-
- 6 edited
-
tags/1.0.9/src/class.php (modified) (1 diff)
-
tags/1.0.9/src/ordered-lists.js (modified) (3 diffs)
-
tags/1.0.9/src/ordered-lists.php (modified) (1 diff)
-
trunk/src/class.php (modified) (1 diff)
-
trunk/src/ordered-lists.js (modified) (3 diffs)
-
trunk/src/ordered-lists.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
showcase-creator/tags/1.0.9/src/class.php
r3239647 r3267053 193 193 array( 'taxs' => array( 'label', 'name', 'object_type', 'labels' ) ) 194 194 ); 195 $admin_vars['nonces'] = $admin_vars['nonces'] ?? array(); 196 $admin_vars['nonces']['ordered_list'] = wp_create_nonce( 'sc_ordered_list_update' ); 195 197 return $admin_vars; 196 198 } ); -
showcase-creator/tags/1.0.9/src/ordered-lists.js
r3239647 r3267053 767 767 function sendRequest( key, act, req ) { 768 768 loading.open(); 769 const nonce = document.getElementById( 'save-order' ).getAttribute( 'nonce' );769 const nonce = window.showcaseCreator.nonces.ordered_list; 770 770 showcaseCreator 771 771 .ajax( { … … 1517 1517 return; 1518 1518 } 1519 const nonce = document.getElementById( 'save-order' ).getAttribute( 'nonce' );1519 const nonce = window.showcaseCreator.nonces.ordered_list; 1520 1520 loading.open(); 1521 1521 if ( mode === 0 || mode === 1 ) { … … 1635 1635 .map( i => i.valueAttr ) 1636 1636 .join( ',' ); 1637 const nonce = document.getElementById( 'save-order' ).getAttribute( 'nonce' );1637 const nonce = window.showcaseCreator.nonces.ordered_list; 1638 1638 loading.open(); 1639 1639 showcaseCreator -
showcase-creator/tags/1.0.9/src/ordered-lists.php
r3239647 r3267053 145 145 <?php esc_html_e( 'Export', 'showcase-creator' ); ?> 146 146 </button> 147 <button id="save-order" class="button-primary" nonce="<?php148 echo esc_attr( wp_create_nonce( 'sc_ordered_list_update' ) );149 ?>"><?php esc_html_e( 'Save order', 'showcase-creator' ); ?></button>147 <button id="save-order" class="button-primary"> 148 <?php esc_html_e( 'Save order', 'showcase-creator' ); ?> 149 </button> 150 150 </div> 151 151 </div> -
showcase-creator/trunk/src/class.php
r3239647 r3267053 193 193 array( 'taxs' => array( 'label', 'name', 'object_type', 'labels' ) ) 194 194 ); 195 $admin_vars['nonces'] = $admin_vars['nonces'] ?? array(); 196 $admin_vars['nonces']['ordered_list'] = wp_create_nonce( 'sc_ordered_list_update' ); 195 197 return $admin_vars; 196 198 } ); -
showcase-creator/trunk/src/ordered-lists.js
r3190704 r3267053 767 767 function sendRequest( key, act, req ) { 768 768 loading.open(); 769 const nonce = document.getElementById( 'save-order' ).getAttribute( 'nonce' );769 const nonce = window.showcaseCreator.nonces.ordered_list; 770 770 showcaseCreator 771 771 .ajax( { … … 1517 1517 return; 1518 1518 } 1519 const nonce = document.getElementById( 'save-order' ).getAttribute( 'nonce' );1519 const nonce = window.showcaseCreator.nonces.ordered_list; 1520 1520 loading.open(); 1521 1521 if ( mode === 0 || mode === 1 ) { … … 1635 1635 .map( i => i.valueAttr ) 1636 1636 .join( ',' ); 1637 const nonce = document.getElementById( 'save-order' ).getAttribute( 'nonce' );1637 const nonce = window.showcaseCreator.nonces.ordered_list; 1638 1638 loading.open(); 1639 1639 showcaseCreator -
showcase-creator/trunk/src/ordered-lists.php
r3190704 r3267053 145 145 <?php esc_html_e( 'Export', 'showcase-creator' ); ?> 146 146 </button> 147 <button id="save-order" class="button-primary" nonce="<?php148 echo esc_attr( wp_create_nonce( 'sc_ordered_list_update' ) );149 ?>"><?php esc_html_e( 'Save order', 'showcase-creator' ); ?></button>147 <button id="save-order" class="button-primary"> 148 <?php esc_html_e( 'Save order', 'showcase-creator' ); ?> 149 </button> 150 150 </div> 151 151 </div>
Note: See TracChangeset
for help on using the changeset viewer.