Skip to content

Commit

Permalink
Merge pull request #130 from happyprime/fix/128-has-post-format
Browse files Browse the repository at this point in the history
Add missing `array()` argument in `has_post_format()`
  • Loading branch information
jeremyfelt authored Jan 18, 2024
2 parents e07aea0 + de7e2bb commit 6c411b8
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 6c411b8

Please sign in to comment.