WordPress.org

Make WordPress Core

Ticket #50426: 50426.1.diff

File 50426.1.diff, 5.5 KB (added by alishanvr, 16 months ago)

Removed the @staticvar from wp-content, wp-includes and all of their subfolders.

  • wp-admin/includes/class-wp-filesystem-ftpext.php

    From ada01be7605af8c74213c2e8a914cdf822608c97 Mon Sep 17 00:00:00 2001
    From: Ali Shan <alishanvr@gmail.com>
    Date: Sat, 20 Jun 2020 04:21:24 +0500
    Subject: [PATCH] @staticvar removed
    
    ---
     wp-admin/includes/class-wp-filesystem-ftpext.php    | 1 -
     wp-admin/includes/class-wp-list-table.php           | 2 --
     wp-admin/includes/class-wp-ms-themes-list-table.php | 1 -
     wp-admin/includes/deprecated.php                    | 2 --
     wp-admin/includes/media.php                         | 2 --
     wp-admin/includes/screen.php                        | 2 --
     wp-admin/includes/template.php                      | 4 ----
     wp-admin/includes/theme.php                         | 2 --
     wp-admin/includes/widgets.php                       | 2 --
     wp-admin/update-core.php                            | 2 --
     10 files changed, 20 deletions(-)
    
    diff --git a/wp-admin/includes/class-wp-filesystem-ftpext.php b/wp-admin/includes/class-wp-filesystem-ftpext.php
    index d165b2bc3e..cddbd631a2 100644
    a b class WP_Filesystem_FTPext extends WP_Filesystem_Base { 
    581581        }
    582582
    583583        /**
    584          * @staticvar bool $is_windows
    585584         * @param string $line
    586585         * @return array
    587586         */
  • wp-admin/includes/class-wp-list-table.php

    diff --git a/wp-admin/includes/class-wp-list-table.php b/wp-admin/includes/class-wp-list-table.php
    index 7f9ab03c5b..4ecb927e64 100644
    a b class WP_List_Table { 
    11091109         *
    11101110         * @since 3.1.0
    11111111         *
    1112          * @staticvar int $cb_counter
    1113          *
    11141112         * @param bool $with_id Whether to set the id attribute or not
    11151113         */
    11161114        public function print_column_headers( $with_id = true ) {
  • wp-admin/includes/class-wp-ms-themes-list-table.php

    diff --git a/wp-admin/includes/class-wp-ms-themes-list-table.php b/wp-admin/includes/class-wp-ms-themes-list-table.php
    index 96b738608d..d5b285e619 100644
    a b class WP_MS_Themes_List_Table extends WP_List_Table { 
    217217        }
    218218
    219219        /**
    220          * @staticvar string $term
    221220         * @param WP_Theme $theme
    222221         * @return bool
    223222         */
  • wp-admin/includes/deprecated.php

    diff --git a/wp-admin/includes/deprecated.php b/wp-admin/includes/deprecated.php
    index 89d7eec437..e4b84b8e36 100644
    a b function wp_dashboard_quick_press_output() { 
    754754 * @since 2.7.0
    755755 * @deprecated 3.3.0 Use wp_editor()
    756756 * @see wp_editor()
    757  *
    758  * @staticvar int $num
    759757 */
    760758function wp_tiny_mce( $teeny = false, $settings = false ) {
    761759        _deprecated_function( __FUNCTION__, '3.3.0', 'wp_editor()' );
  • wp-admin/includes/media.php

    diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php
    index c02cdcdb73..9ee7556a92 100644
    a b function wp_iframe( $content_func, ...$args ) { 
    616616 *
    617617 * @global int $post_ID
    618618 *
    619  * @staticvar int $instance
    620  *
    621619 * @param string $editor_id
    622620 */
    623621function media_buttons( $editor_id = 'content' ) {
  • wp-admin/includes/screen.php

    diff --git a/wp-admin/includes/screen.php b/wp-admin/includes/screen.php
    index 345bc8b4f2..f675302c75 100644
    a b  
    1111 *
    1212 * @since 2.7.0
    1313 *
    14  * @staticvar array $column_headers
    15  *
    1614 * @param string|WP_Screen $screen The screen you want the headers for
    1715 * @return string[] The column header labels keyed by column ID.
    1816 */
  • wp-admin/includes/template.php

    diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php
    index 5641f061a2..74352dfad5 100644
    a b function list_meta( $meta ) { 
    603603 *
    604604 * @since 2.5.0
    605605 *
    606  * @staticvar string $update_nonce
    607  *
    608606 * @param array $entry
    609607 * @param int   $count
    610608 * @return string
    function _get_plugin_from_callback( $callback ) { 
    12361234 *
    12371235 * @global array $wp_meta_boxes
    12381236 *
    1239  * @staticvar bool $already_sorted
    1240  *
    12411237 * @param string|WP_Screen $screen  The screen identifier. If you have used add_menu_page() or
    12421238 *                                  add_submenu_page() to create a new screen (and hence screen_id)
    12431239 *                                  make sure your menu slug conforms to the limits of sanitize_key()
  • wp-admin/includes/theme.php

    diff --git a/wp-admin/includes/theme.php b/wp-admin/includes/theme.php
    index b6e44ad9ae..1839c939cb 100644
    a b function theme_update_available( $theme ) { 
    162162 *
    163163 * @since 3.8.0
    164164 *
    165  * @staticvar object $themes_update
    166  *
    167165 * @param WP_Theme $theme WP_Theme object.
    168166 * @return string|false HTML for the update link, or false if invalid info was passed.
    169167 */
  • wp-admin/includes/widgets.php

    diff --git a/wp-admin/includes/widgets.php b/wp-admin/includes/widgets.php
    index d3bdf2032c..a74896cc54 100644
    a b function wp_list_widget_controls( $sidebar, $sidebar_name = '' ) { 
    126126 *
    127127 * @global array $wp_registered_widgets
    128128 *
    129  * @staticvar int $i
    130  *
    131129 * @param array $params
    132130 * @return array
    133131 */
  • wp-admin/update-core.php

    diff --git a/wp-admin/update-core.php b/wp-admin/update-core.php
    index 1af08bb9b2..0c4391ea01 100644
    a b if ( ! current_user_can( 'update_core' ) && ! current_user_can( 'update_themes' 
    3131 * @global string $wp_local_package Locale code of the package.
    3232 * @global wpdb   $wpdb             WordPress database abstraction object.
    3333 *
    34  * @staticvar bool $first_pass
    35  *
    3634 * @param object $update
    3735 */
    3836function list_core_update( $update ) {