WP_Plugins_List_Table::_search_callback() WordPress Method

The WP_Plugins_List_Table::_search_callback() method is used to search for plugins based on a user-specified search string. The search string is compared against the plugin names and descriptions, and any plugins that match the search string are returned in a list. The search string is case-insensitive, so a search for "foo" will return any plugin that has "foo" in its name or description.

WP_Plugins_List_Table::_search_callback( array $plugin ) #


Parameters

$plugin

(array)(Required)


Top ↑

Return

(bool)


Top ↑

Source

File: wp-admin/includes/class-wp-plugins-list-table.php

	public function _search_callback( $plugin ) {
		global $s;

		foreach ( $plugin as $value ) {
			if ( is_string( $value ) && false !== stripos( strip_tags( $value ), urldecode( $s ) ) ) {
				return true;
			}
		}

		return false;
	}

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.