WordPress 4.7
[autoinstalls/wordpress.git] / wp-admin / widgets.php
index 3b43ac06d2ae1e5775f9349d74b7ecc2992491b9..e1ae09132fe4a978d6f81b0906db06dab98aabe3 100644 (file)
@@ -15,7 +15,7 @@ require_once(ABSPATH . 'wp-admin/includes/widgets.php');
 if ( ! current_user_can( 'edit_theme_options' ) ) {
        wp_die(
                '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
 if ( ! current_user_can( 'edit_theme_options' ) ) {
        wp_die(
                '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
-               '<p>' . __( 'You are not allowed to edit theme options on this site.' ) . '</p>',
+               '<p>' . __( 'Sorry, you are not allowed to edit theme options on this site.' ) . '</p>',
                403
        );
 }
                403
        );
 }
@@ -71,8 +71,8 @@ get_current_screen()->add_help_tab( array(
 
 get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
 
 get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
-       '<p>' . __('<a href="https://codex.wordpress.org/Appearance_Widgets_Screen" target="_blank">Documentation on Widgets</a>') . '</p>' .
-       '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
+       '<p>' . __('<a href="https://codex.wordpress.org/Appearance_Widgets_Screen">Documentation on Widgets</a>') . '</p>' .
+       '<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
 );
 
 if ( ! current_theme_supports( 'widgets' ) ) {
 );
 
 if ( ! current_theme_supports( 'widgets' ) ) {
@@ -315,9 +315,9 @@ if ( isset($_GET['editwidget']) && $_GET['editwidget'] ) {
        <a href="widgets.php" class="button alignleft"><?php _e('Cancel'); ?></a>
 <?php
        } else {
        <a href="widgets.php" class="button alignleft"><?php _e('Cancel'); ?></a>
 <?php
        } else {
-               submit_button( __( 'Delete' ), 'button alignleft', 'removewidget', false );
+               submit_button( __( 'Delete' ), 'alignleft', 'removewidget', false );
        }
        }
-       submit_button( __( 'Save Widget' ), 'button-primary alignright', 'savewidget', false ); ?>
+       submit_button( __( 'Save Widget' ), 'primary alignright', 'savewidget', false ); ?>
        <input type="hidden" name="widget-id" class="widget-id" value="<?php echo esc_attr($widget_id); ?>" />
        <input type="hidden" name="id_base" class="id_base" value="<?php echo esc_attr($id_base); ?>" />
        <input type="hidden" name="multi_number" class="multi_number" value="<?php echo esc_attr($multi_number); ?>" />
        <input type="hidden" name="widget-id" class="widget-id" value="<?php echo esc_attr($widget_id); ?>" />
        <input type="hidden" name="id_base" class="id_base" value="<?php echo esc_attr($id_base); ?>" />
        <input type="hidden" name="multi_number" class="multi_number" value="<?php echo esc_attr($multi_number); ?>" />
@@ -357,7 +357,7 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' ); ?>
                                ),
                                admin_url( 'customize.php' )
                        ) ),
                                ),
                                admin_url( 'customize.php' )
                        ) ),
-                       __( 'Manage in Customizer' )
+                       __( 'Manage with Live Preview' )
                );
        }
 ?>
                );
        }
 ?>
@@ -406,10 +406,13 @@ foreach ( $wp_registered_sidebars as $sidebar => $registered_sidebar ) {
                if ( !empty( $registered_sidebar['class'] ) )
                        $wrap_class .= ' ' . $registered_sidebar['class'];
 
                if ( !empty( $registered_sidebar['class'] ) )
                        $wrap_class .= ' ' . $registered_sidebar['class'];
 
+               $is_inactive_widgets = 'wp_inactive_widgets' == $registered_sidebar['id'];
                ?>
                <div class="<?php echo esc_attr( $wrap_class ); ?>">
                        <div class="widget-holder inactive">
                                <?php wp_list_widget_controls( $registered_sidebar['id'], $registered_sidebar['name'] ); ?>
                ?>
                <div class="<?php echo esc_attr( $wrap_class ); ?>">
                        <div class="widget-holder inactive">
                                <?php wp_list_widget_controls( $registered_sidebar['id'], $registered_sidebar['name'] ); ?>
+
+                               <?php if ( $is_inactive_widgets ) { ?>
                                <div class="remove-inactive-widgets">
                                        <form action="" method="post">
                                                <p>
                                <div class="remove-inactive-widgets">
                                        <form action="" method="post">
                                                <p>
@@ -422,13 +425,16 @@ foreach ( $wp_registered_sidebars as $sidebar => $registered_sidebar ) {
 
                                                        submit_button( __( 'Clear Inactive Widgets' ), 'delete', 'removeinactivewidgets', false, $attributes );
                                                        ?>
 
                                                        submit_button( __( 'Clear Inactive Widgets' ), 'delete', 'removeinactivewidgets', false, $attributes );
                                                        ?>
-                                                       <span class="spinner">
+                                                       <span class="spinner"></span>
                                                </p>
                                                <?php wp_nonce_field( 'remove-inactive-widgets', '_wpnonce_remove_inactive_widgets' ); ?>
                                        </form>
                                </div>
                                                </p>
                                                <?php wp_nonce_field( 'remove-inactive-widgets', '_wpnonce_remove_inactive_widgets' ); ?>
                                        </form>
                                </div>
+                               <?php } ?>
                        </div>
                        </div>
+                       <?php if ( $is_inactive_widgets ) { ?>
                        <p class="description"><?php _e( 'This will clear all items from the inactive widgets list. You will not be able to restore any customizations.' ); ?></p>
                        <p class="description"><?php _e( 'This will clear all items from the inactive widgets list. You will not be able to restore any customizations.' ); ?></p>
+                       <?php } ?>
                </div>
                <?php
 
                </div>
                <?php
 
@@ -449,12 +455,12 @@ $sidebars_count = count( $theme_sidebars );
 if ( $sidebars_count > 1 ) {
        $split = ceil( $sidebars_count / 2 );
 } else {
 if ( $sidebars_count > 1 ) {
        $split = ceil( $sidebars_count / 2 );
 } else {
-       $single_sidebar_class = ' class="single-sidebar"';
+       $single_sidebar_class = ' single-sidebar';
 }
 
 ?>
 <div class="widget-liquid-right">
 }
 
 ?>
 <div class="widget-liquid-right">
-<div id="widgets-right"<?php echo $single_sidebar_class; ?>>
+<div id="widgets-right" class="wp-clearfix<?php echo $single_sidebar_class; ?>">
 <div class="sidebars-column-1">
 <?php
 
 <div class="sidebars-column-1">
 <?php
 
@@ -494,8 +500,8 @@ foreach ( $theme_sidebars as $sidebar => $registered_sidebar ) {
 <div class="widgets-chooser">
        <ul class="widgets-chooser-sidebars"></ul>
        <div class="widgets-chooser-actions">
 <div class="widgets-chooser">
        <ul class="widgets-chooser-sidebars"></ul>
        <div class="widgets-chooser-actions">
-               <button class="button-secondary"><?php _e( 'Cancel' ); ?></button>
-               <button class="button-primary"><?php _e( 'Add Widget' ); ?></button>
+               <button class="button widgets-chooser-cancel"><?php _e( 'Cancel' ); ?></button>
+               <button class="button button-primary widgets-chooser-add"><?php _e( 'Add Widget' ); ?></button>
        </div>
 </div>
 
        </div>
 </div>