mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-09 07:00:01 +00:00
Docs: Add missing method summaries for the deprecated WP_User_Search
class, including prepare_query()
, query()
, prepare_vars_for_template_usage()
, do_paging()
, and get_results()
.
See #32246. Built from https://develop.svn.wordpress.org/trunk@34822 git-svn-id: http://core.svn.wordpress.org/trunk@34787 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1f1c2335ad
commit
3866a8cf58
@ -507,14 +507,12 @@ class WP_User_Search {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@internal Missing Short Description}}
|
* Prepares the user search query (legacy).
|
||||||
*
|
|
||||||
* {@internal Missing Long Description}}
|
|
||||||
*
|
*
|
||||||
* @since 2.1.0
|
* @since 2.1.0
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function prepare_query() {
|
public function prepare_query() {
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
$this->first_user = ($this->page - 1) * $this->users_per_page;
|
$this->first_user = ($this->page - 1) * $this->users_per_page;
|
||||||
|
|
||||||
@ -547,14 +545,12 @@ class WP_User_Search {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@internal Missing Short Description}}
|
* Executes the user search query.
|
||||||
*
|
|
||||||
* {@internal Missing Long Description}}
|
|
||||||
*
|
*
|
||||||
* @since 2.1.0
|
* @since 2.1.0
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function query() {
|
public function query() {
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
|
|
||||||
$this->results = $wpdb->get_col("SELECT DISTINCT($wpdb->users.ID)" . $this->query_from . $this->query_where . $this->query_orderby . $this->query_limit);
|
$this->results = $wpdb->get_col("SELECT DISTINCT($wpdb->users.ID)" . $this->query_from . $this->query_where . $this->query_orderby . $this->query_limit);
|
||||||
@ -566,9 +562,7 @@ class WP_User_Search {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@internal Missing Short Description}}
|
* Prepares variables for use in templates.
|
||||||
*
|
|
||||||
* {@internal Missing Long Description}}
|
|
||||||
*
|
*
|
||||||
* @since 2.1.0
|
* @since 2.1.0
|
||||||
* @access public
|
* @access public
|
||||||
@ -576,14 +570,12 @@ class WP_User_Search {
|
|||||||
function prepare_vars_for_template_usage() {}
|
function prepare_vars_for_template_usage() {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@internal Missing Short Description}}
|
* Handles paging for the user search query.
|
||||||
*
|
|
||||||
* {@internal Missing Long Description}}
|
|
||||||
*
|
*
|
||||||
* @since 2.1.0
|
* @since 2.1.0
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function do_paging() {
|
public function do_paging() {
|
||||||
if ( $this->total_users_for_query > $this->users_per_page ) { // have to page the results
|
if ( $this->total_users_for_query > $this->users_per_page ) { // have to page the results
|
||||||
$args = array();
|
$args = array();
|
||||||
if ( ! empty($this->search_term) )
|
if ( ! empty($this->search_term) )
|
||||||
@ -610,16 +602,14 @@ class WP_User_Search {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@internal Missing Short Description}}
|
* Retrieves the user search query results.
|
||||||
*
|
|
||||||
* {@internal Missing Long Description}}
|
|
||||||
*
|
*
|
||||||
* @since 2.1.0
|
* @since 2.1.0
|
||||||
* @access public
|
* @access public
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
function get_results() {
|
public function get_results() {
|
||||||
return (array) $this->results;
|
return (array) $this->results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.4-alpha-34821';
|
$wp_version = '4.4-alpha-34822';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user