WordPress.org

Make WordPress Core

Ticket #47632: 47632.2.diff

File 47632.2.diff, 39.8 KB (added by pento, 5 months ago)
  • phpcs.xml.dist

    diff --git a/phpcs.xml.dist b/phpcs.xml.dist
    index 4a37fd55de..6854f1ddea 100644
    a b  
    2626                                <element value="authorAndUri"/>
    2727                                <element value="Name"/>
    2828                                <element value="Version"/>
    29                                 <!-- From the result of wp_xmlrpc_server::wp_getPageList() -->
     29                                <!-- From the result of WP_XMLRPC_Server::wp_getPageList() -->
    3030                                <element value="dateCreated"/>
    3131
    3232                                <!-- From DOMDocument -->
     
    182182                <exclude-pattern>/src/wp-content/themes/twentyfourteen/taxonomy-post_format\.php</exclude-pattern>
    183183        </rule>
    184184
     185        <rule ref="WordPress.Files.FileName.InvalidClassFileName">
     186                <exclude-pattern>/src/wp-admin/includes/class-wp-list-table-compat\.php</exclude-pattern>
     187                <exclude-pattern>/src/wp-includes/class-wp-dependency\.php</exclude-pattern>
     188        </rule>
     189        <rule ref="PEAR.NamingConventions.ValidClassName.StartWithCapital">
     190                <exclude-pattern>/src/wp-admin/includes/class-wp-list-table-compat\.php</exclude-pattern>
     191                <exclude-pattern>/src/wp-includes/class-wp-dependency\.php</exclude-pattern>
     192                <exclude-pattern>/src/wp-includes/class-wp-editor\.php</exclude-pattern>
     193        </rule>
     194
    185195        <!-- Whitelist test classes for select sniffs. -->
    186196        <rule ref="WordPress.Files.FileName">
    187197                <properties>
  • src/wp-admin/includes/ajax-actions.php

    diff --git a/src/wp-admin/includes/ajax-actions.php b/src/wp-admin/includes/ajax-actions.php
    index 4b91154c09..12127ca9ad 100644
    a b function wp_ajax_parse_embed() { 
    34233423                        wp_send_json_error();
    34243424                }
    34253425                setup_postdata( $post );
    3426         } elseif ( ! current_user_can( 'edit_posts' ) ) { // See WP_oEmbed_Controller::get_proxy_item_permissions_check().
     3426        } elseif ( ! current_user_can( 'edit_posts' ) ) { // See WP_OEmbed_Controller::get_proxy_item_permissions_check().
    34273427                wp_send_json_error();
    34283428        }
    34293429
  • src/wp-admin/includes/class-wp-filesystem-ftpsockets.php

    diff --git a/src/wp-admin/includes/class-wp-filesystem-ftpsockets.php b/src/wp-admin/includes/class-wp-filesystem-ftpsockets.php
    index 0482663a65..275bab071e 100644
    a b  
    1313 *
    1414 * @see WP_Filesystem_Base
    1515 */
    16 class WP_Filesystem_ftpsockets extends WP_Filesystem_Base {
     16class WP_Filesystem_FTPsockets extends WP_Filesystem_Base {
    1717
    1818        /**
    1919         * @since 2.5.0
  • src/wp-includes/class-oembed.php

    diff --git a/src/wp-includes/class-oembed.php b/src/wp-includes/class-oembed.php
    index dd3e5687f0..3a8cb230dc 100644
    a b  
    1616 *
    1717 * @since 2.9.0
    1818 */
    19 class WP_oEmbed {
     19class WP_OEmbed {
    2020
    2121        /**
    2222         * A list of oEmbed providers.
    class WP_oEmbed { 
    245245         *
    246246         * @since 4.0.0
    247247         *
    248          * @see WP_oEmbed::discover()
     248         * @see WP_OEmbed::discover()
    249249         *
    250250         * @param string        $url  The URL to the content.
    251251         * @param string|array  $args Optional provider arguments.
    class WP_oEmbed { 
    334334        /**
    335335         * Takes a URL and attempts to return the oEmbed data.
    336336         *
    337          * @see WP_oEmbed::fetch()
     337         * @see WP_OEmbed::fetch()
    338338         *
    339339         * @since 4.8.0
    340340         *
    class WP_oEmbed { 
    363363        /**
    364364         * The do-it-all function that takes a URL and attempts to return the HTML.
    365365         *
    366          * @see WP_oEmbed::fetch()
    367          * @see WP_oEmbed::data2html()
     366         * @see WP_OEmbed::fetch()
     367         * @see WP_OEmbed::data2html()
    368368         *
    369369         * @since 2.9.0
    370370         *
    class WP_oEmbed { 
    649649        }
    650650
    651651        /**
    652          * Converts a data object from WP_oEmbed::fetch() and returns the HTML.
     652         * Converts a data object from WP_OEmbed::fetch() and returns the HTML.
    653653         *
    654654         * @since 2.9.0
    655655         *
    class WP_oEmbed { 
    715715         * @since 3.0.0
    716716         *
    717717         * @param string $html Existing HTML.
    718          * @param object $data Data object from WP_oEmbed::data2html()
     718         * @param object $data Data object from WP_OEmbed::data2html()
    719719         * @param string $url The original URL passed to oEmbed.
    720720         * @return string Possibly modified $html
    721721         */
  • src/wp-includes/class-wp-embed.php

    diff --git a/src/wp-includes/class-wp-embed.php b/src/wp-includes/class-wp-embed.php
    index c8aec5a006..1609716d1d 100644
    a b class WP_Embed { 
    130130         *
    131131         * Attempts to convert a URL into embed HTML. Starts by checking the URL against the regex of
    132132         * the registered embed handlers. If none of the regex matches and it's enabled, then the URL
    133          * will be given to the WP_oEmbed class.
     133         * will be given to the WP_OEmbed class.
    134134         *
    135135         * @param array $attr {
    136136         *     Shortcode attributes. Optional.
    class WP_Embed { 
    263263                 * @since 2.9.0
    264264                 * @since 4.4.0 The default value changed to true.
    265265                 *
    266                  * @see WP_oEmbed::discover()
     266                 * @see WP_OEmbed::discover()
    267267                 *
    268268                 * @param bool $enable Whether to enable `<link>` tag discovery. Default true.
    269269                 */
  • src/wp-includes/class-wp-oembed-controller.php

    diff --git a/src/wp-includes/class-wp-oembed-controller.php b/src/wp-includes/class-wp-oembed-controller.php
    index 2b08516894..7a6a32d27c 100644
    a b  
    11<?php
    22/**
    3  * WP_oEmbed_Controller class, used to provide an oEmbed endpoint.
     3 * WP_OEmbed_Controller class, used to provide an oEmbed endpoint.
    44 *
    55 * @package WordPress
    66 * @subpackage Embeds
     
    1515 *
    1616 * @since 4.4.0
    1717 */
    18 final class WP_oEmbed_Controller {
     18final class WP_OEmbed_Controller {
    1919        /**
    2020         * Register the oEmbed REST API route.
    2121         *
    final class WP_oEmbed_Controller { 
    155155         *
    156156         * @since 4.8.0
    157157         *
    158          * @see WP_oEmbed::get_html()
     158         * @see WP_OEmbed::get_html()
    159159         * @param WP_REST_Request $request Full data about the request.
    160160         * @return object|WP_Error oEmbed response data or WP_Error on failure.
    161161         */
    final class WP_oEmbed_Controller { 
    173173                $url = $request['url'];
    174174                unset( $args['url'] );
    175175
    176                 // Copy maxwidth/maxheight to width/height since WP_oEmbed::fetch() uses these arg names.
     176                // Copy maxwidth/maxheight to width/height since WP_OEmbed::fetch() uses these arg names.
    177177                if ( isset( $args['maxwidth'] ) ) {
    178178                        $args['width'] = $args['maxwidth'];
    179179                }
  • src/wp-includes/class-wp-text-diff-renderer-inline.php

    diff --git a/src/wp-includes/class-wp-text-diff-renderer-inline.php b/src/wp-includes/class-wp-text-diff-renderer-inline.php
    index 62a33033e3..ff70501990 100644
    a b  
    11<?php
    22/**
    3  * Diff API: WP_Text_Diff_Renderer_inline class
     3 * Diff API: WP_Text_Diff_Renderer_Inline class
    44 *
    55 * @package WordPress
    66 * @subpackage Diff
     
    1313 * @since 2.6.0
    1414 * @uses Text_Diff_Renderer_inline Extends
    1515 */
    16 class WP_Text_Diff_Renderer_inline extends Text_Diff_Renderer_inline {
     16class WP_Text_Diff_Renderer_Inline extends Text_Diff_Renderer_inline {
    1717
    1818        /**
    1919         * @ignore
  • src/wp-includes/class-wp-text-diff-renderer-table.php

    diff --git a/src/wp-includes/class-wp-text-diff-renderer-table.php b/src/wp-includes/class-wp-text-diff-renderer-table.php
    index e4e06a43b4..17d736ee75 100644
    a b class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer { 
    4343         * @var string
    4444         * @since 2.6.0
    4545         */
    46         protected $inline_diff_renderer = 'WP_Text_Diff_Renderer_inline';
     46        protected $inline_diff_renderer = 'WP_Text_Diff_Renderer_Inline';
    4747
    4848        /**
    4949         * Should we show the split view or not
  • src/wp-includes/class-wp-xmlrpc-server.php

    diff --git a/src/wp-includes/class-wp-xmlrpc-server.php b/src/wp-includes/class-wp-xmlrpc-server.php
    index 72aeef2048..b3a957741c 100644
    a b  
    1414 * options, etc.
    1515 *
    1616 * As of WordPress 3.5.0, XML-RPC is enabled by default. It can be disabled
    17  * via the {@see 'xmlrpc_enabled'} filter found in wp_xmlrpc_server::login().
     17 * via the {@see 'xmlrpc_enabled'} filter found in WP_XMLRPC_Server::login().
    1818 *
    1919 * @since 1.5.0
    2020 *
    2121 * @see IXR_Server
    2222 */
    23 class wp_xmlrpc_server extends IXR_Server {
     23class WP_XMLRPC_Server extends IXR_Server {
    2424        /**
    2525         * Methods.
    2626         *
    class wp_xmlrpc_server extends IXR_Server { 
    4343        public $error;
    4444
    4545        /**
    46          * Flags that the user authentication has failed in this instance of wp_xmlrpc_server.
     46         * Flags that the user authentication has failed in this instance of WP_XMLRPC_Server.
    4747         *
    4848         * @var bool
    4949         */
    class wp_xmlrpc_server extends IXR_Server { 
    278278                if ( is_wp_error( $user ) ) {
    279279                        $this->error = new IXR_Error( 403, __( 'Incorrect username or password.' ) );
    280280
    281                         // Flag that authentication has failed once on this wp_xmlrpc_server instance
     281                        // Flag that authentication has failed once on this WP_XMLRPC_Server instance
    282282                        $this->auth_failed = true;
    283283
    284284                        /**
    class wp_xmlrpc_server extends IXR_Server { 
    301301         * Check user's credentials. Deprecated.
    302302         *
    303303         * @since 1.5.0
    304          * @deprecated 2.8.0 Use wp_xmlrpc_server::login()
    305          * @see wp_xmlrpc_server::login()
     304         * @deprecated 2.8.0 Use WP_XMLRPC_Server::login()
     305         * @see WP_XMLRPC_Server::login()
    306306         *
    307307         * @param string $username User's username.
    308308         * @param string $password User's password.
    class wp_xmlrpc_server extends IXR_Server { 
    29852985         *
    29862986         * @since 2.2.0
    29872987         *
    2988          * @see wp_xmlrpc_server::mw_newPost()
     2988         * @see WP_XMLRPC_Server::mw_newPost()
    29892989         *
    29902990         * @param array  $args {
    29912991         *     Method arguments. Note: arguments must be ordered as documented.
    class wp_xmlrpc_server extends IXR_Server { 
    35543554         *     @type string $password
    35553555         *     @type array  $struct
    35563556         * }
    3557          * @return array|IXR_Error Contains a collection of comments. See wp_xmlrpc_server::wp_getComment() for a description of each item contents
     3557         * @return array|IXR_Error Contains a collection of comments. See WP_XMLRPC_Server::wp_getComment() for a description of each item contents
    35583558         */
    35593559        public function wp_getComments( $args ) {
    35603560                $this->escape( $args );
    class wp_xmlrpc_server extends IXR_Server { 
    43074307         *     @type string $password
    43084308         *     @type array  $struct
    43094309         * }
    4310          * @return array|IXR_Error Contains a collection of media items. See wp_xmlrpc_server::wp_getMediaItem() for a description of each item contents
     4310         * @return array|IXR_Error Contains a collection of media items. See WP_XMLRPC_Server::wp_getMediaItem() for a description of each item contents
    43114311         */
    43124312        public function wp_getMediaLibrary( $args ) {
    43134313                $this->escape( $args );
  • src/wp-includes/deprecated.php

    diff --git a/src/wp-includes/deprecated.php b/src/wp-includes/deprecated.php
    index 677a9b5d44..6e2f1f77ab 100644
    a b function default_topic_count_text( $count ) { 
    34103410/**
    34113411 * Formerly used to escape strings before inserting into the DB.
    34123412 *
    3413  * Has not performed this function for many, many years. Use wpdb::prepare() instead.
     3413 * Has not performed this function for many, many years. Use WPDB::prepare() instead.
    34143414 *
    34153415 * @since 0.71
    34163416 * @deprecated 3.9.0
    function format_to_post( $content ) { 
    34273427 * Formerly used to escape strings before searching the DB. It was poorly documented and never worked as described.
    34283428 *
    34293429 * @since 2.5.0
    3430  * @deprecated 4.0.0 Use wpdb::esc_like()
    3431  * @see wpdb::esc_like()
     3430 * @deprecated 4.0.0 Use WPDB::esc_like()
     3431 * @see WPDB::esc_like()
    34323432 *
    34333433 * @param string $text The text to be escaped.
    34343434 * @return string text, safe for inclusion in LIKE query.
    34353435 */
    34363436function like_escape($text) {
    3437         _deprecated_function( __FUNCTION__, '4.0.0', 'wpdb::esc_like()' );
     3437        _deprecated_function( __FUNCTION__, '4.0.0', 'WPDB::esc_like()' );
    34383438        return str_replace( array( "%", "_" ), array( "\\%", "\\_" ), $text );
    34393439}
    34403440
  • src/wp-includes/embed.php

    diff --git a/src/wp-includes/embed.php b/src/wp-includes/embed.php
    index 76d937cd6c..222f779176 100644
    a b function wp_embed_defaults( $url = '' ) { 
    8888 *
    8989 * @since 2.9.0
    9090 *
    91  * @see WP_oEmbed
     91 * @see WP_OEmbed
    9292 *
    9393 * @param string $url  The URL that should be embedded.
    9494 * @param array  $args Optional. Additional arguments and parameters for retrieving embed HTML.
    function wp_oembed_get( $url, $args = '' ) { 
    101101}
    102102
    103103/**
    104  * Returns the initialized WP_oEmbed object.
     104 * Returns the initialized WP_OEmbed object.
    105105 *
    106106 * @since 2.9.0
    107107 * @access private
    108108 *
    109  * @staticvar WP_oEmbed $wp_oembed
     109 * @staticvar WP_OEmbed $wp_oembed
    110110 *
    111  * @return WP_oEmbed object.
     111 * @return WP_OEmbed object.
    112112 */
    113113function _wp_oembed_get_object() {
    114114        static $wp_oembed = null;
    115115
    116116        if ( is_null( $wp_oembed ) ) {
    117                 $wp_oembed = new WP_oEmbed();
     117                $wp_oembed = new WP_OEmbed();
    118118        }
    119119        return $wp_oembed;
    120120}
    function _wp_oembed_get_object() { 
    124124 *
    125125 * @since 2.9.0
    126126 *
    127  * @see WP_oEmbed
     127 * @see WP_OEmbed
    128128 *
    129129 * @param string  $format   The format of URL that this provider can handle. You can use asterisks
    130130 *                          as wildcards.
    function wp_oembed_add_provider( $format, $provider, $regex = false ) { 
    136136                $oembed                       = _wp_oembed_get_object();
    137137                $oembed->providers[ $format ] = array( $provider, $regex );
    138138        } else {
    139                 WP_oEmbed::_add_provider_early( $format, $provider, $regex );
     139                WP_OEmbed::_add_provider_early( $format, $provider, $regex );
    140140        }
    141141}
    142142
    function wp_oembed_add_provider( $format, $provider, $regex = false ) { 
    145145 *
    146146 * @since 3.5.0
    147147 *
    148  * @see WP_oEmbed
     148 * @see WP_OEmbed
    149149 *
    150150 * @param string $format The URL format for the oEmbed provider to remove.
    151151 * @return bool Was the provider removed successfully?
    function wp_oembed_remove_provider( $format ) { 
    159159                        return true;
    160160                }
    161161        } else {
    162                 WP_oEmbed::_remove_provider_early( $format );
     162                WP_OEmbed::_remove_provider_early( $format );
    163163        }
    164164
    165165        return false;
    function wp_embed_handler_video( $matches, $attr, $url, $rawattr ) { 
    310310 * @since 4.4.0
    311311 */
    312312function wp_oembed_register_route() {
    313         $controller = new WP_oEmbed_Controller();
     313        $controller = new WP_OEmbed_Controller();
    314314        $controller->register_routes();
    315315}
    316316
  • src/wp-includes/formatting.php

    diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php
    index ea7b80d6c2..8145fd9e12 100644
    a b function _deep_replace( $search, $subject ) { 
    41614161/**
    41624162 * Escapes data for use in a MySQL query.
    41634163 *
    4164  * Usually you should prepare queries using wpdb::prepare().
     4164 * Usually you should prepare queries using WPDB::prepare().
    41654165 * Sometimes, spot-escaping is required or useful. One example
    41664166 * is preparing an array for use in an IN clause.
    41674167 *
  • src/wp-includes/functions.php

    diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php
    index a66b3fa406..c3b0862a60 100644
    a b function _jsonp_wp_die_handler( $message, $title = '', $args = array() ) { 
    33933393 * @since 3.2.0
    33943394 * @access private
    33953395 *
    3396  * @global wp_xmlrpc_server $wp_xmlrpc_server
     3396 * @global WP_XMLRPC_Server $WP_XMLRPC_Server
    33973397 *
    33983398 * @param string       $message Error message.
    33993399 * @param string       $title   Optional. Error title. Default empty.
    34003400 * @param string|array $args    Optional. Arguments to control behavior. Default empty array.
    34013401 */
    34023402function _xmlrpc_wp_die_handler( $message, $title = '', $args = array() ) {
    3403         global $wp_xmlrpc_server;
     3403        global $WP_XMLRPC_Server;
    34043404
    34053405        list( $message, $title, $r ) = _wp_die_process_input( $message, $title, $args );
    34063406
    function _xmlrpc_wp_die_handler( $message, $title = '', $args = array() ) { 
    34083408                nocache_headers();
    34093409        }
    34103410
    3411         if ( $wp_xmlrpc_server ) {
     3411        if ( $WP_XMLRPC_Server ) {
    34123412                $error = new IXR_Error( $r['response'], $message );
    3413                 $wp_xmlrpc_server->output( $error->getXml() );
     3413                $WP_XMLRPC_Server->output( $error->getXml() );
    34143414        }
    34153415        if ( $r['exit'] ) {
    34163416                die();
  • src/wp-includes/load.php

    diff --git a/src/wp-includes/load.php b/src/wp-includes/load.php
    index 7e5314c0d2..aa7b9c0daf 100644
    a b function require_wp_db() { 
    425425        $dbname     = defined( 'DB_NAME' ) ? DB_NAME : '';
    426426        $dbhost     = defined( 'DB_HOST' ) ? DB_HOST : '';
    427427
    428         $wpdb = new wpdb( $dbuser, $dbpassword, $dbname, $dbhost );
     428        $wpdb = new WPDB( $dbuser, $dbpassword, $dbname, $dbhost );
    429429}
    430430
    431431/**
  • src/wp-includes/wp-db.php

    diff --git a/src/wp-includes/wp-db.php b/src/wp-includes/wp-db.php
    index 3c41943e55..2b0eb5ecd7 100644
    a b define( 'ARRAY_N', 'ARRAY_N' ); 
    4848 *
    4949 * @since 0.71
    5050 */
    51 class wpdb {
     51class WPDB {
    5252
    5353        /**
    5454         * Whether to show SQL/DB errors.
    class wpdb { 
    161161         * Flag to ensure we don't run into recursion problems when checking the collation.
    162162         *
    163163         * @since 4.2.0
    164          * @see wpdb::check_safe_collation()
     164         * @see WPDB::check_safe_collation()
    165165         * @var bool
    166166         */
    167167        private $checking_collation = false;
    class wpdb { 
    200200         * The number of times to retry reconnecting before dying.
    201201         *
    202202         * @since 3.9.0
    203          * @see wpdb::check_connection()
     203         * @see WPDB::check_connection()
    204204         * @var int
    205205         */
    206206        protected $reconnect_retries = 5;
    class wpdb { 
    253253         * List of WordPress per-blog tables
    254254         *
    255255         * @since 2.5.0
    256          * @see wpdb::tables()
     256         * @see WPDB::tables()
    257257         * @var array
    258258         */
    259259        var $tables = array(
    class wpdb { 
    275275         * categories, post2cat, and link2cat were deprecated in 2.3.0, db version 5539
    276276         *
    277277         * @since 2.9.0
    278          * @see wpdb::tables()
     278         * @see WPDB::tables()
    279279         * @var array
    280280         */
    281281        var $old_tables = array( 'categories', 'post2cat', 'link2cat' );
    class wpdb { 
    284284         * List of WordPress global tables
    285285         *
    286286         * @since 3.0.0
    287          * @see wpdb::tables()
     287         * @see WPDB::tables()
    288288         * @var array
    289289         */
    290290        var $global_tables = array( 'users', 'usermeta' );
    class wpdb { 
    293293         * List of Multisite global tables
    294294         *
    295295         * @since 3.0.0
    296          * @see wpdb::tables()
     296         * @see WPDB::tables()
    297297         * @var array
    298298         */
    299299        var $ms_global_tables = array(
    class wpdb { 
    477477         * Keys are column names, values are format types: 'ID' => '%d'
    478478         *
    479479         * @since 2.8.0
    480          * @see wpdb::prepare()
    481          * @see wpdb::insert()
    482          * @see wpdb::update()
    483          * @see wpdb::delete()
     480         * @see WPDB::prepare()
     481         * @see WPDB::insert()
     482         * @see WPDB::update()
     483         * @see WPDB::delete()
    484484         * @see wp_set_wpdb_vars()
    485485         * @var array
    486486         */
    class wpdb { 
    642642        /**
    643643         * PHP5 style destructor and will run when database object is destroyed.
    644644         *
    645          * @see wpdb::__construct()
     645         * @see WPDB::__construct()
    646646         * @since 2.0.8
    647647         * @return true
    648648         */
    class wpdb { 
    899899         * @since 2.5.0
    900900         *
    901901         * @param string $prefix          Alphanumeric name for the new prefix.
    902          * @param bool   $set_table_names Optional. Whether the table names, e.g. wpdb::$posts, should be updated or not.
     902         * @param bool   $set_table_names Optional. Whether the table names, e.g. WPDB::$posts, should be updated or not.
    903903         * @return string|WP_Error Old prefix or WP_Error on error
    904904         */
    905905        public function set_prefix( $prefix, $set_table_names = true ) {
    class wpdb { 
    10071007         * 'old' - returns tables which are deprecated.
    10081008         *
    10091009         * @since 3.0.0
    1010          * @uses wpdb::$tables
    1011          * @uses wpdb::$old_tables
    1012          * @uses wpdb::$global_tables
    1013          * @uses wpdb::$ms_global_tables
     1010         * @uses WPDB::$tables
     1011         * @uses WPDB::$old_tables
     1012         * @uses WPDB::$global_tables
     1013         * @uses WPDB::$ms_global_tables
    10141014         *
    10151015         * @param string $scope   Optional. Can be all, global, ms_global, blog, or old tables. Defaults to all.
    10161016         * @param bool   $prefix  Optional. Whether to include table prefixes. Default true. If blog
    10171017         *                        prefix is requested, then the custom users and usermeta tables will be mapped.
    1018          * @param int    $blog_id Optional. The blog_id to prefix. Defaults to wpdb::$blogid. Used only when prefix is requested.
     1018         * @param int    $blog_id Optional. The blog_id to prefix. Defaults to WPDB::$blogid. Used only when prefix is requested.
    10191019         * @return array Table names. When a prefix is requested, the key is the unprefixed table name.
    10201020         */
    10211021        public function tables( $scope = 'all', $prefix = true, $blog_id = 0 ) {
    class wpdb { 
    11391139        /**
    11401140         * Do not use, deprecated.
    11411141         *
    1142          * Use esc_sql() or wpdb::prepare() instead.
     1142         * Use esc_sql() or WPDB::prepare() instead.
    11431143         *
    11441144         * @since 2.8.0
    1145          * @deprecated 3.6.0 Use wpdb::prepare()
    1146          * @see wpdb::prepare
     1145         * @deprecated 3.6.0 Use WPDB::prepare()
     1146         * @see WPDB::prepare
    11471147         * @see esc_sql()
    11481148         *
    11491149         * @param string $string
    class wpdb { 
    11511151         */
    11521152        function _weak_escape( $string ) {
    11531153                if ( func_num_args() === 1 && function_exists( '_deprecated_function' ) ) {
    1154                         _deprecated_function( __METHOD__, '3.6.0', 'wpdb::prepare() or esc_sql()' );
     1154                        _deprecated_function( __METHOD__, '3.6.0', 'WPDB::prepare() or esc_sql()' );
    11551155                }
    11561156                return addslashes( $string );
    11571157        }
    class wpdb { 
    11901190        /**
    11911191         * Escape data. Works on arrays.
    11921192         *
    1193          * @uses wpdb::_real_escape()
     1193         * @uses WPDB::_real_escape()
    11941194         * @since  2.8.0
    11951195         *
    11961196         * @param  string|array $data
    class wpdb { 
    12151215        /**
    12161216         * Do not use, deprecated.
    12171217         *
    1218          * Use esc_sql() or wpdb::prepare() instead.
     1218         * Use esc_sql() or WPDB::prepare() instead.
    12191219         *
    12201220         * @since 0.71
    1221          * @deprecated 3.6.0 Use wpdb::prepare()
    1222          * @see wpdb::prepare()
     1221         * @deprecated 3.6.0 Use WPDB::prepare()
     1222         * @see WPDB::prepare()
    12231223         * @see esc_sql()
    12241224         *
    12251225         * @param mixed $data
    class wpdb { 
    12271227         */
    12281228        public function escape( $data ) {
    12291229                if ( func_num_args() === 1 && function_exists( '_deprecated_function' ) ) {
    1230                         _deprecated_function( __METHOD__, '3.6.0', 'wpdb::prepare() or esc_sql()' );
     1230                        _deprecated_function( __METHOD__, '3.6.0', 'WPDB::prepare() or esc_sql()' );
    12311231                }
    12321232                if ( is_array( $data ) ) {
    12331233                        foreach ( $data as $k => $v ) {
    class wpdb { 
    12471247        /**
    12481248         * Escapes content by reference for insertion into the database, for security
    12491249         *
    1250          * @uses wpdb::_real_escape()
     1250         * @uses WPDB::_real_escape()
    12511251         *
    12521252         * @since 2.3.0
    12531253         *
    class wpdb { 
    12741274         *
    12751275         * Literal percentage signs (%) in the query string must be written as %%. Percentage wildcards (for example,
    12761276         * to use in LIKE syntax) must be passed via a substitution argument containing the complete LIKE string, these
    1277          * cannot be inserted directly in the query string. Also see wpdb::esc_like().
     1277         * cannot be inserted directly in the query string. Also see WPDB::esc_like().
    12781278         *
    12791279         * Arguments may be passed as individual arguments to the method, or as a single array containing all arguments. A combination
    12801280         * of the two is not supported.
    class wpdb { 
    13001300                // This is not meant to be foolproof -- but it will catch obviously incorrect usage.
    13011301                if ( strpos( $query, '%' ) === false ) {
    13021302                        wp_load_translations_early();
    1303                         _doing_it_wrong( 'wpdb::prepare', sprintf( __( 'The query argument of %s must have a placeholder.' ), 'wpdb::prepare()' ), '3.9.0' );
     1303                        _doing_it_wrong( 'WPDB::prepare', sprintf( __( 'The query argument of %s must have a placeholder.' ), 'WPDB::prepare()' ), '3.9.0' );
    13041304                }
    13051305
    13061306                $args = func_get_args();
    class wpdb { 
    13161316                foreach ( $args as $arg ) {
    13171317                        if ( ! is_scalar( $arg ) && ! is_null( $arg ) ) {
    13181318                                wp_load_translations_early();
    1319                                 _doing_it_wrong( 'wpdb::prepare', sprintf( __( 'Unsupported value type (%s).' ), gettype( $arg ) ), '4.8.2' );
     1319                                _doing_it_wrong( 'WPDB::prepare', sprintf( __( 'Unsupported value type (%s).' ), gettype( $arg ) ), '4.8.2' );
    13201320                        }
    13211321                }
    13221322
    class wpdb { 
    13531353                        if ( 1 === $placeholders && $passed_as_array ) {
    13541354                                // If the passed query only expected one argument, but the wrong number of arguments were sent as an array, bail.
    13551355                                wp_load_translations_early();
    1356                                 _doing_it_wrong( 'wpdb::prepare', __( 'The query only expected one placeholder, but an array of multiple placeholders was sent.' ), '4.9.0' );
     1356                                _doing_it_wrong( 'WPDB::prepare', __( 'The query only expected one placeholder, but an array of multiple placeholders was sent.' ), '4.9.0' );
    13571357
    13581358                                return;
    13591359                        } else {
    class wpdb { 
    13631363                                 */
    13641364                                wp_load_translations_early();
    13651365                                _doing_it_wrong(
    1366                                         'wpdb::prepare',
     1366                                        'WPDB::prepare',
    13671367                                        /* translators: 1: number of placeholders, 2: number of arguments passed */
    13681368                                        sprintf(
    13691369                                                __( 'The query does not contain the correct number of placeholders (%1$d) for the number of arguments passed (%2$d).' ),
    class wpdb { 
    13841384        /**
    13851385         * First half of escaping for LIKE special characters % and _ before preparing for MySQL.
    13861386         *
    1387          * Use this only before wpdb::prepare() or esc_sql().  Reversing the order is very bad for security.
     1387         * Use this only before WPDB::prepare() or esc_sql().  Reversing the order is very bad for security.
    13881388         *
    13891389         * Example Prepared Statement:
    13901390         *
    class wpdb { 
    14011401         *
    14021402         * @param string $text The raw text to be escaped. The input typed by the user should have no
    14031403         *                     extra or deleted slashes.
    1404          * @return string Text in the form of a LIKE phrase. The output is not SQL safe. Call $wpdb::prepare()
     1404         * @return string Text in the form of a LIKE phrase. The output is not SQL safe. Call $WPDB::prepare()
    14051405         *                or real_escape next.
    14061406         */
    14071407        public function esc_like( $text ) {
    class wpdb { 
    14861486         * Enables showing of database errors.
    14871487         *
    14881488         * This function should be used only to enable showing of errors.
    1489          * wpdb::hide_errors() should be used instead for hiding of errors. However,
     1489         * WPDB::hide_errors() should be used instead for hiding of errors. However,
    14901490         * this function can be used to enable and disable showing of database
    14911491         * errors.
    14921492         *
    14931493         * @since 0.71
    1494          * @see wpdb::hide_errors()
     1494         * @see WPDB::hide_errors()
    14951495         *
    14961496         * @param bool $show Whether to show or hide errors
    14971497         * @return bool Old value for showing errors.
    class wpdb { 
    15081508         * By default database errors are not shown.
    15091509         *
    15101510         * @since 0.71
    1511          * @see wpdb::show_errors()
     1511         * @see WPDB::show_errors()
    15121512         *
    15131513         * @return bool Whether showing of errors was active
    15141514         */
    class wpdb { 
    15251525         * call to this function they can be enabled.
    15261526         *
    15271527         * @since 2.5.0
    1528          * @see wpdb::hide_errors()
     1528         * @see WPDB::hide_errors()
    15291529         * @param bool $suppress Optional. New value. Defaults to true.
    15301530         * @return bool Old value
    15311531         */
    class wpdb { 
    19991999         *
    20002000         * @since 3.9.0
    20012001         *
    2002          * @see wpdb::query()
     2002         * @see WPDB::query()
    20032003         *
    20042004         * @param string $query The query to run.
    20052005         */
    class wpdb { 
    20862086        /**
    20872087         * Insert a row into a table.
    20882088         *
    2089          *     wpdb::insert( 'table', array( 'column' => 'foo', 'field' => 'bar' ) )
    2090          *     wpdb::insert( 'table', array( 'column' => 'foo', 'field' => 1337 ), array( '%s', '%d' ) )
     2089         *     WPDB::insert( 'table', array( 'column' => 'foo', 'field' => 'bar' ) )
     2090         *     WPDB::insert( 'table', array( 'column' => 'foo', 'field' => 1337 ), array( '%s', '%d' ) )
    20912091         *
    20922092         * @since 2.5.0
    2093          * @see wpdb::prepare()
    2094          * @see wpdb::$field_types
     2093         * @see WPDB::prepare()
     2094         * @see WPDB::$field_types
    20952095         * @see wp_set_wpdb_vars()
    20962096         *
    20972097         * @param string       $table  Table name
    class wpdb { 
    21012101         * @param array|string $format Optional. An array of formats to be mapped to each of the value in $data.
    21022102         *                             If string, that format will be used for all of the values in $data.
    21032103         *                             A format is one of '%d', '%f', '%s' (integer, float, string).
    2104          *                             If omitted, all values in $data will be treated as strings unless otherwise specified in wpdb::$field_types.
     2104         *                             If omitted, all values in $data will be treated as strings unless otherwise specified in WPDB::$field_types.
    21052105         * @return int|false The number of rows inserted, or false on error.
    21062106         */
    21072107        public function insert( $table, $data, $format = null ) {
    class wpdb { 
    21112111        /**
    21122112         * Replace a row into a table.
    21132113         *
    2114          *     wpdb::replace( 'table', array( 'column' => 'foo', 'field' => 'bar' ) )
    2115          *     wpdb::replace( 'table', array( 'column' => 'foo', 'field' => 1337 ), array( '%s', '%d' ) )
     2114         *     WPDB::replace( 'table', array( 'column' => 'foo', 'field' => 'bar' ) )
     2115         *     WPDB::replace( 'table', array( 'column' => 'foo', 'field' => 1337 ), array( '%s', '%d' ) )
    21162116         *
    21172117         * @since 3.0.0
    2118          * @see wpdb::prepare()
    2119          * @see wpdb::$field_types
     2118         * @see WPDB::prepare()
     2119         * @see WPDB::$field_types
    21202120         * @see wp_set_wpdb_vars()
    21212121         *
    21222122         * @param string       $table  Table name
    class wpdb { 
    21262126         * @param array|string $format Optional. An array of formats to be mapped to each of the value in $data.
    21272127         *                             If string, that format will be used for all of the values in $data.
    21282128         *                             A format is one of '%d', '%f', '%s' (integer, float, string).
    2129          *                             If omitted, all values in $data will be treated as strings unless otherwise specified in wpdb::$field_types.
     2129         *                             If omitted, all values in $data will be treated as strings unless otherwise specified in WPDB::$field_types.
    21302130         * @return int|false The number of rows affected, or false on error.
    21312131         */
    21322132        public function replace( $table, $data, $format = null ) {
    class wpdb { 
    21392139         * Runs an insert or replace query based on $type argument.
    21402140         *
    21412141         * @since 3.0.0
    2142          * @see wpdb::prepare()
    2143          * @see wpdb::$field_types
     2142         * @see WPDB::prepare()
     2143         * @see WPDB::$field_types
    21442144         * @see wp_set_wpdb_vars()
    21452145         *
    21462146         * @param string       $table  Table name
    class wpdb { 
    21502150         * @param array|string $format Optional. An array of formats to be mapped to each of the value in $data.
    21512151         *                             If string, that format will be used for all of the values in $data.
    21522152         *                             A format is one of '%d', '%f', '%s' (integer, float, string).
    2153          *                             If omitted, all values in $data will be treated as strings unless otherwise specified in wpdb::$field_types.
     2153         *                             If omitted, all values in $data will be treated as strings unless otherwise specified in WPDB::$field_types.
    21542154         * @param string $type         Optional. What type of operation is this? INSERT or REPLACE. Defaults to INSERT.
    21552155         * @return int|false The number of rows affected, or false on error.
    21562156         */
    class wpdb { 
    21902190        /**
    21912191         * Update a row in the table
    21922192         *
    2193          *     wpdb::update( 'table', array( 'column' => 'foo', 'field' => 'bar' ), array( 'ID' => 1 ) )
    2194          *     wpdb::update( 'table', array( 'column' => 'foo', 'field' => 1337 ), array( 'ID' => 1 ), array( '%s', '%d' ), array( '%d' ) )
     2193         *     WPDB::update( 'table', array( 'column' => 'foo', 'field' => 'bar' ), array( 'ID' => 1 ) )
     2194         *     WPDB::update( 'table', array( 'column' => 'foo', 'field' => 1337 ), array( 'ID' => 1 ), array( '%s', '%d' ), array( '%d' ) )
    21952195         *
    21962196         * @since 2.5.0
    2197          * @see wpdb::prepare()
    2198          * @see wpdb::$field_types
     2197         * @see WPDB::prepare()
     2198         * @see WPDB::$field_types
    21992199         * @see wp_set_wpdb_vars()
    22002200         *
    22012201         * @param string       $table        Table name
    class wpdb { 
    22102210         * @param array|string $format       Optional. An array of formats to be mapped to each of the values in $data.
    22112211         *                                   If string, that format will be used for all of the values in $data.
    22122212         *                                   A format is one of '%d', '%f', '%s' (integer, float, string).
    2213          *                                   If omitted, all values in $data will be treated as strings unless otherwise specified in wpdb::$field_types.
     2213         *                                   If omitted, all values in $data will be treated as strings unless otherwise specified in WPDB::$field_types.
    22142214         * @param array|string $where_format Optional. An array of formats to be mapped to each of the values in $where.
    22152215         *                                   If string, that format will be used for all of the items in $where.
    22162216         *                                   A format is one of '%d', '%f', '%s' (integer, float, string).
    class wpdb { 
    22652265        /**
    22662266         * Delete a row in the table
    22672267         *
    2268          *     wpdb::delete( 'table', array( 'ID' => 1 ) )
    2269          *     wpdb::delete( 'table', array( 'ID' => 1 ), array( '%d' ) )
     2268         *     WPDB::delete( 'table', array( 'ID' => 1 ) )
     2269         *     WPDB::delete( 'table', array( 'ID' => 1 ), array( '%d' ) )
    22702270         *
    22712271         * @since 3.4.0
    2272          * @see wpdb::prepare()
    2273          * @see wpdb::$field_types
     2272         * @see WPDB::prepare()
     2273         * @see WPDB::$field_types
    22742274         * @see wp_set_wpdb_vars()
    22752275         *
    22762276         * @param string       $table        Table name
    class wpdb { 
    22812281         * @param array|string $where_format Optional. An array of formats to be mapped to each of the values in $where.
    22822282         *                                   If string, that format will be used for all of the items in $where.
    22832283         *                                   A format is one of '%d', '%f', '%s' (integer, float, string).
    2284          *                                   If omitted, all values in $where will be treated as strings unless otherwise specified in wpdb::$field_types.
     2284         *                                   If omitted, all values in $where will be treated as strings unless otherwise specified in WPDB::$field_types.
    22852285         * @return int|false The number of rows updated, or false on error.
    22862286         */
    22872287        public function delete( $table, $where, $where_format = null ) {
    class wpdb { 
    23932393
    23942394        /**
    23952395         * Adds field charsets to field/value/format arrays generated by
    2396          * the wpdb::process_field_formats() method.
     2396         * the WPDB::process_field_formats() method.
    23972397         *
    23982398         * @since 4.2.0
    23992399         *
    2400          * @param array  $data  As it comes from the wpdb::process_field_formats() method.
     2400         * @param array  $data  As it comes from the WPDB::process_field_formats() method.
    24012401         * @param string $table Table name.
    24022402         * @return array|false The same array as $data with additional 'charset' keys.
    24032403         */
    class wpdb { 
    24272427         *
    24282428         * @since 4.2.1
    24292429         *
    2430          * @param array  $data  As it comes from the wpdb::process_field_charsets() method.
     2430         * @param array  $data  As it comes from the WPDB::process_field_charsets() method.
    24312431         * @param string $table Table name.
    24322432         * @return array|false The same array as $data with additional 'length' keys, or false if
    24332433         *                     any of the values were too long for their corresponding field.
    class wpdb { 
    33573357        /**
    33583358         * Wraps errors in a nice header and footer and dies.
    33593359         *
    3360          * Will not die if wpdb::$show_errors is false.
     3360         * Will not die if WPDB::$show_errors is false.
    33613361         *
    33623362         * @since 1.5.0
    33633363         *
    class wpdb { 
    34523452         *
    34533453         * Called when WordPress is generating the table scheme.
    34543454         *
    3455          * Use `wpdb::has_cap( 'collation' )`.
     3455         * Use `WPDB::has_cap( 'collation' )`.
    34563456         *
    34573457         * @since 2.5.0
    3458          * @deprecated 3.5.0 Use wpdb::has_cap()
     3458         * @deprecated 3.5.0 Use WPDB::has_cap()
    34593459         *
    34603460         * @return bool True if collation is supported, false if version does not
    34613461         */
    34623462        public function supports_collation() {
    3463                 _deprecated_function( __FUNCTION__, '3.5.0', 'wpdb::has_cap( \'collation\' )' );
     3463                _deprecated_function( __FUNCTION__, '3.5.0', 'WPDB::has_cap( \'collation\' )' );
    34643464                return $this->has_cap( 'collation' );
    34653465        }
    34663466
    class wpdb { 
    34913491         * @since 4.1.0 Added support for the 'utf8mb4' feature.
    34923492         * @since 4.6.0 Added support for the 'utf8mb4_520' feature.
    34933493         *
    3494          * @see wpdb::db_version()
     3494         * @see WPDB::db_version()
    34953495         *
    34963496         * @param string $db_cap The feature to check for. Accepts 'collation',
    34973497         *                       'group_concat', 'subqueries', 'set_charset',
  • src/xmlrpc.php

    diff --git a/src/xmlrpc.php b/src/xmlrpc.php
    index b36b21e951..d5940f2ec0 100644
    a b $post_default_title = ''; 
    7979 *
    8080 * @param string $class The name of the XML-RPC server class.
    8181 */
    82 $wp_xmlrpc_server_class = apply_filters( 'wp_xmlrpc_server_class', 'wp_xmlrpc_server' );
    83 $wp_xmlrpc_server       = new $wp_xmlrpc_server_class;
     82$WP_XMLRPC_Server_class = apply_filters( 'WP_XMLRPC_Server_class', 'WP_XMLRPC_Server' );
     83$WP_XMLRPC_Server       = new $WP_XMLRPC_Server_class;
    8484
    8585// Fire off the request
    86 $wp_xmlrpc_server->serve_request();
     86$WP_XMLRPC_Server->serve_request();
    8787
    8888exit;
    8989
  • tests/phpunit/includes/testcase-xmlrpc.php

    diff --git a/tests/phpunit/includes/testcase-xmlrpc.php b/tests/phpunit/includes/testcase-xmlrpc.php
    index 5fe312bc13..837a74a168 100644
    a b class WP_XMLRPC_UnitTestCase extends WP_UnitTestCase { 
    1111
    1212                add_filter( 'pre_option_enable_xmlrpc', '__return_true' );
    1313
    14                 $this->myxmlrpcserver = new wp_xmlrpc_server();
     14                $this->myxmlrpcserver = new WP_XMLRPC_Server();
    1515        }
    1616
    1717        function tearDown() {
  • tests/phpunit/tests/db.php

    diff --git a/tests/phpunit/tests/db.php b/tests/phpunit/tests/db.php
    index 0583ae132a..46653378dd 100644
    a b class Tests_DB extends WP_UnitTestCase { 
    359359
    360360        /**
    361361         * @ticket 25604
    362          * @expectedIncorrectUsage wpdb::prepare
     362         * @expectedIncorrectUsage WPDB::prepare
    363363         */
    364364        function test_prepare_without_arguments() {
    365365                global $wpdb;
    class Tests_DB extends WP_UnitTestCase { 
    378378        }
    379379
    380380        /**
    381          * @expectedIncorrectUsage wpdb::prepare
     381         * @expectedIncorrectUsage WPDB::prepare
    382382         */
    383383        function test_prepare_sprintf_invalid_args() {
    384384                global $wpdb;
    class Tests_DB extends WP_UnitTestCase { 
    400400        }
    401401
    402402        /**
    403          * @expectedIncorrectUsage wpdb::prepare
     403         * @expectedIncorrectUsage WPDB::prepare
    404404         */
    405405        function test_prepare_vsprintf_invalid_args() {
    406406                global $wpdb;
    class Tests_DB extends WP_UnitTestCase { 
    417417        /**
    418418         * @ticket 42040
    419419         * @dataProvider data_prepare_incorrect_arg_count
    420          * @expectedIncorrectUsage wpdb::prepare
     420         * @expectedIncorrectUsage WPDB::prepare
    421421         */
    422422        public function test_prepare_incorrect_arg_count( $query, $args, $expected ) {
    423423                global $wpdb;
    424424
    425                 // $query is the first argument to be passed to wpdb::prepare()
     425                // $query is the first argument to be passed to WPDB::prepare()
    426426                array_unshift( $args, $query );
    427427
    428428                // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
    class Tests_DB extends WP_UnitTestCase { 
    691691        }
    692692
    693693        /**
    694          * wpdb::update() requires a WHERE condition.
     694         * WPDB::update() requires a WHERE condition.
    695695         *
    696696         * @ticket 26106
    697697         */
    class Tests_DB extends WP_UnitTestCase { 
    13591359                global $wpdb;
    13601360
    13611361                if ( $incorrect_usage ) {
    1362                         $this->setExpectedIncorrectUsage( 'wpdb::prepare' );
     1362                        $this->setExpectedIncorrectUsage( 'WPDB::prepare' );
    13631363                }
    13641364
    13651365                if ( ! is_array( $values ) ) {
    class Tests_DB extends WP_UnitTestCase { 
    13791379                global $wpdb;
    13801380
    13811381                if ( $incorrect_usage ) {
    1382                         $this->setExpectedIncorrectUsage( 'wpdb::prepare' );
     1382                        $this->setExpectedIncorrectUsage( 'WPDB::prepare' );
    13831383                }
    13841384
    13851385                if ( ! is_array( $values ) ) {
    class Tests_DB extends WP_UnitTestCase { 
    15721572                global $wpdb;
    15731573
    15741574                if ( $incorrect_usage ) {
    1575                         $this->setExpectedIncorrectUsage( 'wpdb::prepare' );
     1575                        $this->setExpectedIncorrectUsage( 'WPDB::prepare' );
    15761576                }
    15771577
    15781578                $escape = esc_sql( $escape );
    class Tests_DB extends WP_UnitTestCase { 
    16131613        }
    16141614
    16151615        /**
    1616          * @expectedIncorrectUsage wpdb::prepare
     1616         * @expectedIncorrectUsage WPDB::prepare
    16171617         */
    16181618        function test_double_prepare() {
    16191619                global $wpdb;
  • tests/phpunit/tests/db/charset.php

    diff --git a/tests/phpunit/tests/db/charset.php b/tests/phpunit/tests/db/charset.php
    index 3089ec9a74..81f9d76c66 100644
    a b class Tests_DB_Charset extends WP_UnitTestCase { 
    659659        }
    660660
    661661        /**
    662          * Set of table definitions for testing wpdb::get_table_charset and wpdb::get_column_charset
     662         * Set of table definitions for testing WPDB::get_table_charset and WPDB::get_column_charset
    663663         *
    664664         * @var array
    665665         */
  • tests/phpunit/tests/oembed/wpOembed.php

    diff --git a/tests/phpunit/tests/oembed/wpOembed.php b/tests/phpunit/tests/oembed/wpOembed.php
    index c148dd555c..9df3d44da2 100644
    a b  
    33/**
    44 * @group oembed
    55 */
    6 class Tests_WP_oEmbed extends WP_UnitTestCase {
     6class Tests_WP_OEmbed extends WP_UnitTestCase {
    77        /**
    8          * @var WP_oEmbed
     8         * @var WP_OEmbed
    99         */
    1010        protected $oembed;
    1111