From c0e2a4144fde6bc3dac419446beb88e8fa5d734b Mon Sep 17 00:00:00 2001 From: jasonbahl Date: Sat, 10 Jun 2017 17:39:30 -0600 Subject: [PATCH] Fixing issue with the assets not enqueueing properly --- wp-graphiql.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-graphiql.php b/wp-graphiql.php index 8dac9b0..a4eb35b 100644 --- a/wp-graphiql.php +++ b/wp-graphiql.php @@ -104,7 +104,7 @@ public function enqueue_react_app() { /** * Only enqueue the assets on the proper admin page, and only if WPGraphQL is also active */ - if ( 'toplevel_page_wp-graphiql/wp-graphiql' === get_current_screen()->id && $this->is_wpgraphql_active() ) { + if ( strpos( get_current_screen()->id, 'wp-graphiql/wp-graphiql' ) && $this->is_wpgraphql_active() ) { wp_enqueue_style( 'wp-graphiql', $this->get_app_stylesheet(), array(), false, false ); wp_enqueue_script( 'wp-graphiql-helpers', $this->get_app_script_helpers(), array( 'jquery' ), false, true );