From 7409cfcfe34ce0a414554bf12055b0d908ffe90b Mon Sep 17 00:00:00 2001
Date: Thu, 22 Jun 2017 00:57:37 +0200
Subject: [PATCH] Add missing `_deprecated_function()` calls to various
 deprecated class methods

* Add `_deprecated_function()` calls to all methods within the deprecated WP_User_Search class.
* Add missing `_deprecated_function()` call for four methods in WP_Customize_Image_Control
---
 src/wp-admin/includes/deprecated.php                   | 18 +++++++++++++++++-
 .../customize/class-wp-customize-image-control.php     | 16 ++++++++++++----
 2 files changed, 29 insertions(+), 5 deletions(-)

diff --git a/src/wp-admin/includes/deprecated.php b/src/wp-admin/includes/deprecated.php
index a9e0e6f..e11f919 100644
--- a/src/wp-admin/includes/deprecated.php
+++ b/src/wp-admin/includes/deprecated.php
@@ -513,6 +513,8 @@ class WP_User_Search {
 	 * @access public
 	 */
 	public function prepare_query() {
+		_deprecated_function( __METHOD__, '3.1.0', 'WP_User_Query' );
+
 		global $wpdb;
 		$this->first_user = ($this->page - 1) * $this->users_per_page;
 
@@ -551,6 +553,8 @@ class WP_User_Search {
 	 * @access public
 	 */
 	public function query() {
+		_deprecated_function( __METHOD__, '3.1.0', 'WP_User_Query' );
+
 		global $wpdb;
 
 		$this->results = $wpdb->get_col("SELECT DISTINCT($wpdb->users.ID)" . $this->query_from . $this->query_where . $this->query_orderby . $this->query_limit);
@@ -567,7 +571,9 @@ class WP_User_Search {
 	 * @since 2.1.0
 	 * @access public
 	 */
-	function prepare_vars_for_template_usage() {}
+	function prepare_vars_for_template_usage() {
+		_deprecated_function( __METHOD__, '3.1.0', 'WP_User_Query' );
+    }
 
 	/**
 	 * Handles paging for the user search query.
@@ -576,6 +582,8 @@ class WP_User_Search {
 	 * @access public
 	 */
 	public function do_paging() {
+		_deprecated_function( __METHOD__, '3.1.0', 'WP_User_Query' );
+
 		if ( $this->total_users_for_query > $this->users_per_page ) { // have to page the results
 			$args = array();
 			if ( ! empty($this->search_term) )
@@ -610,6 +618,8 @@ class WP_User_Search {
 	 * @return array
 	 */
 	public function get_results() {
+		_deprecated_function( __METHOD__, '3.1.0', 'WP_User_Query' );
+
 		return (array) $this->results;
 	}
 
@@ -622,6 +632,8 @@ class WP_User_Search {
 	 * @access public
 	 */
 	function page_links() {
+		_deprecated_function( __METHOD__, '3.1.0', 'WP_User_Query' );
+
 		echo $this->paging_text;
 	}
 
@@ -636,6 +648,8 @@ class WP_User_Search {
 	 * @return bool
 	 */
 	function results_are_paged() {
+		_deprecated_function( __METHOD__, '3.1.0', 'WP_User_Query' );
+
 		if ( $this->paging_text )
 			return true;
 		return false;
@@ -650,6 +664,8 @@ class WP_User_Search {
 	 * @return bool
 	 */
 	function is_search() {
+		_deprecated_function( __METHOD__, '3.1.0', 'WP_User_Query' );
+
 		if ( $this->search_term )
 			return true;
 		return false;
diff --git a/src/wp-includes/customize/class-wp-customize-image-control.php b/src/wp-includes/customize/class-wp-customize-image-control.php
index ffb89e3..a669454 100644
--- a/src/wp-includes/customize/class-wp-customize-image-control.php
+++ b/src/wp-includes/customize/class-wp-customize-image-control.php
@@ -46,7 +46,9 @@ class WP_Customize_Image_Control extends WP_Customize_Upload_Control {
 	 * @since 3.4.2
 	 * @deprecated 4.1.0
 	 */
-	public function prepare_control() {}
+	public function prepare_control() {
+		_deprecated_function( __METHOD__, '4.1.0' );
+    }
 
 	/**
 	 * @since 3.4.0
@@ -56,7 +58,9 @@ class WP_Customize_Image_Control extends WP_Customize_Upload_Control {
 	 * @param string $label
 	 * @param mixed $callback
 	 */
-	public function add_tab( $id, $label, $callback ) {}
+	public function add_tab( $id, $label, $callback ) {
+		_deprecated_function( __METHOD__, '4.1.0' );
+    }
 
 	/**
 	 * @since 3.4.0
@@ -64,7 +68,9 @@ class WP_Customize_Image_Control extends WP_Customize_Upload_Control {
 	 *
 	 * @param string $id
 	 */
-	public function remove_tab( $id ) {}
+	public function remove_tab( $id ) {
+		_deprecated_function( __METHOD__, '4.1.0' );
+    }
 
 	/**
 	 * @since 3.4.0
@@ -73,5 +79,7 @@ class WP_Customize_Image_Control extends WP_Customize_Upload_Control {
 	 * @param string $url
 	 * @param string $thumbnail_url
 	 */
-	public function print_tab_image( $url, $thumbnail_url = null ) {}
+	public function print_tab_image( $url, $thumbnail_url = null ) {
+		_deprecated_function( __METHOD__, '4.1.0' );
+    }
 }
-- 
2.10.1.windows.1

