From 09ce0808bc659b32d131a3cea4ecd64bbfd531d0 Mon Sep 17 00:00:00 2001 From: Kamran Abdul Aziz Date: Sat, 8 Aug 2026 01:23:33 +0530 Subject: [PATCH] Show a status-aware empty state on My Patterns --- .../patterns/_grid-mine.php | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) 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'] ); + ?>
@@ -68,6 +75,19 @@ + + +

+ + + +
+ +
+ +
+ +

@@ -79,6 +99,7 @@
+