mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-28 23:27:39 +02:00
Coding Standards: Rename the $cat_ID
argument to $cat_id
in get_the_category_by_ID()
.
This fixes a `Variable "$cat_ID" is not in valid snake_case format` WPCS warning. Props azouamauriac. See #54728. Built from https://develop.svn.wordpress.org/trunk@52958 git-svn-id: http://core.svn.wordpress.org/trunk@52547 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8cdec43675
commit
845f4f00fd
@ -103,12 +103,12 @@ function get_the_category( $post_id = false ) {
|
|||||||
*
|
*
|
||||||
* @since 0.71
|
* @since 0.71
|
||||||
*
|
*
|
||||||
* @param int $cat_ID Category ID.
|
* @param int $cat_id Category ID.
|
||||||
* @return string|WP_Error Category name on success, WP_Error on failure.
|
* @return string|WP_Error Category name on success, WP_Error on failure.
|
||||||
*/
|
*/
|
||||||
function get_the_category_by_ID( $cat_ID ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
|
function get_the_category_by_ID( $cat_id ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
|
||||||
$cat_ID = (int) $cat_ID;
|
$cat_id = (int) $cat_id;
|
||||||
$category = get_term( $cat_ID );
|
$category = get_term( $cat_id );
|
||||||
|
|
||||||
if ( is_wp_error( $category ) ) {
|
if ( is_wp_error( $category ) ) {
|
||||||
return $category;
|
return $category;
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.0-alpha-52957';
|
$wp_version = '6.0-alpha-52958';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user