mirror of
git://develop.git.wordpress.org/
synced 2025-03-20 12:00:03 +01: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. git-svn-id: https://develop.svn.wordpress.org/trunk@52958 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8e4578f5a9
commit
f12d9995e7
@ -103,12 +103,12 @@ function get_the_category( $post_id = false ) {
|
||||
*
|
||||
* @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.
|
||||
*/
|
||||
function get_the_category_by_ID( $cat_ID ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
|
||||
$cat_ID = (int) $cat_ID;
|
||||
$category = get_term( $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 );
|
||||
|
||||
if ( is_wp_error( $category ) ) {
|
||||
return $category;
|
||||
|
Loading…
x
Reference in New Issue
Block a user