Make WordPress Core

Ticket #37230: 37230.3.diff

File 37230.3.diff, 7.6 KB (added by swissspidy, 9 years ago)

Removes some files that made it into the previous patch by accident

  • src/wp-admin/css/forms.css

    diff --git src/wp-admin/css/forms.css src/wp-admin/css/forms.css
    index f219831..15be606 100644
    p.search-box { 
    564564        margin: 0 4px 0 0;
    565565}
    566566
     567.js.plugins-php .search-box .wp-filter-search {
     568        margin: 0;
     569        width: 280px;
     570        font-size: 16px;
     571        font-weight: 300;
     572        line-height: 1.5;
     573        padding: 3px 5px;
     574        height: 32px;
     575}
     576
    567577input[type="text"].ui-autocomplete-loading,
    568578input[type="email"].ui-autocomplete-loading {
    569579        background-image: url(../images/loading.gif);
  • src/wp-admin/includes/ajax-actions.php

    diff --git src/wp-admin/includes/ajax-actions.php src/wp-admin/includes/ajax-actions.php
    index c16f338..5e04365 100644
    function wp_ajax_search_plugins() { 
    38103810
    38113811        ob_start();
    38123812        $wp_list_table->display();
     3813        $status['count'] = count( $wp_list_table->items );
    38133814        $status['items'] = ob_get_clean();
    38143815
    38153816        wp_send_json_success( $status );
  • src/wp-admin/includes/class-wp-plugins-list-table.php

    diff --git src/wp-admin/includes/class-wp-plugins-list-table.php src/wp-admin/includes/class-wp-plugins-list-table.php
    index c36b77f..ddc1ad2 100644
    class WP_Plugins_List_Table extends WP_List_Table { 
    342342        }
    343343
    344344        /**
     345         * Display the search box.
     346         *
     347         * @since 4.6.0
     348         * @access public
     349         *
     350         * @param string $text The search button text
     351         * @param string $input_id The search input id
     352         */
     353        public function search_box( $text, $input_id ) {
     354                if ( empty( $_REQUEST['s'] ) && ! $this->has_items() ) {
     355                        return;
     356                }
     357
     358                $input_id = $input_id . '-search-input';
     359
     360                if ( ! empty( $_REQUEST['orderby'] ) ) {
     361                        echo '<input type="hidden" name="orderby" value="' . esc_attr( $_REQUEST['orderby'] ) . '" />';
     362                }
     363                if ( ! empty( $_REQUEST['order'] ) ) {
     364                        echo '<input type="hidden" name="order" value="' . esc_attr( $_REQUEST['order'] ) . '" />';
     365                }
     366                ?>
     367                <p class="search-box">
     368                        <label class="screen-reader-text" for="<?php echo $input_id ?>"><?php echo $text; ?>:</label>
     369                        <input type="search" id="<?php echo $input_id ?>" class="wp-filter-search" name="s" value="<?php _admin_search_query(); ?>" placeholder="<?php echo esc_attr( 'Search installed plugins...' ); ?>"/>
     370                        <input type="submit" id="search-submit" class="button hide-if-js" value="<?php echo esc_attr( $text ); ?>">
     371                </p>
     372                <?php
     373        }
     374
     375        /**
    345376         *
    346377         * @global string $status
    347378         * @return array
  • src/wp-admin/js/updates.js

    diff --git src/wp-admin/js/updates.js src/wp-admin/js/updates.js
    index c97c0bb..0de60b5 100644
     
    15841584        $( function() {
    15851585                var $pluginFilter    = $( '#plugin-filter' ),
    15861586                        $bulkActionForm  = $( '#bulk-action-form' ),
    1587                         $filesystemModal = $( '#request-filesystem-credentials-dialog' );
     1587                        $filesystemModal = $( '#request-filesystem-credentials-dialog' ),
     1588                        $pluginSearch    = $( '.plugins-php .wp-filter-search' );
    15881589
    15891590                /*
    15901591                 * Whether a user needs to submit filesystem credentials.
     
    19721973                 *
    19731974                 * @since 4.6.0
    19741975                 */
    1975                 $( 'input.wp-filter-search, .wp-filter input[name="s"]' ).on( 'keyup search', _.debounce( function() {
     1976                $( '.plugin-install-php .wp-filter-search' ).on( 'keyup search', _.debounce( function() {
    19761977                        var $form = $( '#plugin-filter' ).empty(),
    19771978                                data  = _.extend( {
    19781979                                        _ajax_nonce: wp.updates.ajaxNonce,
     
    19871988                                wp.updates.searchTerm = data.s;
    19881989                        }
    19891990
    1990                         history.pushState( null, '', location.href.split( '?' )[0] + '?' + $.param( _.omit( data, '_ajax_nonce' ) ) );
     1991                        if ( history.pushState ) {
     1992                                history.pushState( null, '', location.href.split( '?' )[ 0 ] + '?' + $.param( _.omit( data, '_ajax_nonce' ) ) );
     1993                        }
    19911994
    19921995                        if ( 'undefined' !== typeof wp.updates.searchRequest ) {
    19931996                                wp.updates.searchRequest.abort();
     
    20012004                        } );
    20022005                }, 500 ) );
    20032006
     2007                if ( $pluginSearch.length > 0 ) {
     2008                        $pluginSearch.attr( 'aria-describedby', 'live-search-desc' );
     2009                }
     2010
    20042011                /**
    20052012                 * Handles changes to the plugin search box on the Installed Plugins screen,
    20062013                 * searching the plugin list dynamically.
    20072014                 *
    20082015                 * @since 4.6.0
    20092016                 */
    2010                 $( '#plugin-search-input' ).on( 'keyup search', _.debounce( function() {
     2017                $pluginSearch.on( 'keyup input', _.debounce( function( event ) {
    20112018                        var data = {
    20122019                                _ajax_nonce: wp.updates.ajaxNonce,
    2013                                 s:           $( '<p />' ).html( $( this ).val() ).text()
     2020                                s:           event.target.value
    20142021                        };
    20152022
     2023                        // Clear on escape.
     2024                        if ( 'keyup' === event.type && 27 === event.which ) {
     2025                                event.target.value = '';
     2026                        }
     2027
    20162028                        if ( wp.updates.searchTerm === data.s ) {
    20172029                                return;
    20182030                        } else {
    20192031                                wp.updates.searchTerm = data.s;
    20202032                        }
    20212033
    2022                         history.pushState( null, '', location.href.split( '?' )[0] + '?s=' + data.s );
     2034                        if ( history.pushState ) {
     2035                                history.pushState( null, '', location.href.split( '?' )[ 0 ] + '?s=' + data.s );
     2036                        }
    20232037
    20242038                        if ( 'undefined' !== typeof wp.updates.searchRequest ) {
    20252039                                wp.updates.searchRequest.abort();
     
    20452059                                $( 'body' ).removeClass( 'loading-content' );
    20462060                                $bulkActionForm.append( response.items );
    20472061                                delete wp.updates.searchRequest;
     2062
     2063                                if ( 0 === response.count ) {
     2064                                        wp.a11y.speak( wp.updates.l10n.noPluginsFound );
     2065                                } else {
     2066                                        wp.a11y.speak( wp.updates.l10n.pluginsFound.replace( '%d', response.count ) );
     2067                                }
    20482068                        } );
    20492069                }, 500 ) );
    20502070
  • src/wp-admin/plugins.php

    diff --git src/wp-admin/plugins.php src/wp-admin/plugins.php
    index 6010784..fd90515 100644
    get_current_screen()->add_help_tab( array( 
    371371'title'         => __('Overview'),
    372372'content'       =>
    373373        '<p>' . __('Plugins extend and expand the functionality of WordPress. Once a plugin is installed, you may activate it or deactivate it here.') . '</p>' .
     374        '<p>' . __( 'The search for installed plugins will search for terms in their name, description, or author.' ) . ' <span id="live-search-desc" class="hide-if-no-js">' . __( 'The search results will be updated as you type.' ) . '</span></p>' .
    374375        '<p>' . sprintf(
    375376                /* translators: %s: WordPress Plugin Directory URL */
    376377                __( 'If you would like to see more plugins to choose from, click on the &#8220;Add New&#8221; button and you will be able to browse or search for additional plugins from the <a href="%s" target="_blank">WordPress.org Plugin Directory</a>. Plugins in the WordPress.org Plugin Directory are designed and developed by third parties, and are compatible with the license WordPress uses. Oh, and they&#8217;re free!' ),
  • src/wp-includes/script-loader.php

    diff --git src/wp-includes/script-loader.php src/wp-includes/script-loader.php
    index 3b1e8fa..2945b48 100644
    function wp_default_scripts( &$scripts ) { 
    653653                                'activateTheme'              => is_network_admin() ? __( 'Network Enable' ) : __( 'Activate' ),
    654654                                'activateImporter'           => __( 'Activate importer' ),
    655655                                'unknownError'               => __( 'An unknown error occured' ),
     656                                'pluginsFound'               => __( 'Number of plugins found: %d' ),
     657                                'noPluginsFound'             => __( 'No plugins found. Try a different search.' ),
    656658                        ),
    657659                ) );
    658660
  • tests/qunit/fixtures/updates.js

    diff --git tests/qunit/fixtures/updates.js tests/qunit/fixtures/updates.js
    index 657ef73..d570aa6 100644
    window._wpUpdatesSettings = { 
    3939                'activatePlugin': 'Activate',
    4040                'activateTheme': 'Activate',
    4141                'activateImporter': 'Activate importer',
    42                 'unknownError': 'An unknown error occured'
     42                'unknownError': 'An unknown error occured',
     43                'pluginsFound': 'Number of plugins found: %d',
     44                'noPluginsFound': 'No plugins found. Try a different search.'
    4345        }
    4446};
    4547window._wpUpdatesItemCounts = {