PATH:
home
/
letacommog
/
morandas1
/
wp-content
/
plugins
/
wordpress-seo
/
inc
<?php /** * WPSEO plugin file. * * @package WPSEO\Admin */ /** * Class to load assets required for structured data blocks. */ class WPSEO_Structured_Data_Blocks implements WPSEO_WordPress_Integration { /** * An instance of the WPSEO_Admin_Asset_Manager class. * * @var WPSEO_Admin_Asset_Manager */ protected $asset_manager; /** * Registers hooks for Structured Data Blocks with WordPress. */ public function register_hooks() { add_action( 'enqueue_block_editor_assets', [ $this, 'enqueue_block_editor_assets' ] ); add_filter( 'block_categories', [ $this, 'add_block_category' ] ); } /** * Checks whether the Structured Data Blocks are disabled. * * @return boolean */ private function check_enabled() { /** * Filter: 'wpseo_enable_structured_data_blocks' - Allows disabling Yoast's schema blocks entirely. * * @api bool If false, our structured data blocks won't show. */ $enabled = apply_filters( 'wpseo_enable_structured_data_blocks', true ); return $enabled; } /** * Enqueue Gutenberg block assets for backend editor. */ public function enqueue_block_editor_assets() { if ( ! $this->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; } }
[+]
..
[-] wpseo-functions.php
[edit]
[-] class-structured-data-blocks.php
[edit]
[-] health-check-page-comments.php
[edit]
[-] class-rewrite.php
[edit]
[-] interface-wpseo-wordpress-ajax-integration.php
[edit]
[-] class-my-yoast-api-request.php
[edit]
[+]
exceptions
[-] class-upgrade.php
[edit]
[-] health-check.php
[edit]
[-] class-wpseo-primary-term.php
[edit]
[-] index.php
[edit]
[-] class-wpseo-image-utils.php
[edit]
[-] wpseo-non-ajax-functions.php
[edit]
[-] class-wpseo-utils.php
[edit]
[-] wpseo-functions-deprecated.php
[edit]
[-] class-post-type.php
[edit]
[-] class-wpseo-admin-bar-menu.php
[edit]
[-] class-wpseo-rank.php
[edit]
[-] class-wpseo-shortlinker.php
[edit]
[-] class-addon-manager.php
[edit]
[-] class-wpseo-validator.php
[edit]
[-] class-wpseo-replacement-variable.php
[edit]
[+]
options
[-] class-wpseo-custom-fields.php
[edit]
[-] class-wpseo-features.php
[edit]
[-] language-utils.php
[edit]
[+]
sitemaps
[-] class-wpseo-content-images.php
[edit]
[-] class-upgrade-history.php
[edit]
[-] class-wpseo-custom-taxonomies.php
[edit]
[-] date-helper.php
[edit]
[-] class-wpseo-meta.php
[edit]
[+]
endpoints
[-] class-wpseo-installation.php
[edit]
[-] class-wpseo-endpoint-factory.php
[edit]
[-] class-wpseo-replace-vars.php
[edit]
[-] class-wpseo-statistics.php
[edit]
[-] interface-wpseo-wordpress-integration.php
[edit]
[+]
indexables