X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/af50974463450c98503e763a7836a50e260461a9..fcaa67f093b5c83deea7a361a8cf8c6ac4e832d3:/wp-admin/widgets.php?ds=sidebyside diff --git a/wp-admin/widgets.php b/wp-admin/widgets.php index 222251a1..1e34d81b 100644 --- a/wp-admin/widgets.php +++ b/wp-admin/widgets.php @@ -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 @@ -316,7 +316,13 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' ); ?> if ( current_user_can( 'customize' ) ) { printf( ' %2$s', - admin_url( 'customize.php?autofocus[panel]=widgets' ), + 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' ) ); } @@ -324,7 +330,7 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' ); ?> -

+

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