Skip to content

Commit fc29602

Browse files
improve format setting code
1 parent 3afb670 commit fc29602

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/wp-includes/abilities/class-wp-post-type-abilities.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,8 +1174,7 @@ private static function format_post( WP_Post $post, WP_Post_Type $post_type_obje
11741174
}
11751175

11761176
if ( post_type_supports( $slug, 'post-formats' ) ) {
1177-
$format = get_post_format( $post );
1178-
$data['format'] = $format ? $format : 'standard';
1177+
$data['format'] = get_post_format( $post ) ?: 'standard';
11791178
}
11801179

11811180
if ( post_type_supports( $slug, 'comments' ) ) {

0 commit comments

Comments
 (0)