X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/e08b42e8ad054ec67522d7ac1aaae5dc68cb3d01..fc24d733700d6d2bd886ffa9188df5c78069b018:/wp-admin/widgets.php diff --git a/wp-admin/widgets.php b/wp-admin/widgets.php index 8dc99bd3..222251a1 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']) ) { @@ -35,7 +35,8 @@ if ( 'on' == $widgets_access ) { } /** - * Fires early before the Widgets administration screen loads, after scripts are enqueued. + * Fires early before the Widgets administration screen loads, + * after scripts are enqueued. * * @since 2.2.0 */ @@ -70,7 +71,7 @@ get_current_screen()->add_help_tab( array( get_current_screen()->set_help_sidebar( '

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

' . '

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

' . - '

' . __('Support Forums') . '

' + '

' . __('Support Forums') . '

' ); if ( ! current_theme_supports( 'widgets' ) ) { @@ -140,7 +141,7 @@ if ( isset($_POST['savewidget']) || isset($_POST['removewidget']) ) { $id_base = $_POST['id_base']; $sidebar = isset($sidebars_widgets[$sidebar_id]) ? $sidebars_widgets[$sidebar_id] : array(); - // delete + // Delete. if ( isset($_POST['removewidget']) && $_POST['removewidget'] ) { if ( !in_array($widget_id, $sidebar, true) ) { @@ -167,7 +168,7 @@ if ( isset($_POST['savewidget']) || isset($_POST['removewidget']) ) { $sidebars_widgets[$sidebar_id] = $sidebar; - // remove old position + // Remove old position. if ( !isset($_POST['delete_widget']) ) { foreach ( $sidebars_widgets as $key => $sb ) { if ( is_array($sb) ) @@ -223,7 +224,7 @@ if ( isset($_GET['editwidget']) && $_GET['editwidget'] ) { $id_base = isset($control['id_base']) ? $control['id_base'] : $control['id']; - // show the widget form + // Show the widget form. $width = ' style="width:' . max($control['width'], 350) . 'px"'; $key = isset($_GET['key']) ? (int) $_GET['key'] : 0; @@ -309,7 +310,18 @@ $errors = array( require_once( ABSPATH . 'wp-admin/admin-header.php' ); ?>
-

+

+%2$s', + admin_url( 'customize.php?autofocus[panel]=widgets' ), + __( 'Manage in Customizer' ) + ); + } +?> +