diff --git src/wp-admin/includes/ajax-actions.php src/wp-admin/includes/ajax-actions.php
index 9751bc5..e099f33 100644
|
|
|
function wp_ajax_search_plugins() {
|
| 3822 | 3822 | * Ajax handler for searching plugins to install. |
| 3823 | 3823 | * |
| 3824 | 3824 | * @since 4.6.0 |
| 3825 | | * |
| 3826 | | * @global WP_List_Table $wp_list_table Current list table instance. |
| 3827 | | * @global string $hook_suffix Current admin page. |
| 3828 | 3825 | */ |
| 3829 | 3826 | function wp_ajax_search_install_plugins() { |
| 3830 | 3827 | check_ajax_referer( 'updates' ); |
| 3831 | 3828 | |
| 3832 | | global $wp_list_table, $hook_suffix; |
| 3833 | | $hook_suffix = 'plugin-install.php'; |
| | 3829 | $pagenow = sanitize_text_field( wp_unslash( $_POST['pagenow'] ) ); |
| | 3830 | |
| | 3831 | if ( $pagenow === 'plugin-install-network' || $pagenow === 'plugin-install' ) { |
| | 3832 | set_current_screen( $pagenow ); |
| | 3833 | } |
| 3834 | 3834 | |
| 3835 | 3835 | /** @var WP_Plugin_Install_List_Table $wp_list_table */ |
| 3836 | 3836 | $wp_list_table = _get_list_table( 'WP_Plugin_Install_List_Table' ); |
diff --git src/wp-admin/js/updates.js src/wp-admin/js/updates.js
index 24a8186..9951e26 100644
|
|
|
|
| 1987 | 1987 | _ajax_nonce: wp.updates.ajaxNonce, |
| 1988 | 1988 | s: $( '<p />' ).html( $( this ).val() ).text(), |
| 1989 | 1989 | tab: 'search', |
| 1990 | | type: $( '#typeselector' ).val() |
| | 1990 | type: $( '#typeselector' ).val(), |
| | 1991 | pagenow: pagenow |
| 1991 | 1992 | }, { type: 'term' } ); |
| 1992 | 1993 | |
| 1993 | 1994 | if ( wp.updates.searchTerm === data.s ) { |