} php 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 } return ( $category ) ? $category->name : ''; }