Public Themes A: PHP Rector fixes (#7382)

This commit is contained in:
Matthew Reishus 2023-09-25 11:05:37 -05:00 committed by GitHub
parent 7abbb43b63
commit 22553367b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 4 deletions

View file

@ -84,7 +84,7 @@ function affinity_categorized_blog() {
) );
// Count the number of categories that are attached to the posts.
$all_the_cool_cats = count( $all_the_cool_cats );
$all_the_cool_cats = is_countable( $all_the_cool_cats ) ? count( $all_the_cool_cats ) : 0;
set_transient( 'affinity_categories', $all_the_cool_cats );
}

View file

@ -138,6 +138,9 @@ add_action( 'wp_head', 'altofocus_pingback_header' );
*/
function altofocus_slideshow_gallery_filter( $output, $attr ) {
$id = null;
$order = null;
$size = null;
global $post;
static $count = 0;
@ -157,7 +160,7 @@ function altofocus_slideshow_gallery_filter( $output, $attr ) {
}
}
extract(shortcode_atts(array(
$short_atts = shortcode_atts(array(
'order' => 'ASC',
'orderby' => 'menu_order ID',
'id' => $post->ID,
@ -168,7 +171,8 @@ function altofocus_slideshow_gallery_filter( $output, $attr ) {
'size' => 'large',
'include' => '',
'exclude' => ''
), $attr));
), $attr);
extract( $short_atts );
$id = intval($id);

View file

@ -123,7 +123,7 @@ function altofocus_categorized_blog() {
) );
// Count the number of categories that are attached to the posts.
$all_the_cool_cats = count( $all_the_cool_cats );
$all_the_cool_cats = is_countable( $all_the_cool_cats ) ? count( $all_the_cool_cats ) : 0;
set_transient( 'altofocus_categories', $all_the_cool_cats );
}

View file

@ -48,6 +48,7 @@ if ( ! function_exists( 'apostrophe_2_entry_footer' ) ) :
*/
function apostrophe_2_entry_footer() {
$apostrophe_2_tags = null;
// Show categories, tags, and author if we're on a post page
if ( 'post' === get_post_type() ) {
$categories_list = get_the_category_list();