Changeset 1526443
- Timestamp:
- 11/02/2016 04:11:51 AM (9 years ago)
- Location:
- dojo/trunk
- Files:
-
- 2 edited
-
class-dojo.php (modified) (1 diff)
-
extensions/views/manage-extensions.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dojo/trunk/class-dojo.php
r1526323 r1526443 256 256 if ( isset( $_GET['_dojononce'] ) ) { 257 257 if ( ! wp_verify_nonce( $_GET['_dojononce'], $_GET['method'] ) ) { 258 wp_die( );258 wp_die( 'Invalid request' ); 259 259 } 260 260 $prefix = 'ajax_'; -
dojo/trunk/extensions/views/manage-extensions.php
r1526323 r1526443 145 145 jQuery(function($) { 146 146 147 var ajax_urls = { 148 install_extension : '<?php echo $this->ajax( 'install_extension' ) ?>', 149 update_extension : '<?php echo $this->ajax( 'update_extension' ) ?>', 150 activate_extension : '<?php echo $this->ajax( 'activate_extension' ) ?>', 151 remove_extension : '<?php echo $this->ajax( 'remove_extension' ) ?>' 152 }; 153 147 154 function doAction(action, context) { 148 155 var btn = context; … … 151 158 $('.dojo-error-container').hide(); 152 159 var extension = btn.closest('.dojo-extension-block').attr('data-extension'); 153 var url = '<?php echo $this->ajax( '__ACTION__' ) ?>'.replace('__ACTION__', action);160 var url = ajax_urls[action]; 154 161 $.post(url, { extension: extension }, function(response) { 155 162 if (response.indexOf('process_success') != -1) {
Note: See TracChangeset
for help on using the changeset viewer.