Changeset 38033
- Timestamp:
- 07/11/2016 09:49:30 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/css/common.css
r37968 r38033 583 583 font-size: 14px; 584 584 font-weight: 400; 585 line-height: 1; 585 586 } 586 587 -
trunk/src/wp-admin/css/forms.css
r37740 r38033 565 565 } 566 566 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 567 577 input[type="text"].ui-autocomplete-loading, 568 578 input[type="email"].ui-autocomplete-loading { -
trunk/src/wp-admin/includes/ajax-actions.php
r38028 r38033 3811 3811 ob_start(); 3812 3812 $wp_list_table->display(); 3813 $status['count'] = count( $wp_list_table->items ); 3813 3814 $status['items'] = ob_get_clean(); 3814 3815 -
trunk/src/wp-admin/includes/class-wp-plugins-list-table.php
r37961 r38033 340 340 else 341 341 _e( 'You do not appear to have any plugins available at this time.' ); 342 } 343 344 /** 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 342 373 } 343 374 -
trunk/src/wp-admin/js/updates.js
r37976 r38033 1585 1585 var $pluginFilter = $( '#plugin-filter' ), 1586 1586 $bulkActionForm = $( '#bulk-action-form' ), 1587 $filesystemModal = $( '#request-filesystem-credentials-dialog' ); 1587 $filesystemModal = $( '#request-filesystem-credentials-dialog' ), 1588 $pluginSearch = $( '.plugins-php .wp-filter-search' ); 1588 1589 1589 1590 /* … … 1973 1974 * @since 4.6.0 1974 1975 */ 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() { 1976 1977 var $form = $( '#plugin-filter' ).empty(), 1977 1978 data = _.extend( { … … 1988 1989 } 1989 1990 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 } 1991 1994 1992 1995 if ( 'undefined' !== typeof wp.updates.searchRequest ) { … … 2002 2005 }, 500 ) ); 2003 2006 2007 if ( $pluginSearch.length > 0 ) { 2008 $pluginSearch.attr( 'aria-describedby', 'live-search-desc' ); 2009 } 2010 2004 2011 /** 2005 2012 * Handles changes to the plugin search box on the Installed Plugins screen, … … 2008 2015 * @since 4.6.0 2009 2016 */ 2010 $ ( '#plugin-search-input' ).on( 'keyup search', _.debounce( function() {2017 $pluginSearch.on( 'keyup input', _.debounce( function( event ) { 2011 2018 var data = { 2012 2019 _ajax_nonce: wp.updates.ajaxNonce, 2013 s: $( '<p />' ).html( $( this ).val() ).text()2020 s: event.target.value 2014 2021 }; 2022 2023 // Clear on escape. 2024 if ( 'keyup' === event.type && 27 === event.which ) { 2025 event.target.value = ''; 2026 } 2015 2027 2016 2028 if ( wp.updates.searchTerm === data.s ) { … … 2020 2032 } 2021 2033 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 } 2023 2037 2024 2038 if ( 'undefined' !== typeof wp.updates.searchRequest ) { … … 2046 2060 $bulkActionForm.append( response.items ); 2047 2061 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 } 2048 2068 } ); 2049 2069 }, 500 ) ); -
trunk/src/wp-admin/plugins.php
r37914 r38033 372 372 'content' => 373 373 '<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>' . 374 375 '<p>' . sprintf( 375 376 /* translators: %s: WordPress Plugin Directory URL */ -
trunk/src/wp-includes/script-loader.php
r37940 r38033 654 654 'activateImporter' => __( 'Activate importer' ), 655 655 'unknownError' => __( 'An unknown error occured' ), 656 'pluginsFound' => __( 'Number of plugins found: %d' ), 657 'noPluginsFound' => __( 'No plugins found. Try a different search.' ), 656 658 ), 657 659 ) ); -
trunk/tests/qunit/fixtures/updates.js
r37714 r38033 40 40 'activateTheme': 'Activate', 41 41 '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.' 43 45 } 44 46 };
Note: See TracChangeset
for help on using the changeset viewer.