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
|
b
|
class WP_User_Search { |
| 513 | 513 | * @access public |
| 514 | 514 | */ |
| 515 | 515 | public function prepare_query() { |
| | 516 | _deprecated_function( __METHOD__, '3.1.0', 'WP_User_Query' ); |
| | 517 | |
| 516 | 518 | global $wpdb; |
| 517 | 519 | $this->first_user = ($this->page - 1) * $this->users_per_page; |
| 518 | 520 | |
| … |
… |
class WP_User_Search { |
| 551 | 553 | * @access public |
| 552 | 554 | */ |
| 553 | 555 | public function query() { |
| | 556 | _deprecated_function( __METHOD__, '3.1.0', 'WP_User_Query' ); |
| | 557 | |
| 554 | 558 | global $wpdb; |
| 555 | 559 | |
| 556 | 560 | $this->results = $wpdb->get_col("SELECT DISTINCT($wpdb->users.ID)" . $this->query_from . $this->query_where . $this->query_orderby . $this->query_limit); |
| … |
… |
class WP_User_Search { |
| 567 | 571 | * @since 2.1.0 |
| 568 | 572 | * @access public |
| 569 | 573 | */ |
| 570 | | function prepare_vars_for_template_usage() {} |
| | 574 | function prepare_vars_for_template_usage() { |
| | 575 | _deprecated_function( __METHOD__, '3.1.0', 'WP_User_Query' ); |
| | 576 | } |
| 571 | 577 | |
| 572 | 578 | /** |
| 573 | 579 | * Handles paging for the user search query. |
| … |
… |
class WP_User_Search { |
| 576 | 582 | * @access public |
| 577 | 583 | */ |
| 578 | 584 | public function do_paging() { |
| | 585 | _deprecated_function( __METHOD__, '3.1.0', 'WP_User_Query' ); |
| | 586 | |
| 579 | 587 | if ( $this->total_users_for_query > $this->users_per_page ) { // have to page the results |
| 580 | 588 | $args = array(); |
| 581 | 589 | if ( ! empty($this->search_term) ) |
| … |
… |
class WP_User_Search { |
| 610 | 618 | * @return array |
| 611 | 619 | */ |
| 612 | 620 | public function get_results() { |
| | 621 | _deprecated_function( __METHOD__, '3.1.0', 'WP_User_Query' ); |
| | 622 | |
| 613 | 623 | return (array) $this->results; |
| 614 | 624 | } |
| 615 | 625 | |
| … |
… |
class WP_User_Search { |
| 622 | 632 | * @access public |
| 623 | 633 | */ |
| 624 | 634 | function page_links() { |
| | 635 | _deprecated_function( __METHOD__, '3.1.0', 'WP_User_Query' ); |
| | 636 | |
| 625 | 637 | echo $this->paging_text; |
| 626 | 638 | } |
| 627 | 639 | |
| … |
… |
class WP_User_Search { |
| 636 | 648 | * @return bool |
| 637 | 649 | */ |
| 638 | 650 | function results_are_paged() { |
| | 651 | _deprecated_function( __METHOD__, '3.1.0', 'WP_User_Query' ); |
| | 652 | |
| 639 | 653 | if ( $this->paging_text ) |
| 640 | 654 | return true; |
| 641 | 655 | return false; |
| … |
… |
class WP_User_Search { |
| 650 | 664 | * @return bool |
| 651 | 665 | */ |
| 652 | 666 | function is_search() { |
| | 667 | _deprecated_function( __METHOD__, '3.1.0', 'WP_User_Query' ); |
| | 668 | |
| 653 | 669 | if ( $this->search_term ) |
| 654 | 670 | return true; |
| 655 | 671 | 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
|
b
|
class WP_Customize_Image_Control extends WP_Customize_Upload_Control { |
| 46 | 46 | * @since 3.4.2 |
| 47 | 47 | * @deprecated 4.1.0 |
| 48 | 48 | */ |
| 49 | | public function prepare_control() {} |
| | 49 | public function prepare_control() { |
| | 50 | _deprecated_function( __METHOD__, '4.1.0' ); |
| | 51 | } |
| 50 | 52 | |
| 51 | 53 | /** |
| 52 | 54 | * @since 3.4.0 |
| … |
… |
class WP_Customize_Image_Control extends WP_Customize_Upload_Control { |
| 56 | 58 | * @param string $label |
| 57 | 59 | * @param mixed $callback |
| 58 | 60 | */ |
| 59 | | public function add_tab( $id, $label, $callback ) {} |
| | 61 | public function add_tab( $id, $label, $callback ) { |
| | 62 | _deprecated_function( __METHOD__, '4.1.0' ); |
| | 63 | } |
| 60 | 64 | |
| 61 | 65 | /** |
| 62 | 66 | * @since 3.4.0 |
| … |
… |
class WP_Customize_Image_Control extends WP_Customize_Upload_Control { |
| 64 | 68 | * |
| 65 | 69 | * @param string $id |
| 66 | 70 | */ |
| 67 | | public function remove_tab( $id ) {} |
| | 71 | public function remove_tab( $id ) { |
| | 72 | _deprecated_function( __METHOD__, '4.1.0' ); |
| | 73 | } |
| 68 | 74 | |
| 69 | 75 | /** |
| 70 | 76 | * @since 3.4.0 |
| … |
… |
class WP_Customize_Image_Control extends WP_Customize_Upload_Control { |
| 73 | 79 | * @param string $url |
| 74 | 80 | * @param string $thumbnail_url |
| 75 | 81 | */ |
| 76 | | public function print_tab_image( $url, $thumbnail_url = null ) {} |
| | 82 | public function print_tab_image( $url, $thumbnail_url = null ) { |
| | 83 | _deprecated_function( __METHOD__, '4.1.0' ); |
| | 84 | } |
| 77 | 85 | } |