From fc9b99555c4621f55d62410a8aaca514593466d4 Mon Sep 17 00:00:00 2001 From: Mike Hansen Date: Fri, 22 Sep 2023 08:28:25 -0400 Subject: [PATCH] Theme label keys --- src/Listeners/Theme.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Listeners/Theme.php b/src/Listeners/Theme.php index 0dd9757..2764b1a 100644 --- a/src/Listeners/Theme.php +++ b/src/Listeners/Theme.php @@ -36,6 +36,7 @@ public function register_hooks() { public function theme_changed( $new_option, $old_option ) { if ( $new_option !== $old_option ) { $data = array( + 'label_key' => 'new_theme', 'old_theme' => $old_option, 'new_theme' => $new_option, ); @@ -53,7 +54,7 @@ public function theme_changed( $new_option, $old_option ) { public function mojo_preview() { global $theme; if ( isset( $_GET['page'] ) && 'mojo-theme-preview' === $_GET['page'] && ! is_wp_error( $theme ) ) { - $this->push( 'mojo_theme_preview', array( 'theme' => $theme ) ); + $this->push( 'mojo_theme_preview', array( 'label_key' => 'theme', 'theme' => $theme ) ); } } @@ -64,6 +65,6 @@ public function mojo_preview() { */ public function browse_wporg_themes() { $category = ( isset( $_GET['browse'] ) ) ? esc_attr( $_GET['browse'] ) : 'featured'; - $this->push( 'browse_wporg_themes', array( 'category' => $category ) ); + $this->push( 'browse_wporg_themes', array( 'label_key' => 'category', 'category' => $category ) ); } }