style: replace short ternary operator with ?? / explicit ternary to pass WordPress-Core sniff

This commit is contained in:
peptiderepo
2026-04-23 03:38:28 +00:00
parent 9f8c47d752
commit 996bd2fd44
11 changed files with 16 additions and 17 deletions

View File

@@ -171,7 +171,7 @@ class PRAutoBlogger_Posts_Widget {
'category' => sanitize_text_field( $atts['category'] ),
'title' => sanitize_text_field( $atts['title'] ),
'subtitle' => sanitize_text_field( $atts['subtitle'] ),
'archiveUrl' => esc_url( get_post_type_archive_link( 'post' ) ?: '' ),
'archiveUrl' => esc_url( get_post_type_archive_link( 'post' ) ?? '' ),
)
);
}
@@ -259,7 +259,7 @@ class PRAutoBlogger_Posts_Widget {
'date' => get_the_date( 'c', $post ),
'category_name' => $category_name,
'category_slug' => $category_slug,
'featured_image' => $featured_image ?: '',
'featured_image' => $featured_image ?? '',
'word_count' => $word_count,
);
}