check_enabled() ) { return; } if ( ! $this->asset_manager ) { $this->asset_manager = new WPSEO_Admin_Asset_Manager(); } $this->asset_manager->enqueue_script( 'structured-data-blocks' ); $this->asset_manager->enqueue_style( 'structured-data-blocks' ); } /** * Adds the structured data blocks category to the Gutenberg categories. * * @param array $categories The current categories. * * @return array The updated categories. */ public function add_block_category( $categories ) { if ( $this->check_enabled() ) { $categories[] = [ 'slug' => 'yoast-structured-data-blocks', 'title' => sprintf( /* translators: %1$s expands to Yoast. */ __( '%1$s Structured Data Blocks', 'wordpress-seo' ), 'Yoast' ), ]; } return $categories; } }