Changeset 38091 for trunk/src/wp-admin/includes/ajax-actions.php
- Timestamp:
- 07/18/2016 01:59:17 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/ajax-actions.php
r38057 r38091 3782 3782 * @since 4.6.0 3783 3783 * 3784 * @global WP_List_Table $wp_list_table Current list table instance. 3785 * @global string $hook_suffix Current admin page. 3786 * @global string $s Search term. 3784 * @global string $s Search term. 3787 3785 */ 3788 3786 function wp_ajax_search_plugins() { 3789 3787 check_ajax_referer( 'updates' ); 3790 3788 3791 global $wp_list_table, $hook_suffix, $s; 3792 $hook_suffix = 'plugins.php'; 3789 $pagenow = isset( $_POST['pagenow'] ) ? sanitize_key( $_POST['pagenow'] ) : ''; 3790 if ( 'plugins-network' === $pagenow || 'plugins' === $pagenow ) { 3791 set_current_screen( $pagenow ); 3792 } 3793 3793 3794 3794 /** @var WP_Plugins_List_Table $wp_list_table */ 3795 $wp_list_table = _get_list_table( 'WP_Plugins_List_Table' ); 3796 $status = array(); 3795 $wp_list_table = _get_list_table( 'WP_Plugins_List_Table', array( 3796 'screen' => get_current_screen(), 3797 ) ); 3798 3799 $status = array(); 3797 3800 3798 3801 if ( ! $wp_list_table->ajax_user_can() ) { … … 3807 3810 ) ), network_admin_url( 'plugins.php', 'relative' ) ); 3808 3811 3809 $ s = sanitize_text_field( $_POST['s'] );3812 $GLOBALS['s'] = wp_unslash( $_POST['s'] ); 3810 3813 3811 3814 $wp_list_table->prepare_items(); … … 3823 3826 * 3824 3827 * @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 3828 */ 3829 3829 function wp_ajax_search_install_plugins() { 3830 3830 check_ajax_referer( 'updates' ); 3831 3831 3832 global $wp_list_table, $hook_suffix; 3833 $hook_suffix = 'plugin-install.php'; 3832 $pagenow = isset( $_POST['pagenow'] ) ? sanitize_key( $_POST['pagenow'] ) : ''; 3833 if ( 'plugin-install-network' === $pagenow || 'plugin-install' === $pagenow ) { 3834 set_current_screen( $pagenow ); 3835 } 3834 3836 3835 3837 /** @var WP_Plugin_Install_List_Table $wp_list_table */ 3836 $wp_list_table = _get_list_table( 'WP_Plugin_Install_List_Table' ); 3837 $status = array(); 3838 $wp_list_table = _get_list_table( 'WP_Plugin_Install_List_Table', array( 3839 'screen' => get_current_screen(), 3840 ) ); 3841 3842 $status = array(); 3838 3843 3839 3844 if ( ! $wp_list_table->ajax_user_can() ) {
Note: See TracChangeset
for help on using the changeset viewer.