admin_url( 'admin-ajax.php' ), 'pluginurl' => Consts::get_url(), 'wooapikey' => get_option( 'AGB_woo_ck' ), 'wooapisecret' => get_option( 'AGB_woo_cs' ) ) ); // Blocks deactivator wp_enqueue_script( Consts::PLUGIN_NAME . '-deactivator', Consts::get_url() . 'dist/deactivator.build.js', [ 'wp-edit-post' ] ); wp_localize_script( Consts::PLUGIN_NAME . '-deactivator', 'advancedGutenbergBlocksDeactivated', Blocks::get_disabled_blocks( 'json' ) ); // Special styles for the Editor wp_enqueue_style( 'advanced-gutenberg-blocks-editor', Consts::get_url() . 'dist/blocks.editor.build.css', [ 'wp-edit-blocks' ], Consts::VERSION ); } public function add_block_category( $categories ) { $categories[] = array( 'slug' => 'agb', 'title' => __( 'Advanced Gutenberg Blocks', 'advanced-gutenberg-blocks' ), ); return $categories; } }