WordPress.org

Make WordPress Core

Ticket #41121: 0001-docblock-fixes.patch

File 0001-docblock-fixes.patch, 3.1 KB (added by jrf, 3 years ago)

Patch 1

  • src/wp-admin/includes/deprecated.php

    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 
    14641464 * Replaced with wp_page_reload_on_back_button_js() that also fixes this problem.
    14651465 *
    14661466 * @since 4.0.0
    1467  * $deprecated 4.6.0
     1467 * @deprecated 4.6.0
    14681468 *
    14691469 * @global bool $is_safari
    14701470 * @global bool $is_chrome
  • src/wp-admin/includes/image-edit.php

    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) { 
    380380 * Returns an image resource. Internal use only.
    381381 *
    382382 * @since 2.9.0
     383 * @deprecated 3.5.0 Use WP_Image_Editor::rotate()
     384 * @see WP_Image_Editor::rotate()
    383385 *
    384386 * @ignore
    385387 * @param resource  $img   Image resource.
    function _rotate_image_resource($img, $angle) { 
    402404 * Flips an image resource. Internal use only.
    403405 *
    404406 * @since 2.9.0
     407 * @deprecated 3.5.0 Use WP_Image_Editor::flip()
     408 * @see WP_Image_Editor::flip()
    405409 *
    406410 * @ignore
    407411 * @param resource $img  Image resource.
  • src/wp-admin/includes/ms-deprecated.php

    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() { 
    5757/**
    5858 * Deprecated functionality for deactivating a network-only plugin.
    5959 *
    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()
    6262 */
    6363function deactivate_sitewide_plugin( $plugin = false ) {
    6464        _deprecated_function(__FUNCTION__, '3.0.0', 'deactivate_plugin()' );
  • src/wp-includes/ms-deprecated.php

    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 = '' ) { 
    444444 * Return an array of sites for a network or networks.
    445445 *
    446446 * @since 3.7.0
    447  * @deprecated 4.6.0
     447 * @deprecated 4.6.0 Use get_sites()
    448448 * @see get_sites()
    449449 *
    450450 * @global wpdb $wpdb WordPress database abstraction object.