diff --git a/public_html/wp-content/themes/wporg-pattern-directory-2024/patterns/_grid-mine.php b/public_html/wp-content/themes/wporg-pattern-directory-2024/patterns/_grid-mine.php index 919ca207..69b5856f 100644 --- a/public_html/wp-content/themes/wporg-pattern-directory-2024/patterns/_grid-mine.php +++ b/public_html/wp-content/themes/wporg-pattern-directory-2024/patterns/_grid-mine.php @@ -6,6 +6,13 @@ * Inserter: no */ +global $wp_query; + +// When a status filter is applied, an empty result only means the filter +// matched nothing, not that the user has never created a pattern. This reads +// the same query var that filters the list in modify_query_loop_block_query_vars(). +$is_status_filtered = ! empty( $wp_query->query['status'] ); + ?>