Changeset 3006096
- Timestamp:
- 12/06/2023 09:41:11 AM (2 years ago)
- Location:
- ga-admin-taxonomy-search/trunk
- Files:
-
- 3 edited
-
ga-admin-taxonomy-search.php (modified) (2 diffs)
-
lib/class.gats-admin.php (modified) (1 diff)
-
resources/js/admin_js.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ga-admin-taxonomy-search/trunk/ga-admin-taxonomy-search.php
r2971746 r3006096 2 2 /* 3 3 Plugin Name: GA Admin Taxonomy Search 4 Version: 0.0. 24 Version: 0.0.3 5 5 Tags: wordpress admin taxonomy search, category search, taxonomy search, search in category, categories search, category filter, filter categories, categories filter, admin filter, taxonomy filter, term filter, terms filter, admin search terms, admin search taxonomy plugin, taxonomy filter plugin, term filter plugin, category filter plugin 6 6 Plugin URI: https://grigorasatryan.com/plugins/ga-admin-tax-search … … 15 15 */ 16 16 17 // Our prefix is GATS / gats (just 3-4 chars)17 // Our prefixes are GATS / gats 18 18 19 define( 'GATSVersion', '0.0. 2' );19 define( 'GATSVersion', '0.0.3' ); 20 20 define( 'GATS_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); 21 21 define( 'GATS_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); -
ga-admin-taxonomy-search/trunk/lib/class.gats-admin.php
r2292806 r3006096 32 32 wp_enqueue_style( 'gats-admin-style', GATS_PLUGIN_URL.'resources/style/admin_style.css', null, GATSVersion, 'all' ); 33 33 wp_enqueue_script( 'gats-admin-js', GATS_PLUGIN_URL.'resources/js/admin_js.js' , array('jquery'), GATSVersion, true ); 34 35 if( self::wp_is_gutenberg_editor() ) { 36 $editor_type = 'Gutenberg'; 37 } else { 38 $editor_type = 'Classic'; 39 } 40 34 41 wp_localize_script( 'gats-admin-js', 'gats_infos', 35 42 array( 36 'GATS_NAME' => GATS_NAME 43 'GATS_NAME' => GATS_NAME, 44 'editor_type' => $editor_type 37 45 ) 38 46 ); 47 } 48 49 public static function wp_is_gutenberg_editor() { 50 if( function_exists( 'is_gutenberg_page' ) && is_gutenberg_page() ) { 51 return true; 52 } 53 54 $current_screen = get_current_screen(); 55 if ( method_exists( $current_screen, 'is_block_editor' ) && $current_screen->is_block_editor() ) { 56 return true; 57 } 58 return false; 39 59 } 40 60 -
ga-admin-taxonomy-search/trunk/resources/js/admin_js.js
r2292806 r3006096 9 9 var gats_checkbox_el = '.categorychecklist li'; 10 10 11 var editor_type = 'Classic'; 12 if( typeof wp !== 'undefined' && typeof wp.blocks !== 'undefined' ) 13 editor_type = 'Gutenberg'; 11 var editor_type = gats_infos.editor_type; 14 12 15 13 if( editor_type == 'Classic' ){
Note: See TracChangeset
for help on using the changeset viewer.