diff --git src/wp-admin/js/updates.js src/wp-admin/js/updates.js
index 239829f..aaee9da 100644
|
|
|
2185 | 2185 | */ |
2186 | 2186 | $pluginSearch.on( 'keyup input', _.debounce( function( event ) { |
2187 | 2187 | var data = { |
2188 | | _ajax_nonce: wp.updates.ajaxNonce, |
2189 | | s: event.target.value, |
2190 | | pagenow: pagenow |
2191 | | }; |
| 2188 | _ajax_nonce: wp.updates.ajaxNonce, |
| 2189 | s: event.target.value, |
| 2190 | pagenow: pagenow, |
| 2191 | plugin_status: 'all' |
| 2192 | }, |
| 2193 | queryArgs; |
2192 | 2194 | |
2193 | 2195 | // Clear on escape. |
2194 | 2196 | if ( 'keyup' === event.type && 27 === event.which ) { |
… |
… |
|
2201 | 2203 | wp.updates.searchTerm = data.s; |
2202 | 2204 | } |
2203 | 2205 | |
| 2206 | queryArgs = _.object( _.compact( _.map( location.search.slice( 1 ).split( '&' ), function( item ) { |
| 2207 | if ( item ) return item.split( '=' ); |
| 2208 | } ) ) ); |
| 2209 | |
| 2210 | data.plugin_status = queryArgs.plugin_status || 'all'; |
| 2211 | |
2204 | 2212 | if ( window.history && window.history.replaceState ) { |
2205 | | window.history.replaceState( null, '', location.href.split( '?' )[ 0 ] + '?s=' + data.s ); |
| 2213 | window.history.replaceState( null, '', location.href.split( '?' )[ 0 ] + '?s=' + data.s + '&plugin_status=' + data.plugin_status ); |
2206 | 2214 | } |
2207 | 2215 | |
2208 | 2216 | if ( 'undefined' !== typeof wp.updates.searchRequest ) { |
… |
… |
|
2211 | 2219 | |
2212 | 2220 | $bulkActionForm.empty(); |
2213 | 2221 | $( 'body' ).addClass( 'loading-content' ); |
| 2222 | $( '.subsubsub .current' ).removeClass( 'current' ); |
2214 | 2223 | |
2215 | 2224 | wp.updates.searchRequest = wp.ajax.post( 'search-plugins', data ).done( function( response ) { |
2216 | 2225 | |
… |
… |
|
2220 | 2229 | |
2221 | 2230 | if ( ! data.s.length ) { |
2222 | 2231 | $oldSubTitle.remove(); |
| 2232 | $( '.subsubsub .' + data.plugin_status + ' a' ).addClass( 'current' ); |
2223 | 2233 | } else if ( $oldSubTitle.length ) { |
2224 | 2234 | $oldSubTitle.replaceWith( $subTitle ); |
2225 | 2235 | } else { |