Make WordPress Core

Ticket #41121: 0003-missing-_deprecated_function-calls.patch

File 0003-missing-_deprecated_function-calls.patch, 6.0 KB (added by jrf, 7 years ago)

Patch 3

  • src/wp-admin/includes/ajax-actions.php

    From fbcae372f3e2cf0fd17ff309f2321ef9f9b0e417 Mon Sep 17 00:00:00 2001
    Date: Thu, 22 Jun 2017 00:50:35 +0200
    Subject: [PATCH] Add missing `_deprecated_function()` function calls to
     various functions
    
    * Add missing `_deprecated_function()` call for `funky_javascript_callback()`
    * Add missing `_deprecated_function()` call for `_save_post_hook()`.
    * Add missing `_deprecated_function()` call for `default_topic_count_text()`.
    * Add missing `_deprecated_function()` call for `screen_meta()`.
    * Add missing `_deprecated_function()` call for two screen icon related functions
    * Add missing `_deprecated_function()` call for nine wp_dashboard related functions
    * Add missing `_deprecated_function()` call for `wp_ajax_wp_fullscreen_save_post()`.
    * Add missing `_deprecated_function()` call for `ms_deprecated_blogs_file()`
    ---
     src/wp-admin/includes/ajax-actions.php  |  2 ++
     src/wp-admin/includes/deprecated.php    | 39 +++++++++++++++++++++++++--------
     src/wp-admin/includes/ms-deprecated.php |  4 +++-
     src/wp-includes/deprecated.php          |  6 ++++-
     4 files changed, 40 insertions(+), 11 deletions(-)
    
    diff --git a/src/wp-admin/includes/ajax-actions.php b/src/wp-admin/includes/ajax-actions.php
    index e132ac8..4fc52c4 100644
    a b function wp_ajax_time_format() { 
    23072307 * @deprecated 4.3.0
    23082308 */
    23092309function wp_ajax_wp_fullscreen_save_post() {
     2310        _deprecated_function( __FUNCTION__, '4.3.0' );
     2311
    23102312        $post_id = isset( $_POST['post_ID'] ) ? (int) $_POST['post_ID'] : 0;
    23112313
    23122314        $post = null;
  • src/wp-admin/includes/deprecated.php

    diff --git a/src/wp-admin/includes/deprecated.php b/src/wp-admin/includes/deprecated.php
    index a9e0e6f..b0a7eae 100644
    a b function screen_options( $screen ) { 
    842842 * @see WP_Screen::render_screen_meta()
    843843 */
    844844function screen_meta( $screen ) {
     845        _deprecated_function( __FUNCTION__, '3.3.0', '$current_screen->render_screen_meta()' );
    845846        $current_screen = get_current_screen();
    846847        $current_screen->render_screen_meta();
    847848}
    function the_attachment_links( $id = false ) { 
    12151216 * @see get_screen_icon()
    12161217 */
    12171218function screen_icon() {
     1219        _deprecated_function( __FUNCTION__, '3.8.0' );
    12181220        echo get_screen_icon();
    12191221}
    12201222
    function screen_icon() { 
    12261228 * @return string
    12271229 */
    12281230function get_screen_icon() {
     1231        _deprecated_function( __FUNCTION__, '3.8.0' );
    12291232        return '<!-- Screen icons are no longer used as of WordPress 3.8. -->';
    12301233}
    12311234
    function get_screen_icon() { 
    12351238 * @since 2.5.0
    12361239 * @deprecated 3.8.0
    12371240 */
    1238 function wp_dashboard_incoming_links_output() {}
     1241function wp_dashboard_incoming_links_output() {
     1242        _deprecated_function( __FUNCTION__, '3.8.0' );
     1243}
    12391244
    12401245/**
    12411246 * Deprecated dashboard secondary output.
    12421247 *
    12431248 * @deprecated 3.8.0
    12441249 */
    1245 function wp_dashboard_secondary_output() {}
     1250function wp_dashboard_secondary_output() {
     1251        _deprecated_function( __FUNCTION__, '3.8.0' );
     1252}
    12461253
    12471254/**
    12481255 * Deprecated dashboard widget controls.
    function wp_dashboard_secondary_output() {} 
    12501257 * @since 2.7.0
    12511258 * @deprecated 3.8.0
    12521259 */
    1253 function wp_dashboard_incoming_links() {}
     1260function wp_dashboard_incoming_links() {
     1261        _deprecated_function( __FUNCTION__, '3.8.0' );
     1262}
    12541263
    12551264/**
    12561265 * Deprecated dashboard incoming links control.
    12571266 *
    12581267 * @deprecated 3.8.0
    12591268 */
    1260 function wp_dashboard_incoming_links_control() {}
     1269function wp_dashboard_incoming_links_control() {
     1270        _deprecated_function( __FUNCTION__, '3.8.0' );
     1271}
    12611272
    12621273/**
    12631274 * Deprecated dashboard plugins control.
    12641275 *
    12651276 * @deprecated 3.8.0
    12661277 */
    1267 function wp_dashboard_plugins() {}
     1278function wp_dashboard_plugins() {
     1279        _deprecated_function( __FUNCTION__, '3.8.0' );
     1280}
    12681281
    12691282/**
    12701283 * Deprecated dashboard primary control.
    12711284 *
    12721285 * @deprecated 3.8.0
    12731286 */
    1274 function wp_dashboard_primary_control() {}
     1287function wp_dashboard_primary_control() {
     1288        _deprecated_function( __FUNCTION__, '3.8.0' );
     1289}
    12751290
    12761291/**
    12771292 * Deprecated dashboard recent comments control.
    12781293 *
    12791294 * @deprecated 3.8.0
    12801295 */
    1281 function wp_dashboard_recent_comments_control() {}
     1296function wp_dashboard_recent_comments_control() {
     1297        _deprecated_function( __FUNCTION__, '3.8.0' );
     1298}
    12821299
    12831300/**
    12841301 * Deprecated dashboard secondary section.
    12851302 *
    12861303 * @deprecated 3.8.0
    12871304 */
    1288 function wp_dashboard_secondary() {}
     1305function wp_dashboard_secondary() {
     1306        _deprecated_function( __FUNCTION__, '3.8.0' );
     1307}
    12891308
    12901309/**
    12911310 * Deprecated dashboard secondary control.
    12921311 *
    12931312 * @deprecated 3.8.0
    12941313 */
    1295 function wp_dashboard_secondary_control() {}
     1314function wp_dashboard_secondary_control() {
     1315        _deprecated_function( __FUNCTION__, '3.8.0' );
     1316}
    12961317
    12971318/**
    12981319 * Display plugins text for the WordPress news widget.
  • 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..c4f2abe 100644
    a b function wpmu_get_blog_allowedthemes( $blog_id = 0 ) { 
    102102 *
    103103 * @deprecated 3.5.0
    104104 */
    105 function ms_deprecated_blogs_file() {}
     105function ms_deprecated_blogs_file() {
     106        _deprecated_function( __FUNCTION__, '3.5.0' );
     107}
  • src/wp-includes/deprecated.php

    diff --git a/src/wp-includes/deprecated.php b/src/wp-includes/deprecated.php
    index 027194a..a3ce393 100644
    a b function get_usernumposts( $userid ) { 
    24372437 * @return string An HTML entity
    24382438 */
    24392439function funky_javascript_callback($matches) {
     2440        _deprecated_function( __FUNCTION__, '3.0.0' );
    24402441        return "&#".base_convert($matches[1],16,10).";";
    24412442}
    24422443
    function user_pass_ok($user_login, $user_pass) { 
    32803281 * @since 2.3.0
    32813282 * @deprecated 3.5.0
    32823283 */
    3283 function _save_post_hook() {}
     3284function _save_post_hook() {
     3285        _deprecated_function( __FUNCTION__, '3.5.0' );
     3286}
    32843287
    32853288/**
    32863289 * Check if the installed version of GD supports particular image type
    function rich_edit_exists() { 
    33923395 * @return int Number of topics.
    33933396 */
    33943397function default_topic_count_text( $count ) {
     3398        _deprecated_function( __FUNCTION__, '3.9.0' );
    33953399        return $count;
    33963400}
    33973401