Make WordPress Core


Ignore:
Timestamp:
05/04/2007 05:52:57 PM (18 years ago)
Author:
ryan
Message:

Do a cap check at the top of widgets since it won't always inherit the menu cap check.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/wp-admin/widgets.php

    r5343 r5386  
    22
    33require_once 'admin.php';
     4
     5if ( ! current_user_can('edit_themes') )
     6    wp_die( __( 'Cheatin’ uh?' ));
    47
    58wp_enqueue_script( 'scriptaculous-effects' );
     
    351354       
    352355            <p class="submit">
    353             <?php
    354                 if ( function_exists( 'wp_nonce_field' ) ) {
    355                     wp_nonce_field( 'widgets-save-widget-order' );
    356                 }
    357             ?>
     356            <?php wp_nonce_field( 'widgets-save-widget-order' ); ?>
    358357                <input type="hidden" name="action" id="action" value="save_widget_order" />
    359358                <input type="submit" value="<?php _e( 'Save Changes &raquo;' ); ?>" />
Note: See TracChangeset for help on using the changeset viewer.