Skip to content

Commit

Permalink
Add missing array() argument in has_post_format()
Browse files Browse the repository at this point in the history
Fixes #128
  • Loading branch information
jeremyfelt committed Jan 18, 2024
1 parent e07aea0 commit de7e2bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/block.php
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ function meta_rest_response( $request ) {
*/
function filter_post_classes( $class_names, $class_name, $post_id ) {
if ( in_array( 'cab-item', $class_name, true ) ) {
$format = ( has_post_format( $post_id ) ) ? get_post_format( $post_id ) : 'standard';
$format = ( has_post_format( array(), $post_id ) ) ? get_post_format( $post_id ) : 'standard';

// Filter out the `cab-item` flag and a handful of default classes.
$class_names = array_diff(
Expand Down

0 comments on commit de7e2bb

Please sign in to comment.