From c48e08c89dfad98576cc6d9c27aa331a7be1f07b Mon Sep 17 00:00:00 2001 From: Joey Blake Date: Tue, 24 Mar 2020 14:57:10 -0400 Subject: [PATCH] add carbon_fields_get_assets_context filter to allow forcing of context --- core/Loader/Loader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/Loader/Loader.php b/core/Loader/Loader.php index 588239c92..1bc0df624 100644 --- a/core/Loader/Loader.php +++ b/core/Loader/Loader.php @@ -140,7 +140,7 @@ public function enqueue_media_browser() { * @return string */ protected function get_assets_context() { - return wp_script_is( 'wp-element' ) ? 'gutenberg' : 'classic'; + return apply_filters( 'carbon_fields_get_assets_context', wp_script_is( 'wp-element' ) ? 'gutenberg' : 'classic' ); } /**