PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 18.4
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v18.4
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 / deprecated / frontend / schema / class-schema-faq.php

class-schema-faq.php in Yoast SEO – Advanced SEO with real-time guidance and built-in AI 18.4, at src/deprecated/frontend/schema/class-schema-faq.php

81 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * WPSEO plugin file.
4 *
5 * @package WPSEO\Frontend\Schema
6 */
7
8 use Yoast\WP\SEO\Generators\Schema\FAQ;
9
10 /**
11 * Returns schema FAQ data.
12 *
13 * @since 11.3
14 * @deprecated 14.0
15 */
16 class WPSEO_Schema_FAQ extends WPSEO_Deprecated_Graph_Piece {
17
18 /**
19 * WPSEO_Schema_FAQ constructor.
20 *
21 * @deprecated 14.0
22 * @codeCoverageIgnore
23 *
24 * @param null $context The context. No longer used but present for BC.
25 */
26 public function __construct( $context = null ) {
27 parent::__construct( FAQ::class );
28 }
29
30 /**
31 * If this fires, we know there's an FAQ block ont he page, so filter the page type.
32 *
33 * @deprecated 14.0
34 * @codeCoverageIgnore
35 *
36 * @param array $blocks The blocks of this type on the current page.
37 */
38 public function prepare_schema( $blocks ) {
39 _deprecated_function( __METHOD__, 'WPSEO 14.0' );
40 }
41
42 /**
43 * Change the page type to an array if it isn't one, include FAQPage.
44 *
45 * @deprecated 14.0
46 * @codeCoverageIgnore
47 *
48 * @param array|string $page_type The page type.
49 *
50 * @return array The page type that's now an array.
51 */
52 public function change_schema_page_type( $page_type ) {
53 _deprecated_function( __METHOD__, 'WPSEO 14.0' );
54
55 if ( ! is_array( $page_type ) ) {
56 $page_type = [ $page_type ];
57 }
58 $page_type[] = 'FAQPage';
59
60 return $page_type;
61 }
62
63 /**
64 * Add the Questions in our FAQ blocks as separate pieces to the graph.
65 *
66 * @deprecated 14.0
67 * @codeCoverageIgnore
68 *
69 * @param array $graph Schema data for the current page.
70 * @param WP_Block_Parser_Block $block The block data array.
71 * @param WPSEO_Schema_Context $context A value object with context variables.
72 *
73 * @return array Our Schema graph.
74 */
75 public function render_schema_questions( $graph, $block, $context ) {
76 _deprecated_function( __METHOD__, 'WPSEO 14.0' );
77
78 return [];
79 }
80 }
81