X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/48ab98cb1779cf2088c1351ac3dd3d0da6fb31d3..ac7339a398e6df50f722bc9616291ce5447d8e5e:/wp-admin/widgets.php diff --git a/wp-admin/widgets.php b/wp-admin/widgets.php index f4de378f..1e34d81b 100644 --- a/wp-admin/widgets.php +++ b/wp-admin/widgets.php @@ -13,7 +13,7 @@ require_once( dirname( __FILE__ ) . '/admin.php' ); require_once(ABSPATH . 'wp-admin/includes/widgets.php'); if ( ! current_user_can('edit_theme_options') ) - wp_die( __( 'Cheatin’ uh?' )); + wp_die( __( 'Cheatin’ uh?' ), 403 ); $widgets_access = get_user_setting( 'widgets_access' ); if ( isset($_GET['widgets-access']) ) { @@ -70,12 +70,12 @@ get_current_screen()->add_help_tab( array( get_current_screen()->set_help_sidebar( '

' . __('For more information:') . '

' . - '

' . __('Documentation on Widgets') . '

' . + '

' . __('Documentation on Widgets') . '

' . '

' . __('Support Forums') . '

' ); if ( ! current_theme_supports( 'widgets' ) ) { - wp_die( __( 'The theme you are currently using isn’t widget-aware, meaning that it has no sidebars that you are able to change. For information on making your theme widget-aware, please follow these instructions.' ) ); + wp_die( __( 'The theme you are currently using isn’t widget-aware, meaning that it has no sidebars that you are able to change. For information on making your theme widget-aware, please follow these instructions.' ) ); } // These are the widgets grouped by sidebar @@ -189,7 +189,7 @@ if ( isset($_GET['editwidget']) && $_GET['editwidget'] ) { if ( isset($_GET['addnew']) ) { // Default to the first sidebar $keys = array_keys( $wp_registered_sidebars ); - $sidebar = array_shift( $keys ); + $sidebar = reset( $keys ); if ( isset($_GET['base']) && isset($_GET['num']) ) { // multi-widget // Copy minimal info from an existing instance of this widget to a new instance @@ -310,10 +310,27 @@ $errors = array( require_once( ABSPATH . 'wp-admin/admin-header.php' ); ?>
-

+

+%2$s', + esc_url( add_query_arg( + array( + array( 'autofocus' => array( 'panel' => 'widgets' ) ), + 'return' => urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ) + ), + admin_url( 'customize.php' ) + ) ), + __( 'Manage in Customizer' ) + ); + } +?> +

-

+

@@ -417,7 +434,7 @@ foreach ( $theme_sidebars as $sidebar => $registered_sidebar ) {
-
+