Make WordPress Core

Changeset 14148


Ignore:
Timestamp:
04/18/2010 09:23:03 AM (15 years ago)
Author:
dd32
Message:

Move nonces into better locations, Currently nested within the Editor support, which is not always enabled. Props duck_. Fixes #12867

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-form-advanced.php

    r14139 r14148  
    186186<input type="hidden" id="post_type" name="post_type" value="<?php echo esc_attr($post_type) ?>" />
    187187<input type="hidden" id="original_post_status" name="original_post_status" value="<?php echo esc_attr($post->post_status) ?>" />
    188 <input name="referredby" type="hidden" id="referredby" value="<?php echo esc_url(stripslashes(wp_get_referer())); ?>" />
     188<input type="hidden" id="referredby" name="referredby" value="<?php echo esc_url(stripslashes(wp_get_referer())); ?>" />
    189189<?php
    190190if ( 'draft' != $post->post_status )
    191191    wp_original_referer_field(true, 'previous');
    192192
    193 echo $form_extra ?>
     193echo $form_extra;
     194
     195wp_nonce_field( 'autosave', 'autosavenonce', false );
     196wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false );
     197wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
     198?>
    194199
    195200<div id="poststuff" class="metabox-holder<?php echo 2 == $screen_layout_columns ? ' has-right-sidebar' : ''; ?>">
     
    228233?>
    229234</div>
     235<?php
     236wp_nonce_field( 'samplepermalink', 'samplepermalinknonce', false );
     237?>
    230238</div>
    231239<?php } ?>
     
    254262</tr></tbody></table>
    255263
    256 <?php
    257 wp_nonce_field( 'autosave', 'autosavenonce', false );
    258 wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
    259 wp_nonce_field( 'getpermalink', 'getpermalinknonce', false );
    260 wp_nonce_field( 'samplepermalink', 'samplepermalinknonce', false );
    261 wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?>
    262264</div>
    263265
Note: See TracChangeset for help on using the changeset viewer.