From 2163ba94bfd8c1682dad4f28ba2aa6b7e9f67b12 Mon Sep 17 00:00:00 2001
Date: Thu, 22 Jun 2017 04:36:23 +0200
Subject: [PATCH] Fix deprecation info in various docblocks
* Fix incorrect deprecation comment naming the deprecated function as its own alternative
* Fix typo in docblock `@deprecated` tag which meant that deprecation is not indicated on the dev ref website
* Add missing `@deprecated` tags for two functions
* Add missing alternative in @deprecated comment for `wp_get_sites()`
---
src/wp-admin/includes/deprecated.php | 2 +-
src/wp-admin/includes/image-edit.php | 4 ++++
src/wp-admin/includes/ms-deprecated.php | 4 ++--
src/wp-includes/ms-deprecated.php | 2 +-
4 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/wp-admin/includes/deprecated.php b/src/wp-admin/includes/deprecated.php
index a9e0e6f..4832812 100644
|
a
|
b
|
function add_utility_page( $page_title, $menu_title, $capability, $menu_slug, $f |
| 1464 | 1464 | * Replaced with wp_page_reload_on_back_button_js() that also fixes this problem. |
| 1465 | 1465 | * |
| 1466 | 1466 | * @since 4.0.0 |
| 1467 | | * $deprecated 4.6.0 |
| | 1467 | * @deprecated 4.6.0 |
| 1468 | 1468 | * |
| 1469 | 1469 | * @global bool $is_safari |
| 1470 | 1470 | * @global bool $is_chrome |
diff --git a/src/wp-admin/includes/image-edit.php b/src/wp-admin/includes/image-edit.php
index db11b56..d9cf604 100644
|
a
|
b
|
function _image_get_preview_ratio($w, $h) { |
| 380 | 380 | * Returns an image resource. Internal use only. |
| 381 | 381 | * |
| 382 | 382 | * @since 2.9.0 |
| | 383 | * @deprecated 3.5.0 Use WP_Image_Editor::rotate() |
| | 384 | * @see WP_Image_Editor::rotate() |
| 383 | 385 | * |
| 384 | 386 | * @ignore |
| 385 | 387 | * @param resource $img Image resource. |
| … |
… |
function _rotate_image_resource($img, $angle) { |
| 402 | 404 | * Flips an image resource. Internal use only. |
| 403 | 405 | * |
| 404 | 406 | * @since 2.9.0 |
| | 407 | * @deprecated 3.5.0 Use WP_Image_Editor::flip() |
| | 408 | * @see WP_Image_Editor::flip() |
| 405 | 409 | * |
| 406 | 410 | * @ignore |
| 407 | 411 | * @param resource $img Image resource. |
diff --git a/src/wp-admin/includes/ms-deprecated.php b/src/wp-admin/includes/ms-deprecated.php
index 81546bd..4a06e66 100644
|
a
|
b
|
function activate_sitewide_plugin() { |
| 57 | 57 | /** |
| 58 | 58 | * Deprecated functionality for deactivating a network-only plugin. |
| 59 | 59 | * |
| 60 | | * @deprecated 3.0.0 Use deactivate_sitewide_plugin() |
| 61 | | * @see deactivate_sitewide_plugin() |
| | 60 | * @deprecated 3.0.0 Use deactivate_plugin() |
| | 61 | * @see deactivate_plugin() |
| 62 | 62 | */ |
| 63 | 63 | function deactivate_sitewide_plugin( $plugin = false ) { |
| 64 | 64 | _deprecated_function(__FUNCTION__, '3.0.0', 'deactivate_plugin()' ); |
diff --git a/src/wp-includes/ms-deprecated.php b/src/wp-includes/ms-deprecated.php
index 3d06dab..aaee22e 100644
|
a
|
b
|
function get_admin_users_for_domain( $sitedomain = '', $path = '' ) { |
| 444 | 444 | * Return an array of sites for a network or networks. |
| 445 | 445 | * |
| 446 | 446 | * @since 3.7.0 |
| 447 | | * @deprecated 4.6.0 |
| | 447 | * @deprecated 4.6.0 Use get_sites() |
| 448 | 448 | * @see get_sites() |
| 449 | 449 | * |
| 450 | 450 | * @global wpdb $wpdb WordPress database abstraction object. |