PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 28.3
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v28.3
28.5 28.4 28.3 28.2 28.1 28.0 27.9 27.8 27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 All 129 releases
wordpress-seo / src / integrations / blocks / block-categories.php

block-categories.php in Yoast SEO – Advanced SEO with real-time guidance and built-in AI 28.3, at src/integrations/blocks/block-categories.php

53 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Yoast\WP\SEO\Integrations\Blocks;
4
5 use Yoast\WP\SEO\Integrations\Integration_Interface;
6
7 /**
8 * Internal_Linking_Category block class.
9 */
10 class Internal_Linking_Category implements Integration_Interface {
11
12 /**
13 * {@inheritDoc}
14 */
15 public static function get_conditionals() {
16 return [];
17 }
18
19 /**
20 * {@inheritDoc}
21 */
22 public function register_hooks() {
23 \add_filter( 'block_categories_all', [ $this, 'add_block_categories' ] );
24 }
25
26 /**
27 * Adds Yoast block categories.
28 *
29 * @param array $categories The categories.
30 * @return array The filtered categories.
31 */
32 public function add_block_categories( $categories ) {
33 $categories[] = [
34 'slug' => 'yoast-structured-data-blocks',
35 'title' => \sprintf(
36 /* translators: %1$s expands to Yoast. */
37 \__( '%1$s Structured Data Blocks', 'wordpress-seo' ),
38 'Yoast',
39 ),
40 ];
41 $categories[] = [
42 'slug' => 'yoast-internal-linking-blocks',
43 'title' => \sprintf(
44 /* translators: %1$s expands to Yoast. */
45 \__( '%1$s Internal Linking Blocks', 'wordpress-seo' ),
46 'Yoast',
47 ),
48 ];
49
50 return $categories;
51 }
52 }
53