diff --git a/gf-code-chest/gfcc-add-in-use-menu-indicator.php b/gf-code-chest/gfcc-add-in-use-menu-indicator.php new file mode 100644 index 00000000..fd670fbe --- /dev/null +++ b/gf-code-chest/gfcc-add-in-use-menu-indicator.php @@ -0,0 +1,25 @@ +get_custom_js( $form ) ); + $has_css_code = ! empty( gwiz_gf_code_chest()->get_custom_css( $form ) ); + + // If there is code in either setting, append the ✔ symbol to the Code Chest menu item + if ( $has_js_code || $has_css_code ) { + foreach ( $menu_items as &$menu_item ) { + if ( $menu_item['name'] === 'gf-code-chest' ) { + $menu_item['label'] .= ' ✔'; + break; + } + } + } + + return $menu_items; +}, 16, 2 );