Coding Standards: Rename the remaining $cat_ID variables to $cat_id.

This resolves a few WPCS warnings:
{{{
Variable "$cat_ID" is not in valid snake_case format, try "$cat_i_d"
}}}

Affected functions:
* `wp_delete_category()`
* `get_category_rss_link()`
* `get_catname()`

Follow-up to [836], [2068], [2551], [2695], [6365], [10959], [52958], [55190].

Fixes #56754.

git-svn-id: https://develop.svn.wordpress.org/trunk@55334 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2023-02-14 15:44:41 +00:00
parent 852042e4a7
commit c7e7a0b056
2 changed files with 9 additions and 9 deletions

View File

@ -1150,13 +1150,13 @@ function comments_rss_link($link_text = 'Comments RSS') {
* @see get_category_feed_link()
*
* @param bool $display
* @param int $cat_ID
* @param int $cat_id
* @return string
*/
function get_category_rss_link($display = false, $cat_ID = 1) {
function get_category_rss_link($display = false, $cat_id = 1) {
_deprecated_function( __FUNCTION__, '2.5.0', 'get_category_feed_link()' );
$link = get_category_feed_link($cat_ID, 'rss2');
$link = get_category_feed_link($cat_id, 'rss2');
if ( $display )
echo $link;
@ -1248,12 +1248,12 @@ function get_commentdata( $comment_id, $no_cache = 0, $include_unapproved = fals
* @deprecated 2.8.0 Use get_cat_name()
* @see get_cat_name()
*
* @param int $cat_ID Category ID
* @param int $cat_id Category ID
* @return string category name
*/
function get_catname( $cat_ID ) {
function get_catname( $cat_id ) {
_deprecated_function( __FUNCTION__, '2.8.0', 'get_cat_name()' );
return get_cat_name( $cat_ID );
return get_cat_name( $cat_id );
}
/**

View File

@ -2154,13 +2154,13 @@ function wp_delete_term( $term, $taxonomy, $args = array() ) {
*
* @since 2.0.0
*
* @param int $cat_ID Category term ID.
* @param int $cat_id Category term ID.
* @return bool|int|WP_Error Returns true if completes delete action; false if term doesn't exist;
* Zero on attempted deletion of default Category; WP_Error object is
* also a possibility.
*/
function wp_delete_category( $cat_ID ) {
return wp_delete_term( $cat_ID, 'category' );
function wp_delete_category( $cat_id ) {
return wp_delete_term( $cat_id, 'category' );
}
/**