diff --git a/wp-admin/includes/file.php b/wp-admin/includes/file.php index 51c0bf9e5d..105790bc8f 100644 --- a/wp-admin/includes/file.php +++ b/wp-admin/includes/file.php @@ -1720,7 +1720,7 @@ function copy_dir( $from, $to, $skip_list = array() ) { * @param bool $allow_relaxed_file_ownership Optional. Whether to allow Group/World writable. Default false. * @return bool|null True on success, false on failure, null if the filesystem method class file does not exist. */ -function WP_Filesystem( $args = false, $context = false, $allow_relaxed_file_ownership = false ) { +function WP_Filesystem( $args = false, $context = false, $allow_relaxed_file_ownership = false ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid global $wp_filesystem; require_once( ABSPATH . 'wp-admin/includes/class-wp-filesystem-base.php' ); diff --git a/wp-admin/includes/misc.php b/wp-admin/includes/misc.php index 6b46f67037..d6160a1f62 100644 --- a/wp-admin/includes/misc.php +++ b/wp-admin/includes/misc.php @@ -831,7 +831,7 @@ function iis7_add_rewrite_rule( $filename, $rewrite_rule ) { * @param DOMDocument $doc * @param string $filename */ -function saveDomDocument( $doc, $filename ) { +function saveDomDocument( $doc, $filename ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid $config = $doc->saveXML(); $config = preg_replace( "/([^\r])\n/", "$1\r\n", $config ); $fp = fopen( $filename, 'w' ); diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php index 03901109ad..d150ed3644 100644 --- a/wp-admin/includes/upgrade.php +++ b/wp-admin/includes/upgrade.php @@ -2453,7 +2453,7 @@ function get_alloptions_110() { * @param string $setting Option name. * @return mixed */ -function __get_option( $setting ) { +function __get_option( $setting ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore global $wpdb; if ( $setting == 'home' && defined( 'WP_HOME' ) ) { @@ -2522,7 +2522,7 @@ function deslash( $content ) { * Default true. * @return array Strings containing the results of the various update queries. */ -function dbDelta( $queries = '', $execute = true ) { +function dbDelta( $queries = '', $execute = true ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid global $wpdb; if ( in_array( $queries, array( '', 'all', 'blog', 'global', 'ms_global' ), true ) ) { diff --git a/wp-admin/link-parse-opml.php b/wp-admin/link-parse-opml.php index 287d66c5b4..7bc31f69db 100644 --- a/wp-admin/link-parse-opml.php +++ b/wp-admin/link-parse-opml.php @@ -31,7 +31,7 @@ global $opml; * @param string $tagName XML element name. * @param array $attrs XML element attributes. */ -function startElement( $parser, $tagName, $attrs ) { +function startElement( $parser, $tagName, $attrs ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid global $names, $urls, $targets, $descriptions, $feeds; if ( 'OUTLINE' === $tagName ) { @@ -68,7 +68,7 @@ function startElement( $parser, $tagName, $attrs ) { * @param mixed $parser XML Parser resource. * @param string $tagName XML tag name. */ -function endElement( $parser, $tagName ) { +function endElement( $parser, $tagName ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid // Nothing to do. } diff --git a/wp-includes/author-template.php b/wp-includes/author-template.php index 4c4ea32ffb..5bce1fc9f7 100644 --- a/wp-includes/author-template.php +++ b/wp-includes/author-template.php @@ -563,6 +563,6 @@ function is_multi_author() { * @since 3.2.0 * @access private */ -function __clear_multi_author_cache() { +function __clear_multi_author_cache() { //phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore delete_transient( 'is_multi_author' ); } diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php index 438bbe9966..646fc846f5 100644 --- a/wp-includes/category-template.php +++ b/wp-includes/category-template.php @@ -105,7 +105,7 @@ function get_the_category( $id = false ) { * @param int $cat_ID Category ID. * @return string|WP_Error Category name on success, WP_Error on failure. */ -function get_the_category_by_ID( $cat_ID ) { +function get_the_category_by_ID( $cat_ID ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid $cat_ID = (int) $cat_ID; $category = get_term( $cat_ID ); diff --git a/wp-includes/category.php b/wp-includes/category.php index 6f4700a259..8fd634d1e4 100644 --- a/wp-includes/category.php +++ b/wp-includes/category.php @@ -197,7 +197,7 @@ function get_category_by_slug( $slug ) { * @param string $cat_name Category name. * @return int 0, if failure and ID of category on success. */ -function get_cat_ID( $cat_name ) { +function get_cat_ID( $cat_name ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid $cat = get_term_by( 'name', $cat_name, 'category' ); if ( $cat ) { return $cat->term_id; diff --git a/wp-includes/class-http.php b/wp-includes/class-http.php index 4167d78d7b..d11796373c 100644 --- a/wp-includes/class-http.php +++ b/wp-includes/class-http.php @@ -647,7 +647,7 @@ class WP_Http { * @param string $strResponse The full response string * @return array Array with 'headers' and 'body' keys. */ - public static function processResponse( $strResponse ) { + public static function processResponse( $strResponse ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid $res = explode( "\r\n\r\n", $strResponse, 2 ); return array( @@ -669,7 +669,7 @@ class WP_Http { * @return array Processed string headers. If duplicate headers are encountered, * Then a numbered array is returned as the value of that header-key. */ - public static function processHeaders( $headers, $url = '' ) { + public static function processHeaders( $headers, $url = '' ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid // Split headers, one per array element. if ( is_string( $headers ) ) { // Tolerate line terminator: CRLF = LF (RFC 2616 19.3). @@ -752,7 +752,7 @@ class WP_Http { * * @param array $r Full array of args passed into ::request() */ - public static function buildCookieHeader( &$r ) { + public static function buildCookieHeader( &$r ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid if ( ! empty( $r['cookies'] ) ) { // Upgrade any name => value cookie pairs to WP_HTTP_Cookie instances. foreach ( $r['cookies'] as $name => $value ) { @@ -788,7 +788,7 @@ class WP_Http { * @param string $body Body content * @return string Chunked decoded body on success or raw body on failure. */ - public static function chunkTransferDecode( $body ) { + public static function chunkTransferDecode( $body ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid // The body is not chunked encoded or is malformed. if ( ! preg_match( '/^([0-9a-f]+)[^\r\n]*\r\n/i', trim( $body ) ) ) { return $body; diff --git a/wp-includes/class-wp-http-cookie.php b/wp-includes/class-wp-http-cookie.php index c265540323..a062a0e0ab 100644 --- a/wp-includes/class-wp-http-cookie.php +++ b/wp-includes/class-wp-http-cookie.php @@ -211,7 +211,7 @@ class WP_Http_Cookie { * * @return string Header encoded cookie name and value. */ - public function getHeaderValue() { + public function getHeaderValue() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid if ( ! isset( $this->name ) || ! isset( $this->value ) ) { return ''; } @@ -234,7 +234,7 @@ class WP_Http_Cookie { * * @return string */ - public function getFullHeader() { + public function getFullHeader() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid return 'Cookie: ' . $this->getHeaderValue(); } diff --git a/wp-includes/class-wp-http-response.php b/wp-includes/class-wp-http-response.php index 4bf95c3a19..ae28d8954b 100644 --- a/wp-includes/class-wp-http-response.php +++ b/wp-includes/class-wp-http-response.php @@ -147,7 +147,7 @@ class WP_HTTP_Response { * * @return mixed Any JSON-serializable value. */ - public function jsonSerialize() { + public function jsonSerialize() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid return $this->get_data(); } } diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index ca0a8de714..406fadb758 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -262,7 +262,7 @@ function comment_author_link( $comment_ID = 0 ) { * Default current comment. * @return string Comment author's IP address. */ -function get_comment_author_IP( $comment_ID = 0 ) { +function get_comment_author_IP( $comment_ID = 0 ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid $comment = get_comment( $comment_ID ); /** @@ -287,7 +287,7 @@ function get_comment_author_IP( $comment_ID = 0 ) { * @param int|WP_Comment $comment_ID Optional. WP_Comment or the ID of the comment for which to print the author's IP address. * Default current comment. */ -function comment_author_IP( $comment_ID = 0 ) { +function comment_author_IP( $comment_ID = 0 ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid echo esc_html( get_comment_author_IP( $comment_ID ) ); } @@ -651,7 +651,7 @@ function comment_excerpt( $comment_ID = 0 ) { * * @return int The comment ID. */ -function get_comment_ID() { +function get_comment_ID() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid $comment = get_comment(); /** @@ -671,7 +671,7 @@ function get_comment_ID() { * * @since 0.71 */ -function comment_ID() { +function comment_ID() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid echo get_comment_ID(); } diff --git a/wp-includes/compat.php b/wp-includes/compat.php index aae4f73416..d7b5bf0fc8 100644 --- a/wp-includes/compat.php +++ b/wp-includes/compat.php @@ -434,6 +434,7 @@ if ( ! interface_exists( 'JsonSerializable' ) ) { * @since 4.4.0 */ interface JsonSerializable { + // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid public function jsonSerialize(); } } diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 5c75642199..09beb7373e 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -2427,7 +2427,7 @@ function convert_invalid_entities( $content ) { * @param bool $force If true, forces balancing, ignoring the value of the option. Default false. * @return string Balanced text */ -function balanceTags( $text, $force = false ) { +function balanceTags( $text, $force = false ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid if ( $force || get_option( 'use_balanceTags' ) == 1 ) { return force_balance_tags( $text ); } else { diff --git a/wp-includes/functions.php b/wp-includes/functions.php index ba7ad34036..3dc17c485d 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -5631,7 +5631,7 @@ function get_file_data( $file, $default_headers, $context = '' ) { * * @return true True. */ -function __return_true() { +function __return_true() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore return true; } @@ -5646,7 +5646,7 @@ function __return_true() { * * @return false False. */ -function __return_false() { +function __return_false() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore return false; } @@ -5659,7 +5659,7 @@ function __return_false() { * * @return int 0. */ -function __return_zero() { +function __return_zero() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore return 0; } @@ -5672,7 +5672,7 @@ function __return_zero() { * * @return array Empty array. */ -function __return_empty_array() { +function __return_empty_array() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore return array(); } @@ -5685,7 +5685,7 @@ function __return_empty_array() { * * @return null Null value. */ -function __return_null() { +function __return_null() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore return null; } @@ -5700,7 +5700,7 @@ function __return_null() { * * @return string Empty string. */ -function __return_empty_string() { +function __return_empty_string() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore return ''; } diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index 50323da6b9..cdd288b3e4 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -4548,7 +4548,7 @@ function readonly( $readonly, $current = true, $echo = true ) { * @param string $type The type of checked|selected|disabled|readonly we are doing * @return string html attribute or empty string */ -function __checked_selected_helper( $helper, $current, $echo, $type ) { +function __checked_selected_helper( $helper, $current, $echo, $type ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore if ( (string) $helper === (string) $current ) { $result = " $type='$type'"; } else { diff --git a/wp-includes/load.php b/wp-includes/load.php index fe97810ae5..78a2f20d49 100644 --- a/wp-includes/load.php +++ b/wp-includes/load.php @@ -26,7 +26,7 @@ function wp_get_server_protocol() { * @since 2.1.0 * @access private */ -function wp_unregister_GLOBALS() { +function wp_unregister_GLOBALS() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid if ( ! ini_get( 'register_globals' ) ) { return; } diff --git a/wp-includes/ms-functions.php b/wp-includes/ms-functions.php index dc774a399d..ec40b2aae2 100644 --- a/wp-includes/ms-functions.php +++ b/wp-includes/ms-functions.php @@ -2252,7 +2252,7 @@ function force_ssl_content( $force = '' ) { * @param string $url URL * @return string URL with https as the scheme */ -function filter_SSL( $url ) { +function filter_SSL( $url ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid if ( ! is_string( $url ) ) { return get_bloginfo( 'url' ); // Return home blog url with proper scheme } diff --git a/wp-includes/pomo/streams.php b/wp-includes/pomo/streams.php index 835078b7d1..5c3c775ef4 100644 --- a/wp-includes/pomo/streams.php +++ b/wp-includes/pomo/streams.php @@ -34,7 +34,7 @@ if ( ! class_exists( 'POMO_Reader', false ) ) : * * @param string $endian Set the endianness of the file. Accepts 'big', or 'little'. */ - function setEndian( $endian ) { + function setEndian( $endian ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid $this->endian = $endian; } diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index b882c61fe9..8413ce75e0 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -13,7 +13,7 @@ * * @since 0.71 */ -function the_ID() { +function the_ID() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid echo get_the_ID(); } @@ -24,7 +24,7 @@ function the_ID() { * * @return int|false The ID of the current item in the WordPress Loop. False if $post is not set. */ -function get_the_ID() { +function get_the_ID() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid $post = get_post(); return ! empty( $post ) ? $post->ID : false; } diff --git a/wp-includes/version.php b/wp-includes/version.php index d61671e59d..09053a503d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.3-alpha-45579'; +$wp_version = '5.3-alpha-45580'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/xmlrpc.php b/xmlrpc.php index d0158ee2e7..b36b21e951 100644 --- a/xmlrpc.php +++ b/xmlrpc.php @@ -96,7 +96,7 @@ exit; * @param string $io Whether input or output * @param string $msg Information describing logging reason. */ -function logIO( $io, $msg ) { +function logIO( $io, $msg ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid _deprecated_function( __FUNCTION__, '3.4.0', 'error_log()' ); if ( ! empty( $GLOBALS['xmlrpc_logging'] ) ) { error_log( $io . ' - ' . $msg );