On this page
WP_User_Search::__construct( string $search_term = '', int $page = '', string $role = '' ): WP_User_Search
PHP5 Constructor – Sets up the object properties.
Parameters
$search_termstring Optional-
Search terms string.
Default:
'' $pageint Optional-
Page ID.
Default:
'' $rolestring Optional-
Role name.
Default:
''
Return
Source
File: wp-admin/includes/deprecated.php. View all references
function __construct( $search_term = '', $page = '', $role = '' ) {
_deprecated_function( __FUNCTION__, '3.1.0', 'WP_User_Query' );
$this->search_term = wp_unslash( $search_term );
$this->raw_page = ( '' == $page ) ? false : (int) $page;
$this->page = ( '' == $page ) ? 1 : (int) $page;
$this->role = $role;
$this->prepare_query();
$this->query();
$this->do_paging();
}
Related
Uses
| Uses | Description |
|---|---|
| WP_User_Search::prepare_query() wp-admin/includes/deprecated.php | Prepares the user search query (legacy). |
| WP_User_Search::query() wp-admin/includes/deprecated.php | Executes the user search query. |
| WP_User_Search::do_paging() wp-admin/includes/deprecated.php | Handles paging for the user search query. |
| wp_unslash() wp-includes/formatting.php | Removes slashes from a string or recursively removes slashes from strings within an array. |
| _deprecated_function() wp-includes/functions.php | Marks a function as deprecated and inform when it has been used. |
Used By
| Used By | Description |
|---|---|
| WP_User_Search::WP_User_Search() wp-admin/includes/deprecated.php | PHP4 Constructor – Sets up the object properties. |
Changelog
| Version | Description |
|---|---|
| 2.1.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_user_search/__construct