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-webpage.php

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

70 lines 1.5 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\WebPage;
9
10 /**
11 * Returns schema WebPage data.
12 *
13 * @since 10.2
14 * @deprecated 14.0
15 */
16 class WPSEO_Schema_WebPage extends WPSEO_Deprecated_Graph_Piece {
17
18 /**
19 * The date helper.
20 *
21 * @var WPSEO_Date_Helper
22 */
23 protected $date;
24
25 /**
26 * WPSEO_Schema_WebPage constructor.
27 *
28 * @deprecated 14.0
29 * @codeCoverageIgnore
30 *
31 * @param null $context The context. No longer used but present for BC.
32 */
33 public function __construct( $context = null ) {
34 parent::__construct( WebPage::class );
35
36 $this->date = new WPSEO_Date_Helper();
37 }
38
39 /**
40 * Adds an author property to the $data if the WebPage is not represented.
41 *
42 * @deprecated 14.0
43 * @codeCoverageIgnore
44 *
45 * @param array $data The WebPage schema.
46 * @param WP_Post $post The post the context is representing.
47 *
48 * @return array The WebPage schema.
49 */
50 public function add_author( $data, $post ) {
51 _deprecated_function( __METHOD__, 'WPSEO 14.0', 'Yoast\WP\SEO\Generators\Schema\WebPage::add_author' );
52
53 return $this->stable->add_author( $data, $post );
54 }
55
56 /**
57 * If we have an image, make it the primary image of the page.
58 *
59 * @deprecated 14.0
60 * @codeCoverageIgnore
61 *
62 * @param array $data WebPage schema data.
63 */
64 public function add_image( &$data ) {
65 _deprecated_function( __METHOD__, 'WPSEO 14.0', 'Yoast\WP\SEO\Generators\Schema\WebPage::add_image' );
66
67 $this->stable->add_image( $data );
68 }
69 }
70