-
diff --git wp-admin/comment.php wp-admin/comment.php
index de5483e..e88c310 100644
|
|
if ( $comment->comment_approved != '0' ) { // if not unapproved |
191 | 191 | </tr> |
192 | 192 | </table> |
193 | 193 | |
194 | | <?php wp_nonce_field( $nonce_action ); ?> |
| 194 | <?php wp_nonce_field( array( 'action' => $nonce_action ) ); ?> |
195 | 195 | <input type='hidden' name='action' value='<?php echo esc_attr($formaction); ?>' /> |
196 | 196 | <input type='hidden' name='c' value='<?php echo esc_attr($comment->comment_ID); ?>' /> |
197 | 197 | <input type='hidden' name='noredir' value='1' /> |
-
diff --git wp-admin/custom-background.php wp-admin/custom-background.php
index a924eca..8d29874 100644
|
|
if ( get_background_image() ) { |
223 | 223 | <th scope="row"><?php _e('Remove Image'); ?></th> |
224 | 224 | <td> |
225 | 225 | <form method="post" action=""> |
226 | | <?php wp_nonce_field('custom-background-remove', '_wpnonce-custom-background-remove'); ?> |
| 226 | <?php wp_nonce_field( array( 'action' => 'custom-background-remove', |
| 227 | 'name' => '_wpnonce-custom-background-remove' ) ); ?> |
227 | 228 | <?php submit_button( __( 'Remove Background Image' ), 'button', 'remove-background', false ); ?><br/> |
228 | 229 | <?php _e('This will remove the background image. You will not be able to restore any customizations.') ?> |
229 | 230 | </form> |
… |
… |
if ( get_background_image() ) { |
237 | 238 | <th scope="row"><?php _e('Restore Original Image'); ?></th> |
238 | 239 | <td> |
239 | 240 | <form method="post" action=""> |
240 | | <?php wp_nonce_field('custom-background-reset', '_wpnonce-custom-background-reset'); ?> |
| 241 | <?php wp_nonce_field( array( 'action' => 'custom-background-reset', |
| 242 | 'name' => '_wpnonce-custom-background-reset' ) ); ?> |
241 | 243 | <?php submit_button( __( 'Restore Original Image' ), 'button', 'reset-background', false ); ?><br/> |
242 | 244 | <?php _e('This will restore the original background image. You will not be able to restore any customizations.') ?> |
243 | 245 | </form> |
… |
… |
if ( get_background_image() ) { |
252 | 254 | <label for="upload"><?php _e( 'Choose an image from your computer:' ); ?></label><br /> |
253 | 255 | <input type="file" id="upload" name="import" /> |
254 | 256 | <input type="hidden" name="action" value="save" /> |
255 | | <?php wp_nonce_field( 'custom-background-upload', '_wpnonce-custom-background-upload' ); ?> |
| 257 | <?php wp_nonce_field( array( 'action' => 'custom-background-upload', |
| 258 | 'name' => '_wpnonce-custom-background-upload' ) ); ?> |
256 | 259 | <?php submit_button( __( 'Upload' ), 'button', 'submit', false ); ?> |
257 | 260 | </p> |
258 | 261 | <p> |
… |
… |
if ( current_theme_supports( 'custom-background', 'default-color' ) ) |
328 | 331 | </tbody> |
329 | 332 | </table> |
330 | 333 | |
331 | | <?php wp_nonce_field('custom-background'); ?> |
| 334 | <?php wp_nonce_field( array( 'action' => 'custom-background' ) ); ?> |
332 | 335 | <?php submit_button( null, 'primary', 'save-background-options' ); ?> |
333 | 336 | </form> |
334 | 337 | |
-
diff --git wp-admin/custom-header.php wp-admin/custom-header.php
index 1228843..f5e6618 100644
|
|
class Custom_Image_Header { |
517 | 517 | <label for="upload"><?php _e( 'Choose an image from your computer:' ); ?></label><br /> |
518 | 518 | <input type="file" id="upload" name="import" /> |
519 | 519 | <input type="hidden" name="action" value="save" /> |
520 | | <?php wp_nonce_field( 'custom-header-upload', '_wpnonce-custom-header-upload' ); ?> |
| 520 | <?php wp_nonce_field( array( 'action' => 'custom-header-upload', |
| 521 | 'name' => '_wpnonce-custom-header-upload' ) ); ?> |
521 | 522 | <?php submit_button( __( 'Upload' ), 'button', 'submit', false ); ?> |
522 | 523 | </p> |
523 | 524 | <?php |
… |
… |
if ( current_theme_supports( 'custom-header', 'default-text-color' ) ) { |
632 | 633 | |
633 | 634 | do_action( 'custom_header_options' ); |
634 | 635 | |
635 | | wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?> |
| 636 | wp_nonce_field( array( 'action' => 'custom-header-options', |
| 637 | 'name' => '_wpnonce-custom-header-options' ) ); ?> |
636 | 638 | |
637 | 639 | <?php submit_button( null, 'primary', 'save-header-options' ); ?> |
638 | 640 | </form> |
… |
… |
wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?> |
726 | 728 | <?php if ( empty( $_POST ) && isset( $_GET['file'] ) ) { ?> |
727 | 729 | <input type="hidden" name="create-new-attachment" value="true" /> |
728 | 730 | <?php } ?> |
729 | | <?php wp_nonce_field( 'custom-header-crop-image' ) ?> |
| 731 | <?php wp_nonce_field( array( 'action' => 'custom-header-crop-image' ) ); ?> |
730 | 732 | |
731 | 733 | <p class="submit"> |
732 | 734 | <?php submit_button( __( 'Crop and Publish' ), 'primary', 'submit', false ); ?> |
-
diff --git wp-admin/edit-form-advanced.php wp-admin/edit-form-advanced.php
index 3e485f2..3e1d40d 100644
|
|
if ( isset( $post_new_file ) && current_user_can( $post_type_object->cap->create |
317 | 317 | </div> |
318 | 318 | |
319 | 319 | <form name="post" action="post.php" method="post" id="post"<?php do_action('post_edit_form_tag'); ?>> |
320 | | <?php wp_nonce_field($nonce_action); ?> |
| 320 | <?php wp_nonce_field( array( 'action' => $nonce_action ) ); ?> |
321 | 321 | <input type="hidden" id="user-id" name="user_ID" value="<?php echo (int) $user_ID ?>" /> |
322 | 322 | <input type="hidden" id="hiddenaction" name="action" value="<?php echo esc_attr( $form_action ) ?>" /> |
323 | 323 | <input type="hidden" id="originalaction" name="originalaction" value="<?php echo esc_attr( $form_action ) ?>" /> |
… |
… |
if ( 'draft' != get_post_status( $post ) ) |
334 | 334 | |
335 | 335 | echo $form_extra; |
336 | 336 | |
337 | | wp_nonce_field( 'autosave', 'autosavenonce', false ); |
338 | | wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); |
339 | | wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); |
| 337 | wp_nonce_field( array( 'action' => 'autosave', |
| 338 | 'name' => 'autosavenonce', |
| 339 | 'id' => 'autosavenonce', |
| 340 | 'referrer' => false ) ); |
| 341 | wp_nonce_field( array( 'action' => 'meta-box-order', |
| 342 | 'name' => 'meta-box-order-nonce', |
| 343 | 'referrer' => false ) ); |
| 344 | wp_nonce_field( array( 'action' => 'closedpostboxes', |
| 345 | 'name' => 'closedpostboxesnonce', |
| 346 | 'id' => 'closedpostboxesnonce', |
| 347 | 'referrer' => false ) ); |
340 | 348 | ?> |
341 | 349 | |
342 | 350 | <div id="poststuff"> |
… |
… |
if ( $post_type_object->public && ! ( 'pending' == get_post_status( $post ) && ! |
370 | 378 | ?> |
371 | 379 | </div> |
372 | 380 | <?php |
373 | | wp_nonce_field( 'samplepermalink', 'samplepermalinknonce', false ); |
| 381 | wp_nonce_field( array( 'action' => 'samplepermalink', |
| 382 | 'name' => 'samplepermalinknonce', |
| 383 | 'id' => 'samplepermalinknonce', |
| 384 | 'referrer' => false ) ); |
374 | 385 | ?> |
375 | 386 | </div><!-- /titlediv --> |
376 | 387 | <?php |
-
diff --git wp-admin/edit-form-comment.php wp-admin/edit-form-comment.php
index d9a0523..17f9642 100644
|
|
if ( !defined('ABSPATH') ) |
11 | 11 | die('-1'); |
12 | 12 | ?> |
13 | 13 | <form name="post" action="comment.php" method="post" id="post"> |
14 | | <?php wp_nonce_field('update-comment_' . $comment->comment_ID) ?> |
| 14 | <?php wp_nonce_field( array( 'action' => 'update-comment_' . $comment->comment_ID, 'id' => '_wpnonce' ) ); ?> |
15 | 15 | <div class="wrap"> |
16 | 16 | <?php screen_icon(); ?> |
17 | 17 | <h2><?php _e('Edit Comment'); ?></h2> |
… |
… |
if ( !defined('ABSPATH') ) |
65 | 65 | <?php |
66 | 66 | $quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close' ); |
67 | 67 | wp_editor( $comment->comment_content, 'content', array( 'media_buttons' => false, 'tinymce' => false, 'quicktags' => $quicktags_settings ) ); |
68 | | wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?> |
| 68 | wp_nonce_field( array( 'action' => 'closedpostboxes', |
| 69 | 'name' => 'closedpostboxesnonce', |
| 70 | 'id' => 'closedpostboxesnonce', |
| 71 | 'referrer' => false ) ); |
| 72 | ?> |
69 | 73 | </div> |
70 | 74 | </div><!-- /post-body-content --> |
71 | 75 | |
-
diff --git wp-admin/edit-link-form.php wp-admin/edit-link-form.php
index 0aca6e7..fde1147 100644
|
|
if ( !empty($form) ) |
71 | 71 | if ( !empty($link_added) ) |
72 | 72 | echo $link_added; |
73 | 73 | |
74 | | wp_nonce_field( $nonce_action ); |
75 | | wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); |
76 | | wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?> |
| 74 | wp_nonce_field( array( 'action' => $nonce_action ) ); |
| 75 | wp_nonce_field( array( 'action' => 'closedpostboxes', |
| 76 | 'name' => 'closedpostboxesnonce', |
| 77 | 'id' => 'closedpostboxesnonce', |
| 78 | 'referrer' => false ) ); |
| 79 | wp_nonce_field( array( 'action' => 'meta-box-order', |
| 80 | 'name' => 'meta-box-order-nonce', |
| 81 | 'referrer' => false ) ); ?> |
77 | 82 | |
78 | 83 | <div id="poststuff"> |
79 | 84 | |
-
diff --git wp-admin/edit-tag-form.php wp-admin/edit-tag-form.php
index 034642a..d25c332 100644
|
|
do_action($taxonomy . '_pre_edit_form', $tag, $taxonomy); ?> |
34 | 34 | <input type="hidden" name="action" value="editedtag" /> |
35 | 35 | <input type="hidden" name="tag_ID" value="<?php echo esc_attr($tag->term_id) ?>" /> |
36 | 36 | <input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy) ?>" /> |
37 | | <?php wp_original_referer_field(true, 'previous'); wp_nonce_field('update-tag_' . $tag_ID); ?> |
| 37 | <?php wp_original_referer_field(true, 'previous'); wp_nonce_field( array( 'action' => 'update-tag_' . $tag_ID ) ); ?> |
38 | 38 | <table class="form-table"> |
39 | 39 | <tr class="form-field form-required"> |
40 | 40 | <th scope="row" valign="top"><label for="name"><?php _ex('Name', 'Taxonomy Name'); ?></label></th> |
-
diff --git wp-admin/edit-tags.php wp-admin/edit-tags.php
index 8375202..8007aa8 100644
|
|
if ( current_user_can($tax->cap->edit_terms) ) { |
354 | 354 | <input type="hidden" name="screen" value="<?php echo esc_attr($current_screen->id); ?>" /> |
355 | 355 | <input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy); ?>" /> |
356 | 356 | <input type="hidden" name="post_type" value="<?php echo esc_attr($post_type); ?>" /> |
357 | | <?php wp_nonce_field('add-tag', '_wpnonce_add-tag'); ?> |
| 357 | <?php wp_nonce_field( array( 'action' => 'add-tag', |
| 358 | 'name' => '_wpnonce_add-tag' ) ); ?> |
358 | 359 | |
359 | 360 | <div class="form-field form-required"> |
360 | 361 | <label for="tag-name"><?php _ex('Name', 'Taxonomy Name'); ?></label> |
-
diff --git wp-admin/includes/class-wp-comments-list-table.php wp-admin/includes/class-wp-comments-list-table.php
index e7ea212..4ca9ab7 100644
|
|
class WP_Comments_List_Table extends WP_List_Table { |
231 | 231 | } |
232 | 232 | |
233 | 233 | if ( ( 'spam' == $comment_status || 'trash' == $comment_status ) && current_user_can( 'moderate_comments' ) ) { |
234 | | wp_nonce_field( 'bulk-destroy', '_destroy_nonce' ); |
235 | 234 | $title = ( 'spam' == $comment_status ) ? esc_attr__( 'Empty Spam' ) : esc_attr__( 'Empty Trash' ); |
236 | 235 | submit_button( $title, 'apply', 'delete_all', false ); |
237 | 236 | } |
… |
… |
class WP_Comments_List_Table extends WP_List_Table { |
273 | 272 | function display() { |
274 | 273 | extract( $this->_args ); |
275 | 274 | |
276 | | wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' ); |
| 275 | wp_nonce_field( array( 'action' => 'fetch-list-' . get_class( $this ), |
| 276 | 'name' => '_ajax_fetch_list_nonce' ) ); |
277 | 277 | |
278 | 278 | $this->display_tablenav( 'top' ); |
279 | 279 | |
… |
… |
class WP_Post_Comments_List_Table extends WP_Comments_List_Table { |
543 | 543 | function display( $output_empty = false ) { |
544 | 544 | extract( $this->_args ); |
545 | 545 | |
546 | | wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' ); |
| 546 | wp_nonce_field( array( 'action' => 'fetch-list-' . get_class( $this ), |
| 547 | 'name' => '_ajax_fetch_list_nonce' ) ); |
547 | 548 | ?> |
548 | 549 | <table class="<?php echo implode( ' ', $this->get_table_classes() ); ?>" cellspacing="0" style="display:none;"> |
549 | 550 | <tbody id="the-comment-list"<?php if ( $singular ) echo " data-wp-lists='list:$singular'"; ?>> |
-
diff --git wp-admin/includes/class-wp-list-table.php wp-admin/includes/class-wp-list-table.php
index 22c35f5..a969b9e 100644
|
|
class WP_List_Table { |
760 | 760 | */ |
761 | 761 | function display_tablenav( $which ) { |
762 | 762 | if ( 'top' == $which ) |
763 | | wp_nonce_field( 'bulk-' . $this->_args['plural'] ); |
| 763 | wp_nonce_field( array( 'action' => 'bulk-' . $this->_args['plural'] ) ); |
764 | 764 | ?> |
765 | 765 | <div class="tablenav <?php echo esc_attr( $which ); ?>"> |
766 | 766 | |
-
diff --git wp-admin/includes/class-wp-posts-list-table.php wp-admin/includes/class-wp-posts-list-table.php
index d14535e..f247c27 100644
|
|
class WP_Posts_List_Table extends WP_List_Table { |
1048 | 1048 | <p class="submit inline-edit-save"> |
1049 | 1049 | <a accesskey="c" href="#inline-edit" class="button-secondary cancel alignleft"><?php _e( 'Cancel' ); ?></a> |
1050 | 1050 | <?php if ( ! $bulk ) { |
1051 | | wp_nonce_field( 'inlineeditnonce', '_inline_edit', false ); |
| 1051 | wp_nonce_field( array( 'action' => 'inlineeditnonce', |
| 1052 | 'name' => '_inline_edit', |
| 1053 | 'referrer' => false ) ); |
1052 | 1054 | ?> |
1053 | 1055 | <a accesskey="s" href="#inline-edit" class="button-primary save alignright"><?php _e( 'Update' ); ?></a> |
1054 | 1056 | <span class="spinner"></span> |
-
diff --git wp-admin/includes/class-wp-terms-list-table.php wp-admin/includes/class-wp-terms-list-table.php
index eef7ccf..e84264e 100644
|
|
class WP_Terms_List_Table extends WP_List_Table { |
365 | 365 | <a accesskey="s" href="#inline-edit" class="save button-primary alignright"><?php echo $tax->labels->update_item; ?></a> |
366 | 366 | <span class="spinner"></span> |
367 | 367 | <span class="error" style="display:none;"></span> |
368 | | <?php wp_nonce_field( 'taxinlineeditnonce', '_inline_edit', false ); ?> |
| 368 | <?php wp_nonce_field( array( 'action' => 'taxinlineeditnonce', |
| 369 | 'name' => '_inline_edit', |
| 370 | 'referrer' => false ) ); ?> |
369 | 371 | <input type="hidden" name="taxonomy" value="<?php echo esc_attr( $this->screen->taxonomy ); ?>" /> |
370 | 372 | <input type="hidden" name="post_type" value="<?php echo esc_attr( $this->screen->post_type ); ?>" /> |
371 | 373 | <br class="clear" /> |
-
diff --git wp-admin/includes/class-wp-theme-install-list-table.php wp-admin/includes/class-wp-theme-install-list-table.php
index 8a46199..45fcaec 100644
|
|
class WP_Theme_Install_List_Table extends WP_Themes_List_Table { |
127 | 127 | } |
128 | 128 | |
129 | 129 | function display() { |
130 | | wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' ); |
| 130 | wp_nonce_field( array( 'action' => 'fetch-list-' . get_class( $this ), |
| 131 | 'name' => '_ajax_fetch_list_nonce' ) ); |
131 | 132 | ?> |
132 | 133 | <div class="tablenav top themes"> |
133 | 134 | <div class="alignleft actions"> |
-
diff --git wp-admin/includes/class-wp-themes-list-table.php wp-admin/includes/class-wp-themes-list-table.php
index 684bd8b..a7e1442 100644
|
|
class WP_Themes_List_Table extends WP_List_Table { |
98 | 98 | } |
99 | 99 | |
100 | 100 | function display() { |
101 | | wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' ); |
| 101 | wp_nonce_field( array( 'action' => 'fetch-list-' . get_class( $this ), |
| 102 | 'name' => '_ajax_fetch_list_nonce' ) ); |
102 | 103 | ?> |
103 | 104 | <?php $this->tablenav( 'top' ); ?> |
104 | 105 | |
-
diff --git wp-admin/includes/dashboard.php wp-admin/includes/dashboard.php
index 657402f..0c9c661 100644
|
|
function wp_add_dashboard_widget( $widget_id, $widget_name, $callback, $control_ |
183 | 183 | function _wp_dashboard_control_callback( $dashboard, $meta_box ) { |
184 | 184 | echo '<form action="" method="post" class="dashboard-widget-control-form">'; |
185 | 185 | wp_dashboard_trigger_widget_control( $meta_box['id'] ); |
186 | | wp_nonce_field( 'edit-dashboard-widget_' . $meta_box['id'], 'dashboard-widget-nonce' ); |
| 186 | wp_nonce_field( array( 'action' => 'edit-dashboard-widget_' . $meta_box['id'], |
| 187 | 'name' => 'dashboard-widget-nonce' ) ); |
187 | 188 | echo '<input type="hidden" name="widget_id" value="' . esc_attr($meta_box['id']) . '" />'; |
188 | 189 | submit_button( __('Submit') ); |
189 | 190 | echo '</form>'; |
… |
… |
function wp_dashboard() { |
215 | 216 | </div> |
216 | 217 | |
217 | 218 | <?php |
218 | | wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); |
219 | | wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); |
| 219 | wp_nonce_field( array( 'action' => 'closedpostboxes', |
| 220 | 'name' => 'closedpostboxesnonce', |
| 221 | 'id' => 'closedpostboxesnonce', |
| 222 | 'referrer' => false ) ); |
| 223 | wp_nonce_field( array( 'action' => 'meta-box-order', |
| 224 | 'name' => 'meta-box-order-nonce', |
| 225 | 'referrer' => false ) ); |
220 | 226 | |
221 | 227 | } |
222 | 228 | |
… |
… |
function wp_dashboard_quick_press() { |
557 | 563 | <input type="hidden" name="action" id="quickpost-action" value="post-quickpress-save" /> |
558 | 564 | <input type="hidden" name="post_ID" value="<?php echo $post_ID; ?>" /> |
559 | 565 | <input type="hidden" name="post_type" value="post" /> |
560 | | <?php wp_nonce_field('add-post'); ?> |
| 566 | <?php wp_nonce_field( array( 'action' => 'add-post' ) ); ?> |
561 | 567 | <?php submit_button( __( 'Save Draft' ), 'button', 'save', false, array( 'id' => 'save-post' ) ); ?> |
562 | 568 | <input type="reset" value="<?php esc_attr_e( 'Reset' ); ?>" class="button" /> |
563 | 569 | <br class="clear" /> |
-
diff --git wp-admin/includes/media.php wp-admin/includes/media.php
index 91937c5..f9cb433 100644
|
|
function media_upload_type_form($type = 'file', $errors = null, $id = null) { |
1656 | 1656 | <form enctype="multipart/form-data" method="post" action="<?php echo esc_url( $form_action_url ); ?>" class="<?php echo $form_class; ?>" id="<?php echo $type; ?>-form"> |
1657 | 1657 | <?php submit_button( '', 'hidden', 'save', false ); ?> |
1658 | 1658 | <input type="hidden" name="post_id" id="post_id" value="<?php echo (int) $post_id; ?>" /> |
1659 | | <?php wp_nonce_field('media-form'); ?> |
| 1659 | <?php wp_nonce_field( array( 'action' => 'media-form' ) ); ?> |
1660 | 1660 | |
1661 | 1661 | <h3 class="media-title"><?php _e('Add media files from your computer'); ?></h3> |
1662 | 1662 | |
… |
… |
function media_upload_type_url_form($type = null, $errors = null, $id = null) { |
1720 | 1720 | |
1721 | 1721 | <form enctype="multipart/form-data" method="post" action="<?php echo esc_url( $form_action_url ); ?>" class="<?php echo $form_class; ?>" id="<?php echo $type; ?>-form"> |
1722 | 1722 | <input type="hidden" name="post_id" id="post_id" value="<?php echo (int) $post_id; ?>" /> |
1723 | | <?php wp_nonce_field('media-form'); ?> |
| 1723 | <?php wp_nonce_field( array( 'action' => 'media-form' ) ); ?> |
1724 | 1724 | |
1725 | 1725 | <h3 class="media-title"><?php _e('Insert media from another website'); ?></h3> |
1726 | 1726 | |
… |
… |
jQuery(function($){ |
1870 | 1870 | <a href="#" id="clear"><?php _ex('Clear', 'verb'); ?></a> |
1871 | 1871 | </div> |
1872 | 1872 | <form enctype="multipart/form-data" method="post" action="<?php echo esc_url( $form_action_url ); ?>" class="<?php echo $form_class; ?>" id="gallery-form"> |
1873 | | <?php wp_nonce_field('media-form'); ?> |
| 1873 | <?php wp_nonce_field( array( 'action' => 'media-form' ) ); ?> |
1874 | 1874 | <?php //media_upload_form( $errors ); ?> |
1875 | 1875 | <table class="widefat" cellspacing="0"> |
1876 | 1876 | <thead><tr> |
… |
… |
foreach ($arc_result as $arc_row) { |
2111 | 2111 | |
2112 | 2112 | <form enctype="multipart/form-data" method="post" action="<?php echo esc_url( $form_action_url ); ?>" class="<?php echo $form_class; ?>" id="library-form"> |
2113 | 2113 | |
2114 | | <?php wp_nonce_field('media-form'); ?> |
| 2114 | <?php wp_nonce_field( array( 'action' => 'media-form' ) ); ?> |
2115 | 2115 | <?php //media_upload_form( $errors ); ?> |
2116 | 2116 | |
2117 | 2117 | <script type="text/javascript"> |
-
diff --git wp-admin/includes/meta-boxes.php wp-admin/includes/meta-boxes.php
index 8fc4214..e19ba70 100644
|
|
function post_categories_meta_box( $post, $box ) { |
421 | 421 | </label> |
422 | 422 | <?php wp_dropdown_categories( array( 'taxonomy' => $taxonomy, 'hide_empty' => 0, 'name' => 'new'.$taxonomy.'_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => '— ' . $tax->labels->parent_item . ' —' ) ); ?> |
423 | 423 | <input type="button" id="<?php echo $taxonomy; ?>-add-submit" data-wp-lists="add:<?php echo $taxonomy ?>checklist:<?php echo $taxonomy ?>-add" class="button category-add-submit" value="<?php echo esc_attr( $tax->labels->add_new_item ); ?>" /> |
424 | | <?php wp_nonce_field( 'add-'.$taxonomy, '_ajax_nonce-add-'.$taxonomy, false ); ?> |
| 424 | <?php wp_nonce_field( array( 'action' => 'add-'.$taxonomy, |
| 425 | 'name' => '_ajax_nonce-add-'.$taxonomy, |
| 426 | 'referrer' => false ) ); ?> |
425 | 427 | <span id="<?php echo $taxonomy; ?>-ajax-response"></span> |
426 | 428 | </p> |
427 | 429 | </div> |
… |
… |
function post_comment_meta_box_thead($result) { |
535 | 537 | function post_comment_meta_box( $post ) { |
536 | 538 | global $wpdb; |
537 | 539 | |
538 | | wp_nonce_field( 'get-comments', 'add_comment_nonce', false ); |
| 540 | wp_nonce_field( array( 'action' => 'get-comments', |
| 541 | 'name' => 'add_comment_nonce', |
| 542 | 'referrer' => false ) ); |
539 | 543 | ?> |
540 | 544 | <p class="hide-if-no-js" id="add-new-comment"><a href="#commentstatusdiv" onclick="commentReply.addcomment(<?php echo $post->ID; ?>);return false;"><?php _e('Add comment'); ?></a></p> |
541 | 545 | <?php |
… |
… |
function link_categories_meta_box($link) { |
753 | 757 | <label class="screen-reader-text" for="newcat"><?php _e( '+ Add New Category' ); ?></label> |
754 | 758 | <input type="text" name="newcat" id="newcat" class="form-required form-input-tip" value="<?php esc_attr_e( 'New category name' ); ?>" aria-required="true" /> |
755 | 759 | <input type="button" id="link-category-add-submit" data-wp-lists="add:categorychecklist:link-category-add" class="button" value="<?php esc_attr_e( 'Add' ); ?>" /> |
756 | | <?php wp_nonce_field( 'add-link-category', '_ajax_nonce', false ); ?> |
| 760 | <?php wp_nonce_field( array( 'action' => 'add-link-category', |
| 761 | 'name' => '_ajax_nonce', |
| 762 | 'referrer' => false ) ); ?> |
757 | 763 | <span id="category-ajax-response"></span> |
758 | 764 | </p> |
759 | 765 | </div> |
-
diff --git wp-admin/includes/plugin-install.php wp-admin/includes/plugin-install.php
index 0c2cd8b..a14d08a 100644
|
|
function install_plugins_upload( $page = 1 ) { |
145 | 145 | <h4><?php _e('Install a plugin in .zip format'); ?></h4> |
146 | 146 | <p class="install-help"><?php _e('If you have a plugin in a .zip format, you may install it by uploading it here.'); ?></p> |
147 | 147 | <form method="post" enctype="multipart/form-data" class="wp-upload-form" action="<?php echo self_admin_url('update.php?action=upload-plugin'); ?>"> |
148 | | <?php wp_nonce_field( 'plugin-upload'); ?> |
| 148 | <?php wp_nonce_field( array( 'action' => 'plugin-upload' ) ); ?> |
149 | 149 | <label class="screen-reader-text" for="pluginzip"><?php _e('Plugin zip file'); ?></label> |
150 | 150 | <input type="file" id="pluginzip" name="pluginzip" /> |
151 | 151 | <?php submit_button( __( 'Install Now' ), 'button', 'install-plugin-submit', false ); ?> |
-
diff --git wp-admin/includes/plugin.php wp-admin/includes/plugin.php
index 1a9a7a6..b6c2feb 100644
|
|
function remove_option_whitelist( $del_options, $options = '' ) { |
1759 | 1759 | function settings_fields($option_group) { |
1760 | 1760 | echo "<input type='hidden' name='option_page' value='" . esc_attr($option_group) . "' />"; |
1761 | 1761 | echo '<input type="hidden" name="action" value="update" />'; |
1762 | | wp_nonce_field("$option_group-options"); |
| 1762 | wp_nonce_field( array( 'action' => "$option_group-options" ) ); |
1763 | 1763 | } |
-
diff --git wp-admin/includes/screen.php wp-admin/includes/screen.php
index 2ab5161..85a5c3f 100644
|
|
final class WP_Screen { |
991 | 991 | echo $this->_screen_settings; |
992 | 992 | |
993 | 993 | ?> |
994 | | <div><?php wp_nonce_field( 'screen-options-nonce', 'screenoptionnonce', false ); ?></div> |
| 994 | <div><?php wp_nonce_field( array( 'action' => 'screen-options-nonce', |
| 995 | 'name' => 'screenoptionnonce', |
| 996 | 'referrer' => false ) ); ?></div> |
995 | 997 | </form> |
996 | 998 | </div> |
997 | 999 | <?php |
-
diff --git wp-admin/includes/template.php wp-admin/includes/template.php
index 9b2128e..28d1920 100644
|
|
function wp_comment_reply($position = '1', $checkbox = false, $mode = 'single', |
370 | 370 | <input type="hidden" name="checkbox" id="checkbox" value="<?php echo $checkbox ? 1 : 0; ?>" /> |
371 | 371 | <input type="hidden" name="mode" id="mode" value="<?php echo esc_attr($mode); ?>" /> |
372 | 372 | <?php |
373 | | wp_nonce_field( 'replyto-comment', '_ajax_nonce-replyto-comment', false ); |
| 373 | wp_nonce_field( array( 'action' => 'replyto-comment', |
| 374 | 'name' => '_ajax_nonce-replyto-comment', |
| 375 | 'referrer' => false ) ); |
374 | 376 | if ( current_user_can( 'unfiltered_html' ) ) |
375 | | wp_nonce_field( 'unfiltered-html-comment', '_wp_unfiltered_html_comment', false ); |
| 377 | wp_nonce_field( array( 'action' => 'unfiltered-html-comment', |
| 378 | 'name' => '_wp_unfiltered_html_comment', |
| 379 | 'referrer' => false ) ); |
376 | 380 | ?> |
377 | 381 | <?php if ( $table_row ) : ?> |
378 | 382 | </td></tr></tbody></table> |
… |
… |
function _list_meta_row( $entry, &$count ) { |
492 | 496 | $r .= "\n\t\t"; |
493 | 497 | $r .= get_submit_button( __( 'Update' ), 'updatemeta small', "meta-{$entry['meta_id']}-submit", false, array( 'data-wp-lists' => "add:the-list:meta-{$entry['meta_id']}::_ajax_nonce-add-meta=$update_nonce" ) ); |
494 | 498 | $r .= "</div>"; |
495 | | $r .= wp_nonce_field( 'change-meta', '_ajax_nonce', false, false ); |
| 499 | $r .= wp_nonce_field( array( 'action' => 'change-meta', // Where is this nonce field actually checked? Doesn't look like it's used anywhere. |
| 500 | 'name' => '_ajax_nonce', 'id' => '_ajax_nonce', |
| 501 | 'referrer' => false, 'echo' => false ) ); |
496 | 502 | $r .= "</td>"; |
497 | 503 | |
498 | 504 | $r .= "\n\t\t<td><label class='screen-reader-text' for='meta[{$entry['meta_id']}][value]'>" . __( 'Value' ) . "</label><textarea name='meta[{$entry['meta_id']}][value]' id='meta[{$entry['meta_id']}][value]' rows='2' cols='30'>{$entry['meta_value']}</textarea></td>\n\t</tr>"; |
… |
… |
function meta_form() { |
556 | 562 | <div class="submit"> |
557 | 563 | <?php submit_button( __( 'Add Custom Field' ), 'secondary', 'addmeta', false, array( 'id' => 'newmeta-submit', 'data-wp-lists' => 'add:the-list:newmeta' ) ); ?> |
558 | 564 | </div> |
559 | | <?php wp_nonce_field( 'add-meta', '_ajax_nonce-add-meta', false ); ?> |
| 565 | <?php wp_nonce_field( array( 'action' => 'add-meta', |
| 566 | 'name' => '_ajax_nonce-add-meta', |
| 567 | 'referrer' => false ) ); ?> |
560 | 568 | </td></tr> |
561 | 569 | </tbody> |
562 | 570 | </table> |
… |
… |
function find_posts_div($found_action = '') { |
1337 | 1345 | <?php } ?> |
1338 | 1346 | |
1339 | 1347 | <input type="hidden" name="affected" id="affected" value="" /> |
1340 | | <?php wp_nonce_field( 'find-posts', '_ajax_nonce', false ); ?> |
| 1348 | <?php wp_nonce_field( array( 'action' => 'find-posts', |
| 1349 | 'name' => '_ajax_nonce', |
| 1350 | 'referrer' => false ) ); ?> |
1341 | 1351 | <label class="screen-reader-text" for="find-posts-input"><?php _e( 'Search' ); ?></label> |
1342 | 1352 | <input type="text" id="find-posts-input" name="ps" value="" /> |
1343 | 1353 | <span class="spinner"></span> |
-
diff --git wp-admin/includes/theme-install.php wp-admin/includes/theme-install.php
index 63be1d7..3f8925f 100644
|
|
function install_themes_upload($page = 1) { |
139 | 139 | <h4><?php _e('Install a theme in .zip format'); ?></h4> |
140 | 140 | <p class="install-help"><?php _e('If you have a theme in a .zip format, you may install it by uploading it here.'); ?></p> |
141 | 141 | <form method="post" enctype="multipart/form-data" class="wp-upload-form" action="<?php echo self_admin_url('update.php?action=upload-theme'); ?>"> |
142 | | <?php wp_nonce_field( 'theme-upload'); ?> |
| 142 | <?php wp_nonce_field( array( 'action' => 'theme-upload' ) ); ?> |
143 | 143 | <input type="file" name="themezip" /> |
144 | 144 | <?php submit_button( __( 'Install Now' ), 'button', 'install-theme-submit', false ); ?> |
145 | 145 | </form> |
-
diff --git wp-admin/index.php wp-admin/index.php
index b476267..3a4e6b0 100644
|
|
$today = current_time('mysql', 1); |
118 | 118 | $classes .= ' hidden'; ?> |
119 | 119 | |
120 | 120 | <div id="welcome-panel" class="<?php echo esc_attr( $classes ); ?>"> |
121 | | <?php wp_nonce_field( 'welcome-panel-nonce', 'welcomepanelnonce', false ); ?> |
| 121 | <?php wp_nonce_field( array( 'action' => 'welcome-panel-nonce', |
| 122 | 'name' => 'welcomepanelnonce', |
| 123 | 'referrer' => false ) ); ?> |
122 | 124 | <a class="welcome-panel-close" href="<?php echo esc_url( admin_url( '?welcome=0' ) ); ?>"><?php _e( 'Dismiss' ); ?></a> |
123 | 125 | <?php do_action( 'welcome_panel' ); ?> |
124 | 126 | </div> |
-
diff --git wp-admin/js/common.js wp-admin/js/common.js
index cd9ede7..c5cc066 100644
|
|
columns = { |
30 | 30 | $.post(ajaxurl, { |
31 | 31 | action: 'hidden-columns', |
32 | 32 | hidden: hidden, |
33 | | screenoptionnonce: $('#screenoptionnonce').val(), |
| 33 | screenoptionnonce: $('input[name="screenoptionnonce"]').val(), |
34 | 34 | page: pagenow |
35 | 35 | }); |
36 | 36 | }, |
-
diff --git wp-admin/js/dashboard.js wp-admin/js/dashboard.js
index 50a17f8..d47c956 100644
|
|
jQuery(document).ready( function($) { |
8 | 8 | $.post( ajaxurl, { |
9 | 9 | action: 'update-welcome-panel', |
10 | 10 | visible: visible, |
11 | | welcomepanelnonce: $('#welcomepanelnonce').val() |
| 11 | welcomepanelnonce: $('input[name="welcomepanelnonce"]').val() |
12 | 12 | }); |
13 | 13 | }; |
14 | 14 | |
-
diff --git wp-admin/js/edit-comments.js wp-admin/js/edit-comments.js
index 038a1e5..531b1e8 100644
|
|
setCommentsList = function() { |
263 | 263 | args = $.extend(args, { |
264 | 264 | 'action': 'fetch-list', |
265 | 265 | 'list_args': list_args, |
266 | | '_ajax_fetch_list_nonce': $('#_ajax_fetch_list_nonce').val() |
| 266 | '_ajax_fetch_list_nonce': $('input[name="_ajax_fetch_list_nonce"]').val() |
267 | 267 | }); |
268 | 268 | |
269 | 269 | $.ajax({ |
-
diff --git wp-admin/js/media.js wp-admin/js/media.js
index b4ed0fb..a3aabce 100644
|
|
var findPosts; |
48 | 48 | var post = { |
49 | 49 | ps: $('#find-posts-input').val(), |
50 | 50 | action: 'find_posts', |
51 | | _ajax_nonce: $('#_ajax_nonce').val() |
| 51 | _ajax_nonce: $('input[name="_ajax_nonce"]').val() |
52 | 52 | }, |
53 | 53 | spinner = $( '.find-box-search .spinner' ); |
54 | 54 | |
-
diff --git wp-admin/js/nav-menu.js wp-admin/js/nav-menu.js
index ee829da..21bbd1e 100644
|
|
var wpNavMenu; |
808 | 808 | attachThemeLocationsListeners : function() { |
809 | 809 | var loc = $('#nav-menu-theme-locations'), params = {}; |
810 | 810 | params['action'] = 'menu-locations-save'; |
811 | | params['menu-settings-column-nonce'] = $('#menu-settings-column-nonce').val(); |
| 811 | params['menu-settings-column-nonce'] = $('input[name="menu-settings-column-nonce"]').val(); |
812 | 812 | loc.find('input[type="submit"]').click(function() { |
813 | 813 | loc.find('select').each(function() { |
814 | 814 | params[this.name] = $(this).val(); |
… |
… |
var wpNavMenu; |
852 | 852 | 'action': 'menu-quick-search', |
853 | 853 | 'response-format': 'markup', |
854 | 854 | 'menu': $('#menu').val(), |
855 | | 'menu-settings-column-nonce': $('#menu-settings-column-nonce').val(), |
| 855 | 'menu-settings-column-nonce': $('input[name="menu-settings-column-nonce"]').val(), |
856 | 856 | 'q': q, |
857 | 857 | 'type': input.attr('name') |
858 | 858 | }; |
… |
… |
var wpNavMenu; |
899 | 899 | |
900 | 900 | addItemToMenu : function(menuItem, processMethod, callback) { |
901 | 901 | var menu = $('#menu').val(), |
902 | | nonce = $('#menu-settings-column-nonce').val(); |
| 902 | nonce = $('input[name="menu-settings-column-nonce"]').val(); |
903 | 903 | |
904 | 904 | processMethod = processMethod || function(){}; |
905 | 905 | callback = callback || function(){}; |
-
diff --git wp-admin/js/post.js wp-admin/js/post.js
index dd3a427..082080c 100644
|
|
commentsBox = { |
190 | 190 | data = { |
191 | 191 | 'action' : 'get-comments', |
192 | 192 | 'mode' : 'single', |
193 | | '_ajax_nonce' : $('#add_comment_nonce').val(), |
| 193 | '_ajax_nonce' : $('input[name="add_comment_nonce"]').val(), |
194 | 194 | 'p' : $('#post_ID').val(), |
195 | 195 | 'start' : st, |
196 | 196 | 'number' : num |
-
diff --git wp-admin/js/postbox.js wp-admin/js/postbox.js
index 838db5d..e4a9f37 100644
|
|
var postboxes; |
121 | 121 | |
122 | 122 | postVars = { |
123 | 123 | action: 'meta-box-order', |
124 | | _ajax_nonce: $('#meta-box-order-nonce').val(), |
| 124 | _ajax_nonce: $('input[name="meta-box-order-nonce"]').val(), |
125 | 125 | page_columns: page_columns, |
126 | 126 | page: page |
127 | 127 | } |
-
diff --git wp-admin/js/theme.js wp-admin/js/theme.js
index 079c73b..71bdb6d 100644
|
|
jQuery( document ).ready( function($) { |
123 | 123 | * @uses ajaxurl |
124 | 124 | * @uses list_args |
125 | 125 | * @uses theme_list_args |
126 | | * @uses $('#_ajax_fetch_list_nonce').val() |
| 126 | * @uses $('input[name="_ajax_fetch_list_nonce"]').val()" |
127 | 127 | * */ |
128 | 128 | var ThemeScroller; |
129 | 129 | (function($){ |
… |
… |
var ThemeScroller; |
151 | 151 | } |
152 | 152 | |
153 | 153 | // Handle inputs |
154 | | this.nonce = $('#_ajax_fetch_list_nonce').val(); |
| 154 | this.nonce = $('input[name="_ajax_fetch_list_nonce"]').val(); |
155 | 155 | this.nextPage = ( theme_list_args.paged + 1 ); |
156 | 156 | |
157 | 157 | // Cache jQuery selectors |
-
diff --git wp-admin/js/widgets.js wp-admin/js/widgets.js
index 87be4dd..7b03f0e 100644
|
|
wpWidgets = { |
180 | 180 | |
181 | 181 | var a = { |
182 | 182 | action: 'widgets-order', |
183 | | savewidgets: $('#_wpnonce_widgets').val(), |
| 183 | savewidgets: $('input[name="_wpnonce_widgets"]').val(), |
184 | 184 | sidebars: [] |
185 | 185 | }; |
186 | 186 | |
… |
… |
wpWidgets = { |
203 | 203 | |
204 | 204 | a = { |
205 | 205 | action: 'save-widget', |
206 | | savewidgets: $('#_wpnonce_widgets').val(), |
| 206 | savewidgets: $('input[name="_wpnonce_widgets"]').val(), |
207 | 207 | sidebar: sb |
208 | 208 | }; |
209 | 209 | |
-
diff --git wp-admin/media-new.php wp-admin/media-new.php
index e428811..0c126b0 100644
|
|
if ( get_user_setting('uploader') || isset( $_GET['browser-uploader'] ) ) |
76 | 76 | var post_id = <?php echo $post_id; ?>, shortform = 3; |
77 | 77 | </script> |
78 | 78 | <input type="hidden" name="post_id" id="post_id" value="<?php echo $post_id; ?>" /> |
79 | | <?php wp_nonce_field('media-form'); ?> |
| 79 | <?php wp_nonce_field( array( 'action' => 'media-form' ) ); ?> |
80 | 80 | <div id="media-items" class="hide-if-no-js"></div> |
81 | 81 | </form> |
82 | 82 | </div> |
-
diff --git wp-admin/media.php wp-admin/media.php
index 15d4323..df46a56 100644
|
|
if ( current_user_can( 'upload_files' ) ) { ?> |
128 | 128 | <input type="hidden" name="attachment_id" id="attachment_id" value="<?php echo esc_attr($att_id); ?>" /> |
129 | 129 | <input type="hidden" name="action" value="editattachment" /> |
130 | 130 | <?php wp_original_referer_field(true, 'previous'); ?> |
131 | | <?php wp_nonce_field('media-form'); ?> |
| 131 | <?php wp_nonce_field( array( 'action' => 'media-form' ) ); ?> |
132 | 132 | |
133 | 133 | </form> |
134 | 134 | |
-
diff --git wp-admin/ms-delete-site.php wp-admin/ms-delete-site.php
index 7d772c2..823d5d4 100644
|
|
Webmaster |
72 | 72 | <p><?php _e( 'Remember, once deleted your site cannot be restored.' ) ?></p> |
73 | 73 | |
74 | 74 | <form method="post" name="deletedirect"> |
75 | | <?php wp_nonce_field( 'delete-blog' ) ?> |
| 75 | <?php wp_nonce_field( array( 'action' => 'delete-blog' ) ); ?> |
76 | 76 | <input type="hidden" name="action" value="deleteblog" /> |
77 | 77 | <p><input id="confirmdelete" type="checkbox" name="confirmdelete" value="1" /> <label for="confirmdelete"><strong><?php printf( __( "I'm sure I want to permanently disable my site, and I am aware I can never get it back or use %s again." ), is_subdomain_install() ? $blog->domain : $blog->domain . $blog->path ); ?></strong></label></p> |
78 | 78 | <?php submit_button( __( 'Delete My Site Permanently' ) ); ?> |
-
diff --git wp-admin/my-sites.php wp-admin/my-sites.php
index 2ef4ca7..6738c00 100644
|
|
else : |
111 | 111 | }?> |
112 | 112 | </table> |
113 | 113 | <input type="hidden" name="action" value="updateblogsettings" /> |
114 | | <?php wp_nonce_field( 'update-my-sites' ); ?> |
| 114 | <?php wp_nonce_field( array( 'action' => 'update-my-sites' ) ); ?> |
115 | 115 | <?php submit_button(); ?> |
116 | 116 | </form> |
117 | 117 | <?php endif; ?> |
-
diff --git wp-admin/nav-menus.php wp-admin/nav-menus.php
index 8e00908..0e191b0 100644
|
|
require_once( './admin-header.php' ); |
655 | 655 | <form id="nav-menu-meta" action="" class="nav-menu-meta" method="post" enctype="multipart/form-data"> |
656 | 656 | <input type="hidden" name="menu" id="nav-menu-meta-object-id" value="<?php echo esc_attr( $nav_menu_selected_id ); ?>" /> |
657 | 657 | <input type="hidden" name="action" value="add-menu-item" /> |
658 | | <?php wp_nonce_field( 'add-menu_item', 'menu-settings-column-nonce' ); ?> |
| 658 | <?php wp_nonce_field( array( 'action' => 'add-menu_item', |
| 659 | 'name' => 'menu-settings-column-nonce' ) ); ?> |
659 | 660 | <?php do_accordion_sections( 'nav-menus', 'side', null ); ?> |
660 | 661 | </form> |
661 | 662 | |
… |
… |
require_once( './admin-header.php' ); |
665 | 666 | <form id="update-nav-menu" action="" method="post" enctype="multipart/form-data"> |
666 | 667 | <div class="menu-edit <?php if ( $add_new_screen ) echo 'blank-slate'; ?>"> |
667 | 668 | <?php |
668 | | wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); |
669 | | wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); |
670 | | wp_nonce_field( 'update-nav_menu', 'update-nav-menu-nonce' ); |
| 669 | wp_nonce_field( array( 'action' => 'closedpostboxes', |
| 670 | 'name' => 'closedpostboxesnonce', |
| 671 | 'id' => 'closedpostboxesnonce', |
| 672 | 'referrer' => false ) ); |
| 673 | wp_nonce_field( array( 'action' => 'meta-box-order', |
| 674 | 'name' => 'meta-box-order-nonce', |
| 675 | 'referrer' => false ) ); |
| 676 | wp_nonce_field( array( 'action' => 'update-nav_menu', |
| 677 | 'name' => 'update-nav-menu-nonce' ) ); |
671 | 678 | |
672 | 679 | if ( $one_theme_location_no_menus ) { ?> |
673 | 680 | <input type="hidden" name="zero-menu-state" value="true" /> |
-
diff --git wp-admin/network.php wp-admin/network.php
index 34ab517..045ab01 100644
|
|
function network_step1( $errors = false ) { |
172 | 172 | |
173 | 173 | echo '<form method="post" action="">'; |
174 | 174 | |
175 | | wp_nonce_field( 'install-network-1' ); |
| 175 | wp_nonce_field( array( 'action' => 'install-network-1' ) ); |
176 | 176 | |
177 | 177 | $error_codes = array(); |
178 | 178 | if ( is_wp_error( $errors ) ) { |
-
diff --git wp-admin/network/settings.php wp-admin/network/settings.php
index e745694..8f36434 100644
|
|
if ( isset( $_GET['updated'] ) ) { |
83 | 83 | <?php screen_icon('options-general'); ?> |
84 | 84 | <h2><?php echo esc_html( $title ); ?></h2> |
85 | 85 | <form method="post" action="settings.php"> |
86 | | <?php wp_nonce_field( 'siteoptions' ); ?> |
| 86 | <?php wp_nonce_field( array( 'action' => 'siteoptions' ) ); ?> |
87 | 87 | <h3><?php _e( 'Operational Settings' ); ?></h3> |
88 | 88 | <table class="form-table"> |
89 | 89 | <tr valign="top"> |
-
diff --git wp-admin/network/site-info.php wp-admin/network/site-info.php
index 7dd6aeb..4008ad3 100644
|
|
if ( ! empty( $messages ) ) { |
118 | 118 | echo '<div id="message" class="updated"><p>' . $msg . '</p></div>'; |
119 | 119 | } ?> |
120 | 120 | <form method="post" action="site-info.php?action=update-site"> |
121 | | <?php wp_nonce_field( 'edit-site' ); ?> |
| 121 | <?php wp_nonce_field( array( 'action' => 'edit-site' ) ); ?> |
122 | 122 | <input type="hidden" name="id" value="<?php echo esc_attr( $id ) ?>" /> |
123 | 123 | <table class="form-table"> |
124 | 124 | <tr class="form-field form-required"> |
-
diff --git wp-admin/network/site-new.php wp-admin/network/site-new.php
index 9fc5eef..cff37a4 100644
|
|
if ( ! empty( $messages ) ) { |
120 | 120 | echo '<div id="message" class="updated"><p>' . $msg . '</p></div>'; |
121 | 121 | } ?> |
122 | 122 | <form method="post" action="<?php echo network_admin_url('site-new.php?action=add-site'); ?>"> |
123 | | <?php wp_nonce_field( 'add-blog', '_wpnonce_add-blog' ) ?> |
| 123 | <?php wp_nonce_field( array( 'action' => 'add-blog', |
| 124 | 'name' => '_wpnonce_add-blog' ) ); ?> |
124 | 125 | <table class="form-table"> |
125 | 126 | <tr class="form-field form-required"> |
126 | 127 | <th scope="row"><?php _e( 'Site Address' ) ?></th> |
-
diff --git wp-admin/network/site-settings.php wp-admin/network/site-settings.php
index c3aec75..64fcf77 100644
|
|
if ( ! empty( $messages ) ) { |
104 | 104 | echo '<div id="message" class="updated"><p>' . $msg . '</p></div>'; |
105 | 105 | } ?> |
106 | 106 | <form method="post" action="site-settings.php?action=update-site"> |
107 | | <?php wp_nonce_field( 'edit-site' ); ?> |
| 107 | <?php wp_nonce_field( array( 'action' => 'edit-site' ) ); ?> |
108 | 108 | <input type="hidden" name="id" value="<?php echo esc_attr( $id ) ?>" /> |
109 | 109 | <table class="form-table"> |
110 | 110 | <?php |
-
diff --git wp-admin/network/site-users.php wp-admin/network/site-users.php
index 0812b50..ebfc85d 100644
|
|
endif; ?> |
267 | 267 | </select></td> |
268 | 268 | </tr> |
269 | 269 | </table> |
270 | | <?php wp_nonce_field( 'add-user', '_wpnonce_add-user' ) ?> |
| 270 | <?php wp_nonce_field( array( 'action' => 'add-user', |
| 271 | 'name' => '_wpnonce_add-user' ) ); ?> |
271 | 272 | <?php submit_button( __( 'Add User' ), 'primary', 'add-user', true, array( 'id' => 'submit-add-existing-user' ) ); ?> |
272 | 273 | </form> |
273 | 274 | <?php endif; ?> |
… |
… |
endif; ?> |
301 | 302 | <td colspan="2"><?php _e( 'Username and password will be mailed to the above email address.' ) ?></td> |
302 | 303 | </tr> |
303 | 304 | </table> |
304 | | <?php wp_nonce_field( 'add-user', '_wpnonce_add-new-user' ) ?> |
| 305 | <?php wp_nonce_field( array( 'action' => 'add-user', |
| 306 | 'name' => '_wpnonce_add-new-user' ) ); ?> |
305 | 307 | <?php submit_button( __( 'Add New User' ), 'primary', 'add-user', true, array( 'id' => 'submit-add-user' ) ); ?> |
306 | 308 | </form> |
307 | 309 | <?php endif; ?> |
-
diff --git wp-admin/network/sites.php wp-admin/network/sites.php
index 93341c3..0fd9532 100644
|
|
if ( isset( $_GET['action'] ) ) { |
78 | 78 | <input type="hidden" name="action" value="<?php echo esc_attr( $_GET['action2'] ) ?>" /> |
79 | 79 | <input type="hidden" name="id" value="<?php echo esc_attr( $id ); ?>" /> |
80 | 80 | <input type="hidden" name="_wp_http_referer" value="<?php echo esc_attr( wp_get_referer() ); ?>" /> |
81 | | <?php wp_nonce_field( $_GET['action2'], '_wpnonce', false ); ?> |
| 81 | <?php wp_nonce_field( array( 'action' => $_GET['action2'], 'referrer' => false ) ); ?> |
82 | 82 | <p><?php echo esc_html( wp_unslash( $_GET['msg'] ) ); ?></p> |
83 | 83 | <?php submit_button( __('Confirm'), 'button' ); ?> |
84 | 84 | </form> |
-
diff --git wp-admin/network/themes.php wp-admin/network/themes.php
index 04840ee..e4a1a9b 100644
|
|
if ( $action ) { |
154 | 154 | foreach ( (array) $themes as $theme ) |
155 | 155 | echo '<input type="hidden" name="checked[]" value="' . esc_attr($theme) . '" />'; |
156 | 156 | ?> |
157 | | <?php wp_nonce_field('bulk-themes') ?> |
| 157 | <?php wp_nonce_field( array( 'action' => 'bulk-themes' ) ); ?> |
158 | 158 | <?php submit_button( _n( 'Yes, Delete this theme', 'Yes, Delete these themes', $themes_to_delete ), 'button', 'submit', false ); ?> |
159 | 159 | </form> |
160 | 160 | <form method="post" action="<?php echo esc_url(wp_get_referer()); ?>" style="display:inline;"> |
-
diff --git wp-admin/network/user-new.php wp-admin/network/user-new.php
index 316fffe..45b5f12 100644
|
|
if ( isset( $add_user_errors ) && is_wp_error( $add_user_errors ) ) { ?> |
99 | 99 | <td colspan="2"><?php _e( 'Username and password will be mailed to the above email address.' ) ?></td> |
100 | 100 | </tr> |
101 | 101 | </table> |
102 | | <?php wp_nonce_field( 'add-user', '_wpnonce_add-user' ) ?> |
| 102 | <?php wp_nonce_field( array( 'action' => 'add-user', |
| 103 | 'name' => '_wpnonce_add-user' ) ); ?> |
103 | 104 | <?php submit_button( __('Add User'), 'primary', 'add-user' ); ?> |
104 | 105 | </form> |
105 | 106 | </div> |
-
diff --git wp-admin/network/users.php wp-admin/network/users.php
index 1318355..fe5aaca 100644
|
|
function confirm_delete_users( $users ) { |
28 | 28 | <form action="users.php?action=dodelete" method="post"> |
29 | 29 | <input type="hidden" name="dodelete" /> |
30 | 30 | <?php |
31 | | wp_nonce_field( 'ms-users-delete' ); |
| 31 | wp_nonce_field( array( 'action' => 'ms-users-delete' ) ); |
32 | 32 | $site_admins = get_super_admins(); |
33 | 33 | $admin_out = "<option value='$current_user->ID'>$current_user->user_login</option>"; |
34 | 34 | |
-
diff --git wp-admin/options-permalink.php wp-admin/options-permalink.php
index d086fdc..5735276 100644
|
|
if ( ! is_multisite() ) { |
170 | 170 | <h2><?php echo esc_html( $title ); ?></h2> |
171 | 171 | |
172 | 172 | <form name="form" action="options-permalink.php" method="post"> |
173 | | <?php wp_nonce_field('update-permalink') ?> |
| 173 | <?php wp_nonce_field( array( 'action' => 'update-permalink' ) ); ?> |
174 | 174 | |
175 | 175 | <p><?php _e('By default WordPress uses web <abbr title="Universal Resource Locator">URL</abbr>s which have question marks and lots of numbers in them, however WordPress offers you the ability to create a custom URL structure for your permalinks and archives. This can improve the aesthetics, usability, and forward-compatibility of your links. A <a href="http://codex.wordpress.org/Using_Permalinks">number of tags are available</a>, and here are some examples to get you started.'); ?></p> |
176 | 176 | |
… |
… |
printf( __('If you like, you may enter custom structures for your category and t |
256 | 256 | if ( file_exists($home_path . 'web.config') ) : ?> |
257 | 257 | <p><?php _e('If your <code>web.config</code> file were <a href="http://codex.wordpress.org/Changing_File_Permissions">writable</a>, we could do this automatically, but it isn’t so this is the url rewrite rule you should have in your <code>web.config</code> file. Click in the field and press <kbd>CTRL + a</kbd> to select all. Then insert this rule inside of the <code>/<configuration>/<system.webServer>/<rewrite>/<rules></code> element in <code>web.config</code> file.') ?></p> |
258 | 258 | <form action="options-permalink.php" method="post"> |
259 | | <?php wp_nonce_field('update-permalink') ?> |
| 259 | <?php wp_nonce_field( array( 'action' => 'update-permalink' ) ); ?> |
260 | 260 | <p><textarea rows="9" class="large-text readonly" name="rules" id="rules" readonly="readonly"><?php echo esc_textarea( $wp_rewrite->iis7_url_rewrite_rules() ); ?></textarea></p> |
261 | 261 | </form> |
262 | 262 | <p><?php _e('If you temporarily make your <code>web.config</code> file writable for us to generate rewrite rules automatically, do not forget to revert the permissions after rule has been saved.') ?></p> |
263 | 263 | <?php else : ?> |
264 | 264 | <p><?php _e('If the root directory of your site were <a href="http://codex.wordpress.org/Changing_File_Permissions">writable</a>, we could do this automatically, but it isn’t so this is the url rewrite rule you should have in your <code>web.config</code> file. Create a new file, called <code>web.config</code> in the root directory of your site. Click in the field and press <kbd>CTRL + a</kbd> to select all. Then insert this code into the <code>web.config</code> file.') ?></p> |
265 | 265 | <form action="options-permalink.php" method="post"> |
266 | | <?php wp_nonce_field('update-permalink') ?> |
| 266 | <?php wp_nonce_field( array( 'action' => 'update-permalink' ) ); ?> |
267 | 267 | <p><textarea rows="18" class="large-text readonly" name="rules" id="rules" readonly="readonly"><?php echo esc_textarea( $wp_rewrite->iis7_url_rewrite_rules(true) ); ?></textarea></p> |
268 | 268 | </form> |
269 | 269 | <p><?php _e('If you temporarily make your site’s root directory writable for us to generate the <code>web.config</code> file automatically, do not forget to revert the permissions after the file has been created.') ?></p> |
… |
… |
printf( __('If you like, you may enter custom structures for your category and t |
273 | 273 | if ( $permalink_structure && ! $usingpi && ! $writable ) : ?> |
274 | 274 | <p><?php _e('If your <code>.htaccess</code> file were <a href="http://codex.wordpress.org/Changing_File_Permissions">writable</a>, we could do this automatically, but it isn’t so these are the mod_rewrite rules you should have in your <code>.htaccess</code> file. Click in the field and press <kbd>CTRL + a</kbd> to select all.') ?></p> |
275 | 275 | <form action="options-permalink.php" method="post"> |
276 | | <?php wp_nonce_field('update-permalink') ?> |
| 276 | <?php wp_nonce_field( array( 'action' => 'update-permalink' ) ); ?> |
277 | 277 | <p><textarea rows="6" class="large-text readonly" name="rules" id="rules" readonly="readonly"><?php echo esc_textarea( $wp_rewrite->mod_rewrite_rules() ); ?></textarea></p> |
278 | 278 | </form> |
279 | 279 | <?php endif; ?> |
-
diff --git wp-admin/options.php wp-admin/options.php
index 80a0719..365de63 100644
|
|
include('./admin-header.php'); ?> |
178 | 178 | <?php screen_icon(); ?> |
179 | 179 | <h2><?php esc_html_e('All Settings'); ?></h2> |
180 | 180 | <form name="form" action="options.php" method="post" id="all-options"> |
181 | | <?php wp_nonce_field('options-options') ?> |
| 181 | <?php wp_nonce_field( array( 'action' => 'options-options' ) ); ?> |
182 | 182 | <input type="hidden" name="action" value="update" /> |
183 | 183 | <input type='hidden' name='option_page' value='options' /> |
184 | 184 | <table class="form-table"> |
-
diff --git wp-admin/plugin-editor.php wp-admin/plugin-editor.php
index 2167c1a..dc962a9 100644
|
|
foreach ( $plugin_files as $plugin_file ) : |
223 | 223 | </ul> |
224 | 224 | </div> |
225 | 225 | <form name="template" id="template" action="plugin-editor.php" method="post"> |
226 | | <?php wp_nonce_field('edit-plugin_' . $file) ?> |
| 226 | <?php wp_nonce_field( array( 'action' => 'edit-plugin_' . $file ) ); ?> |
227 | 227 | <div><textarea cols="70" rows="25" name="newcontent" id="newcontent" aria-describedby="newcontent-description"><?php echo $content; ?></textarea> |
228 | 228 | <input type="hidden" name="action" value="update" /> |
229 | 229 | <input type="hidden" name="file" value="<?php echo esc_attr($file) ?>" /> |
-
diff --git wp-admin/plugins.php wp-admin/plugins.php
index c371b64..ad35832 100644
|
|
if ( $action ) { |
294 | 294 | foreach ( (array) $plugins as $plugin ) |
295 | 295 | echo '<input type="hidden" name="checked[]" value="' . esc_attr($plugin) . '" />'; |
296 | 296 | ?> |
297 | | <?php wp_nonce_field('bulk-plugins') ?> |
| 297 | <?php wp_nonce_field( array( 'action' => 'bulk-plugins' ) ); ?> |
298 | 298 | <?php submit_button( $data_to_delete ? __( 'Yes, Delete these files and data' ) : __( 'Yes, Delete these files' ), 'button', 'submit', false ); ?> |
299 | 299 | </form> |
300 | 300 | <form method="post" action="<?php echo esc_url(wp_get_referer()); ?>" style="display:inline;"> |
-
diff --git wp-admin/press-this.php wp-admin/press-this.php
index b270115..8838e16 100644
|
|
$admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( |
443 | 443 | <div id="poststuff" class="metabox-holder"> |
444 | 444 | <div id="side-sortables" class="press-this-sidebar"> |
445 | 445 | <div class="sleeve"> |
446 | | <?php wp_nonce_field('press-this') ?> |
| 446 | <?php wp_nonce_field( array( 'action' => 'press-this' ) ); ?> |
447 | 447 | <input type="hidden" name="post_type" id="post_type" value="text"/> |
448 | 448 | <input type="hidden" name="autosave" id="autosave" /> |
449 | 449 | <input type="hidden" id="original_post_status" name="original_post_status" value="draft" /> |
… |
… |
$admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( |
528 | 528 | </label> |
529 | 529 | <?php wp_dropdown_categories( array( 'taxonomy' => 'category', 'hide_empty' => 0, 'name' => 'newcategory_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => '— ' . $tax->labels->parent_item . ' —' ) ); ?> |
530 | 530 | <input type="button" id="category-add-submit" data-wp-lists="add:categorychecklist:category-add" class="button category-add-submit" value="<?php echo esc_attr( $tax->labels->add_new_item ); ?>" /> |
531 | | <?php wp_nonce_field( 'add-category', '_ajax_nonce-add-category', false ); ?> |
| 531 | <?php wp_nonce_field( array( 'action' => 'add-category', |
| 532 | 'name' => '_ajax_nonce-add-category', |
| 533 | 'referrer' => false ) ); ?> |
532 | 534 | <span id="category-ajax-response"></span> |
533 | 535 | </p> |
534 | 536 | </div> |
-
diff --git wp-admin/theme-editor.php wp-admin/theme-editor.php
index 8f95cab..a2497c9 100644
|
|
if ( $allowed_files ) : |
198 | 198 | echo '<div class="error"><p>' . __('Oops, no such file exists! Double check the name and try again, merci.') . '</p></div>'; |
199 | 199 | else : ?> |
200 | 200 | <form name="template" id="template" action="theme-editor.php" method="post"> |
201 | | <?php wp_nonce_field( 'edit-theme_' . $file . $stylesheet ); ?> |
| 201 | <?php wp_nonce_field( array( 'action' => 'edit-theme_' . $file . $stylesheet ) ); ?> |
202 | 202 | <div><textarea cols="70" rows="30" name="newcontent" id="newcontent" aria-describedby="newcontent-description"><?php echo $content; ?></textarea> |
203 | 203 | <input type="hidden" name="action" value="update" /> |
204 | 204 | <input type="hidden" name="file" value="<?php echo esc_attr( $relative_file ); ?>" /> |
-
diff --git wp-admin/update-core.php wp-admin/update-core.php
index c8f5877..38cbdb2 100644
|
|
function list_core_update( $update ) { |
68 | 68 | echo $message; |
69 | 69 | echo '</p>'; |
70 | 70 | echo '<form method="post" action="' . $form_action . '" name="upgrade" class="upgrade">'; |
71 | | wp_nonce_field('upgrade-core'); |
| 71 | wp_nonce_field( array( 'action' => 'upgrade-core' ) ); |
72 | 72 | echo '<p>'; |
73 | 73 | echo '<input name="version" value="'. esc_attr($update->current) .'" type="hidden"/>'; |
74 | 74 | echo '<input name="locale" value="'. esc_attr($update->locale) .'" type="hidden"/>'; |
… |
… |
function list_plugin_updates() { |
189 | 189 | <h3><?php _e( 'Plugins' ); ?></h3> |
190 | 190 | <p><?php _e( 'The following plugins have new versions available. Check the ones you want to update and then click “Update Plugins”.' ); ?></p> |
191 | 191 | <form method="post" action="<?php echo esc_url( $form_action ); ?>" name="upgrade-plugins" class="upgrade"> |
192 | | <?php wp_nonce_field('upgrade-core'); ?> |
| 192 | <?php wp_nonce_field( array( 'action' => 'upgrade-core' ) ); ?> |
193 | 193 | <p><input id="upgrade-plugins" class="button" type="submit" value="<?php esc_attr_e('Update Plugins'); ?>" name="upgrade" /></p> |
194 | 194 | <table class="widefat" cellspacing="0" id="update-plugins-table"> |
195 | 195 | <thead> |
… |
… |
function list_theme_updates() { |
267 | 267 | <p><?php _e( 'The following themes have new versions available. Check the ones you want to update and then click “Update Themes”.' ); ?></p> |
268 | 268 | <p><?php printf( __('<strong>Please Note:</strong> Any customizations you have made to theme files will be lost. Please consider using <a href="%s">child themes</a> for modifications.'), _x('http://codex.wordpress.org/Child_Themes', 'Link used in suggestion to use child themes in GUU') ); ?></p> |
269 | 269 | <form method="post" action="<?php echo esc_url( $form_action ); ?>" name="upgrade-themes" class="upgrade"> |
270 | | <?php wp_nonce_field('upgrade-core'); ?> |
| 270 | <?php wp_nonce_field( array( 'action' => 'upgrade-core' ) ); ?> |
271 | 271 | <p><input id="upgrade-themes" class="button" type="submit" value="<?php esc_attr_e('Update Themes'); ?>" name="upgrade" /></p> |
272 | 272 | <table class="widefat" cellspacing="0" id="update-themes-table"> |
273 | 273 | <thead> |
-
diff --git wp-admin/user-edit.php wp-admin/user-edit.php
index 13a2f63..6e24098 100644
|
|
if ( ! IS_PROFILE_PAGE ) { |
190 | 190 | </h2> |
191 | 191 | |
192 | 192 | <form id="your-profile" action="<?php echo esc_url( self_admin_url( IS_PROFILE_PAGE ? 'profile.php' : 'user-edit.php' ) ); ?>" method="post"<?php do_action('user_edit_form_tag'); ?>> |
193 | | <?php wp_nonce_field('update-user_' . $user_id) ?> |
| 193 | <?php wp_nonce_field( array( 'action' => 'update-user_' . $user_id ) ); ?> |
194 | 194 | <?php if ( $wp_http_referer ) : ?> |
195 | 195 | <input type="hidden" name="wp_http_referer" value="<?php echo esc_url($wp_http_referer); ?>" /> |
196 | 196 | <?php endif; ?> |
-
diff --git wp-admin/user-new.php wp-admin/user-new.php
index 13a8e12..adf86d3 100644
|
|
if ( is_multisite() ) { |
268 | 268 | ?> |
269 | 269 | <form action="" method="post" name="adduser" id="adduser" class="validate"<?php do_action('user_new_form_tag');?>> |
270 | 270 | <input name="action" type="hidden" value="adduser" /> |
271 | | <?php wp_nonce_field( 'add-user', '_wpnonce_add-user' ) ?> |
| 271 | <?php wp_nonce_field( array( 'action' => 'add-user', |
| 272 | 'name' => '_wpnonce_add-user' ) ); ?> |
272 | 273 | |
273 | 274 | <table class="form-table"> |
274 | 275 | <tr class="form-field form-required"> |
… |
… |
if ( current_user_can( 'create_users') ) { |
301 | 302 | <p><?php _e('Create a brand new user and add it to this site.'); ?></p> |
302 | 303 | <form action="" method="post" name="createuser" id="createuser" class="validate"<?php do_action('user_new_form_tag');?>> |
303 | 304 | <input name="action" type="hidden" value="createuser" /> |
304 | | <?php wp_nonce_field( 'create-user', '_wpnonce_create-user' ) ?> |
| 305 | <?php wp_nonce_field( array( 'action' => 'create-user', |
| 306 | 'name' => '_wpnonce_create-user' ) ); ?> |
305 | 307 | <?php |
306 | 308 | // Load up the passed data, else set to a default. |
307 | 309 | foreach ( array( 'user_login' => 'login', 'first_name' => 'firstname', 'last_name' => 'lastname', |
-
diff --git wp-admin/users.php wp-admin/users.php
index e807487..da0003e 100644
|
|
case 'delete': |
214 | 214 | include ('admin-header.php'); |
215 | 215 | ?> |
216 | 216 | <form action="" method="post" name="updateusers" id="updateusers"> |
217 | | <?php wp_nonce_field('delete-users') ?> |
| 217 | <?php wp_nonce_field( array( 'action' => 'delete-users' ) ); ?> |
218 | 218 | <?php echo $referer; ?> |
219 | 219 | |
220 | 220 | <div class="wrap"> |
… |
… |
case 'remove': |
319 | 319 | include ('admin-header.php'); |
320 | 320 | ?> |
321 | 321 | <form action="" method="post" name="updateusers" id="updateusers"> |
322 | | <?php wp_nonce_field('remove-users') ?> |
| 322 | <?php wp_nonce_field( array( 'action' => 'remove-users' ) ); ?> |
323 | 323 | <?php echo $referer; ?> |
324 | 324 | |
325 | 325 | <div class="wrap"> |
-
diff --git wp-admin/widgets.php wp-admin/widgets.php
index 3e0b146..ecc1d37 100644
|
|
if ( isset($_GET['editwidget']) && $_GET['editwidget'] ) { |
281 | 281 | <input type="hidden" name="widget-id" class="widget-id" value="<?php echo esc_attr($widget_id); ?>" /> |
282 | 282 | <input type="hidden" name="id_base" class="id_base" value="<?php echo esc_attr($id_base); ?>" /> |
283 | 283 | <input type="hidden" name="multi_number" class="multi_number" value="<?php echo esc_attr($multi_number); ?>" /> |
284 | | <?php wp_nonce_field("save-delete-widget-$widget_id"); ?> |
| 284 | <?php wp_nonce_field( array( 'action' => "save-delete-widget-$widget_id" ) ); ?> |
285 | 285 | <br class="clear" /> |
286 | 286 | </div> |
287 | 287 | </form> |
… |
… |
foreach ( $wp_registered_sidebars as $sidebar => $registered_sidebar ) { |
389 | 389 | </div> |
390 | 390 | </div> |
391 | 391 | <form action="" method="post"> |
392 | | <?php wp_nonce_field( 'save-sidebar-widgets', '_wpnonce_widgets', false ); ?> |
| 392 | <?php wp_nonce_field( array( 'action' => 'save-sidebar-widgets', |
| 393 | 'name' => '_wpnonce_widgets', |
| 394 | 'referrer' => false ) ); ?> |
393 | 395 | </form> |
394 | 396 | <br class="clear" /> |
395 | 397 | </div> |
-
diff --git wp-includes/class-wp-editor.php wp-includes/class-wp-editor.php
index 71236ba..f68c992 100644
|
|
final class _WP_Editors { |
818 | 818 | ?> |
819 | 819 | <div style="display:none;"> |
820 | 820 | <form id="wp-link" tabindex="-1"> |
821 | | <?php wp_nonce_field( 'internal-linking', '_ajax_linking_nonce', false ); ?> |
| 821 | <?php wp_nonce_field( array( 'action' => 'internal-linking', |
| 822 | 'name' => '_ajax_linking_nonce', |
| 823 | 'id' => '_ajax_linking_nonce', |
| 824 | 'referrer' => false ) ); ?> |
822 | 825 | <div id="link-selector"> |
823 | 826 | <div id="link-options"> |
824 | 827 | <p class="howto"><?php _e( 'Enter the destination URL' ); ?></p> |
-
diff --git wp-includes/comment-template.php wp-includes/comment-template.php
index 3d32132..362ce5e 100644
|
|
function wp_comment_form_unfiltered_html_nonce() { |
814 | 814 | $post_id = $post ? $post->ID : 0; |
815 | 815 | |
816 | 816 | if ( current_user_can( 'unfiltered_html' ) ) { |
817 | | wp_nonce_field( 'unfiltered-html-comment_' . $post_id, '_wp_unfiltered_html_comment_disabled', false ); |
| 817 | wp_nonce_field( array( 'action' => 'unfiltered-html-comment_' . $post_id, |
| 818 | 'name' => '_wp_unfiltered_html_comment_disabled', |
| 819 | 'id' => '_wp_unfiltered_html_comment_disabled', |
| 820 | 'referrer' => false ) ); |
818 | 821 | echo "<script>(function(){if(window===window.parent){document.getElementById('_wp_unfiltered_html_comment_disabled').name='_wp_unfiltered_html_comment';}})();</script>\n"; |
819 | 822 | } |
820 | 823 | } |
-
diff --git wp-includes/functions.php wp-includes/functions.php
index d31e58a..5012c33 100644
|
|
function wp_nonce_url( $actionurl, $action = -1, $name = '_wpnonce' ) { |
1186 | 1186 | * offer absolute protection, but should protect against most cases. It is very |
1187 | 1187 | * important to use nonce field in forms. |
1188 | 1188 | * |
1189 | | * The $action and $name are optional, but if you want to have better security, |
1190 | | * it is strongly suggested to set those two parameters. It is easier to just |
| 1189 | * The following optional settings can be used with this method: |
| 1190 | * |
| 1191 | * action - A unique name included in the nonce hash (for better security). |
| 1192 | * name - The input field name, defaults to "_wpnonce". |
| 1193 | * id - Used as the input element id if desired. |
| 1194 | * referrer - Referrer field is used for validation, defaults to true. |
| 1195 | * echo - Output is displayed, defaults to true. Returns the output if false. |
| 1196 | * |
| 1197 | * While action is optional, it is strongly recommended to set this option to a |
| 1198 | * unique value for every form for better security. It is easier to just |
1191 | 1199 | * call the function without any parameters, because validation of the nonce |
1192 | | * doesn't require any parameters, but since crackers know what the default is |
| 1200 | * doesn't require any parameters, but since crackers know what the default is, |
1193 | 1201 | * it won't be difficult for them to find a way around your nonce and cause |
1194 | 1202 | * damage. |
1195 | 1203 | * |
1196 | | * The input name will be whatever $name value you gave. The input value will be |
1197 | | * the nonce creation value. |
1198 | | * |
1199 | 1204 | * @package WordPress |
1200 | 1205 | * @subpackage Security |
1201 | 1206 | * @since 2.0.4 |
1202 | 1207 | * |
1203 | | * @param string $action Optional. Action name. |
1204 | | * @param string $name Optional. Nonce name. |
1205 | | * @param bool $referer Optional, default true. Whether to set the referer field for validation. |
1206 | | * @param bool $echo Optional, default true. Whether to display or return hidden form field. |
1207 | | * @return string Nonce field. |
| 1208 | * @param array $options Optional settings for the nonce field, see description. |
| 1209 | * |
| 1210 | * @return string HTML nonce field to be used in a form. |
1208 | 1211 | */ |
1209 | | function wp_nonce_field( $action = -1, $name = "_wpnonce", $referer = true , $echo = true ) { |
1210 | | $name = esc_attr( $name ); |
1211 | | $nonce_field = '<input type="hidden" id="' . $name . '" name="' . $name . '" value="' . wp_create_nonce( $action ) . '" />'; |
| 1212 | function wp_nonce_field( $options = array() ) { |
| 1213 | $defaults = array( |
| 1214 | 'action' => -1, |
| 1215 | 'name' => '_wpnonce', |
| 1216 | 'id' => '', |
| 1217 | 'referrer' => true, |
| 1218 | 'echo' => true |
| 1219 | ); |
1212 | 1220 | |
1213 | | if ( $referer ) |
| 1221 | // WordPress 3.5 compatibility layer: |
| 1222 | // Arguments: $action = -1, $name = "_wpnonce", $referer = true, $echo = true |
| 1223 | // The $name parameter was also used for id. |
| 1224 | if ( ! is_array( $options ) || 0 == func_num_args() ) { |
| 1225 | _deprecated_argument( __FUNCTION__, '3.6', 'Please see the documentation on how to pass the necessary options to this function.' ); |
| 1226 | $old_args = func_get_args(); |
| 1227 | $options = array( 'name' => '_wpnonce' ); |
| 1228 | if ( isset( $old_args[0] ) ) $options['action'] = $old_args[0]; |
| 1229 | if ( isset( $old_args[1] ) ) $options['name'] = $old_args[1]; |
| 1230 | if ( isset( $old_args[2] ) ) $options['referrer'] = $old_args[2]; |
| 1231 | if ( isset( $old_args[3] ) ) $options['echo'] = $old_args[3]; |
| 1232 | $options['id'] = $options['name']; |
| 1233 | } |
| 1234 | |
| 1235 | $options = wp_parse_args( $options, $defaults ); |
| 1236 | |
| 1237 | $nonce_field = '<input type="hidden"'; |
| 1238 | if ( ! empty( $options['id'] ) ) { |
| 1239 | $nonce_field .= ' id="' . esc_attr( $options['id'] ) . '"'; |
| 1240 | } |
| 1241 | $nonce_field .= ' name="' . esc_attr( $options['name'] ) . '"'; |
| 1242 | $nonce_field .= ' value="' . esc_attr( wp_create_nonce( $options['action'] ) ) . '" />'; |
| 1243 | |
| 1244 | if ( $options['referrer'] ) |
1214 | 1245 | $nonce_field .= wp_referer_field( false ); |
1215 | 1246 | |
1216 | | if ( $echo ) |
| 1247 | if ( $options['echo'] ) |
1217 | 1248 | echo $nonce_field; |
1218 | 1249 | |
1219 | 1250 | return $nonce_field; |
-
diff --git wp-includes/ms-functions.php wp-includes/ms-functions.php
index 1037a9f..ff5780f 100644
|
|
function upload_is_file_too_big( $upload ) { |
1580 | 1580 | function signup_nonce_fields() { |
1581 | 1581 | $id = mt_rand(); |
1582 | 1582 | echo "<input type='hidden' name='signup_form_id' value='{$id}' />"; |
1583 | | wp_nonce_field('signup_form_' . $id, '_signup_form', false); |
| 1583 | wp_nonce_field( array( 'action' => 'signup_form_' . $id, |
| 1584 | 'name'=> '_signup_form', |
| 1585 | 'referrer' => false ) ); |
1584 | 1586 | } |
1585 | 1587 | |
1586 | 1588 | /** |