X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/3f5685912e89eb3b0534acd85aa0946b1ca2bbe3..fef8173b8c3bad08f495551e43cfdeac1cae6021:/wp-admin/widgets.php?ds=sidebyside diff --git a/wp-admin/widgets.php b/wp-admin/widgets.php index e28f46ae..4ae5478f 100644 --- a/wp-admin/widgets.php +++ b/wp-admin/widgets.php @@ -7,12 +7,12 @@ */ /** WordPress Administration Bootstrap */ -require_once( 'admin.php' ); +require_once( './admin.php' ); /** WordPress Administration Widgets API */ require_once(ABSPATH . 'wp-admin/includes/widgets.php'); -if ( ! current_user_can('switch_themes') ) +if ( ! current_user_can('edit_theme_options') ) wp_die( __( 'Cheatin’ uh?' )); wp_admin_css( 'widgets' ); @@ -33,6 +33,19 @@ do_action( 'sidebar_admin_setup' ); $title = __( 'Widgets' ); $parent_file = 'themes.php'; +$help = ' +

' . __('Widgets are independent sections of content that can be placed into any widgetized area provided by your theme (commonly called sidebars). To populate your sidebars/widget areas with individual widgets, drag and drop the title bars into the desired area. By default, only the first widget area is expanded. To populate additional widget areas, click on their title bars to expand them.') . '

+

' . __('The Available Widgets section contains all the widgets you can choose from. Once you drag a widget into a sidebar, it will open to allow you to configure its settings. When you are happy with the widget settings, click the Save button and the widget will go live on your site. If you click Delete, it will remove the widget.') . '

+

' . __('If you want to remove the widget but save its setting for possible future use, just drag it into the Inactive Widgets area. You can add them back anytime from there. This is especially helpful when you switch to a theme with fewer or different widget areas.') . '

+

' . __('Widgets may be used multiple times. You can give each widget a title, to display on your site, but it’s not required.') . '

+

' . __('Enabling Accessibility Mode, via Screen Options, allows you to use Add and Edit buttons instead of using drag and drop.') . '

+

' . __('Many themes show some sidebar widgets by default until you edit your sidebars, but they are not automatically displayed in your sidebar management tool. After you make your first widget change, you can re-add the default widgets by adding them from the Available Widgets area.') . '

+'; +$help .= '

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

'; +$help .= '

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

'; +$help .= '

' . __('Support Forums') . '

'; +add_contextual_help($current_screen, $help); + // register the inactive_widgets area as sidebar register_sidebar(array( 'name' => __('Inactive Widgets'), @@ -120,7 +133,7 @@ retrieve_widgets(); if ( count($wp_registered_sidebars) == 1 ) { // If only "wp_inactive_widgets" is defined the theme has no sidebars, die. - require_once( 'admin-header.php' ); + require_once( './admin-header.php' ); ?>
@@ -133,7 +146,7 @@ if ( count($wp_registered_sidebars) == 1 ) {
+ require_once( './admin-header.php' ); ?>

@@ -279,7 +292,7 @@ if ( isset($_GET['editwidget']) && $_GET['editwidget'] ) { } $selected = ''; echo "\t\t - - + @@ -309,7 +324,7 @@ if ( isset($_GET['editwidget']) && $_GET['editwidget'] ) {
+require_once( './admin-header.php' ); ?>

-

+

+ +
@@ -355,7 +372,7 @@ require_once( 'admin-header.php' ); ?> +

@@ -377,7 +394,7 @@ foreach ( $wp_registered_sidebars as $sidebar => $registered_sidebar ) { +
$registered_sidebar ) {