get_all_registered() as $block_name => $block_type ) { // Front-end script. if ( ! empty( $block_type->editor_script ) ) { wp_enqueue_script( $block_type->editor_script ); } } // Enqueue Scripts. $suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min'; // Use minified libraries if SCRIPT_DEBUG is turned off. wp_enqueue_style( 'block-manager-styles', plugins_url( 'dist/css/style.css', __FILE__ ), array(), BLOCK_MANAGER_VERSION ); wp_enqueue_script( 'block-manager-admin', plugins_url( 'dist/js/gbm-admin' . $suffix . '.js', __FILE__ ), array( 'wp-blocks', 'wp-element', 'wp-data', 'wp-edit-post', 'wp-components', 'wp-block-library' ), BLOCK_MANAGER_VERSION, true ); // Localize Scripts. wp_localize_script( 'block-manager-admin', 'gbm_localize', array( 'disabledBlocks' => Gutenberg_Block_Manager::gbm_get_disabled_blocks(), 'filteredBlocks' => Gutenberg_Block_Manager::gbm_get_filtered_blocks(), 'filteredCategories' => Gutenberg_Block_Manager::gbm_get_filtered_cats(), 'root' => esc_url_raw( rest_url() ), 'nonce' => wp_create_nonce( 'wp_rest' ), 'enable' => __( 'Enable', 'block-manager' ), 'disable' => __( 'Disable', 'block-manager' ), 'enable_all' => __( 'Enable All', 'block-manager' ), 'disable_all' => __( 'Disable All', 'block-manager' ), 'toggle_all' => __( 'Toggle All Blocks', 'block-manager' ), 'toggle' => __( 'Toggle Block Activation', 'block-manager' ), 'search_label' => __( 'Filter Blocks', 'block-manager' ), 'submit' => __( 'Submit', 'block-manager' ), 'loading' => __( 'Loading Blocks', 'block-manager' ), 'loading_export' => __( 'Getting export data...', 'block-manager' ), 'copy' => __( 'Copy Code', 'block-manager' ), 'copied' => __( 'Copied', 'block-manager' ), 'close' => __( 'Close', 'block-manager' ), 'grid' => __( 'Grid', 'block-manager' ), 'list' => __( 'List', 'block-manager' ), 'cat_switch' => __( 'Block Category', 'block-manager' ), 'updated' => __( 'Category Updated', 'block-manager' ), 'block_switch' => __( 'Block Name', 'block-manager' ), 'reset_blocks' => __( 'Reset', 'block-manager' ), 'reset_blocks_title' => __( 'Clear all disabled blocks.', 'block-manager' ), 'reset_cats' => __( 'Reset Categories', 'block-manager' ), 'cat_intro' => __( 'The Category Switcher provides functionality for changing the categories of Gutenberg blocks.', 'block-manager' ), 'cat_intro2' => __( 'Changing a block category will update it\'s location in the Gutenberg Block Inserter while editing posts.', 'block-manager' ), 'export' => __( 'Export', 'block-manager' ), 'export_title' => __( 'Export a list of disabled blocks via WordPress filter. ', 'block-manager' ), 'export_intro' => __( 'Add the the following code to your functions.php to remove blocks at the theme level.', 'block-manager' ), 'filtered_alert' => __( 'This block has been globally disabled via the `gbm_disabled_blocks` filter and cannot be activated.', 'block-manager' ), ) ); } /** * Register submenu item. * * @author ConnektMedia * @since 1.0 */ public function gbm_register_sub_menu() { add_submenu_page( 'options-general.php', esc_html__( 'Block Manager', 'block-manager' ), esc_html__( 'Block Manager', 'block-manager' ), apply_filters( 'block_manager_user_role', 'activate_plugins' ), 'block-manager', array( $this, 'gbm_submenu_page_callback' ) ); } /** * The Block Manager admin page. * * @author ConnektMedia * @since 1.0 */ public function gbm_submenu_page_callback() { $active = 'blocks'; if ( isset( $_GET ) && isset( $_GET['category-switcher'] ) && empty( $_GET['category-switcher'] ) ) { $active = 'categories'; } ?>

--' ); ?>

--' ); ?>

'ajax-load-more', ), array( 'slug' => 'easy-query', ), array( 'slug' => 'instant-images', ), array( 'slug' => 'velocity', ), ); ?>

', '' ); // @codingStandardsIgnoreLine ?>