Make WordPress Core

Ticket #42778: 42778.2.patch

File 42778.2.patch, 2.4 KB (added by antonioeatgoat, 7 years ago)

Removed the screen options tab from the widgets page and moved the link near the page title, with the same style of "Manage with Live Preview" button

  • src/wp-admin/includes/class-wp-screen.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    927927                $show_screen = ! empty( $wp_meta_boxes[ $this->id ] ) || $columns || $this->get_option( 'per_page' );
    928928
    929929                switch ( $this->base ) {
    930                         case 'widgets':
    931                                 $nonce                  = wp_create_nonce( 'widgets-access' );
    932                                 $this->_screen_settings = '<p><a id="access-on" href="widgets.php?widgets-access=on&_wpnonce=' . urlencode( $nonce ) . '">' . __( 'Enable accessibility mode' ) . '</a><a id="access-off" href="widgets.php?widgets-access=off&_wpnonce=' . urlencode( $nonce ) . '">' . __( 'Disable accessibility mode' ) . "</a></p>\n";
    933                                 break;
    934930                        case 'post':
    935931                                $expand                 = '<fieldset class="editor-expand hidden"><legend>' . __( 'Additional settings' ) . '</legend><label for="editor-expand-toggle">';
    936932                                $expand                .= '<input type="checkbox" id="editor-expand-toggle"' . checked( get_user_setting( 'editor_expand', 'on' ), 'on', false ) . ' />';
     
    945941                /**
    946942                 * Filters the screen settings text displayed in the Screen Options tab.
    947943                 *
    948                  * This filter is currently only used on the Widgets screen to enable
    949                  * accessibility mode.
    950                  *
    951944                 * @since 3.0.0
    952945                 *
    953946                 * @param string    $screen_settings Screen settings.
  • src/wp-admin/widgets.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    401401}
    402402?>
    403403
     404<?php $nonce = wp_create_nonce( 'widgets-access' ); ?>
     405<a id="access-on" class="page-title-action" href="widgets.php?widgets-access=on&_wpnonce=<?php echo urlencode( $nonce ); ?>"><?php _e( 'Enable accessibility mode' ); ?></a>
     406<a id="access-off" class="page-title-action" href="widgets.php?widgets-access=off&_wpnonce=<?php echo urlencode( $nonce ); ?>"><?php _e( 'Disable accessibility mode' ); ?></a>
     407
    404408<hr class="wp-header-end">
    405409
    406410<?php if ( isset( $_GET['message'] ) && isset( $messages[ $_GET['message'] ] ) ) { ?>