X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/5964d2279dc52bdfe105f9bfa17e04337d47a3fa..245e789b234afa4525862e7a6e5e3c2e7a52ef20:/wp-admin/widgets.php diff --git a/wp-admin/widgets.php b/wp-admin/widgets.php index 3e0b1462..9383d743 100644 --- a/wp-admin/widgets.php +++ b/wp-admin/widgets.php @@ -7,7 +7,7 @@ */ /** WordPress Administration Bootstrap */ -require_once( './admin.php' ); +require_once( dirname( __FILE__ ) . '/admin.php' ); /** WordPress Administration Widgets API */ require_once(ABSPATH . 'wp-admin/includes/widgets.php'); @@ -34,6 +34,12 @@ if ( 'on' == $widgets_access ) { wp_enqueue_script( 'jquery-touch-punch' ); } +/** + * Fires early before the Widgets administration screen loads, + * after scripts are enqueued. + * + * @since 2.2.0 + */ do_action( 'sidebar_admin_setup' ); $title = __( 'Widgets' ); @@ -65,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' ) ) { @@ -182,7 +188,8 @@ if ( isset($_GET['editwidget']) && $_GET['editwidget'] ) { if ( isset($_GET['addnew']) ) { // Default to the first sidebar - $sidebar = array_shift( $keys = array_keys($wp_registered_sidebars) ); + $keys = array_keys( $wp_registered_sidebars ); + $sidebar = array_shift( $keys ); if ( isset($_GET['base']) && isset($_GET['num']) ) { // multi-widget // Copy minimal info from an existing instance of this widget to a new instance @@ -221,9 +228,8 @@ if ( isset($_GET['editwidget']) && $_GET['editwidget'] ) { $width = ' style="width:' . max($control['width'], 350) . 'px"'; $key = isset($_GET['key']) ? (int) $_GET['key'] : 0; - require_once( './admin-header.php' ); ?> + require_once( ABSPATH . 'wp-admin/admin-header.php' ); ?>
-

>

@@ -288,7 +294,7 @@ if ( isset($_GET['editwidget']) && $_GET['editwidget'] ) {
+require_once( ABSPATH . 'wp-admin/admin-header.php' ); ?>
-

@@ -314,78 +319,102 @@ require_once( './admin-header.php' ); ?>

- +
-
-

-
- + +

-
+
+ +
+ +
+

$registered_sidebar ) { if ( false !== strpos( $registered_sidebar['class'], 'inactive-sidebar' ) || 'orphaned_widgets' == substr( $sidebar, 0, 16 ) ) { $wrap_class = 'widgets-holder-wrap'; if ( !empty( $registered_sidebar['class'] ) ) $wrap_class .= ' ' . $registered_sidebar['class']; -?> - + ?>
-
- +
- +?>
+ 1 ) { + $split = ceil( $sidebars_count / 2 ); +} else { + $single_sidebar_class = ' class="single-sidebar"'; +} + +?>
-
+
> +
@@ -394,6 +423,20 @@ foreach ( $wp_registered_sidebars as $sidebar => $registered_sidebar ) {
+
+
    +
    + + +
    +
    +