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

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

55 lines 1.2 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\Article;
9
10 /**
11 * Returns schema Article data.
12 *
13 * @since 10.2
14 * @deprecated 14.0
15 */
16 class WPSEO_Schema_Article 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_Article constructor.
27 *
28 * @deprecated 14.0
29 * @codeCoverageIgnore
30 *
31 * @param array|null $context The context. No longer used but present for BC.
32 */
33 public function __construct( $context = null ) {
34 parent::__construct( Article::class );
35
36 $this->date = new WPSEO_Date_Helper();
37 }
38
39 /**
40 * Determines whether a given post type should have Article schema.
41 *
42 * @deprecated 14.0
43 * @codeCoverageIgnore
44 *
45 * @param string|null $post_type Post type to check.
46 *
47 * @return bool True if it has article schema, false if not.
48 */
49 public static function is_article_post_type( $post_type = null ) {
50 _deprecated_function( __METHOD__, 'WPSEO 14.0', 'YoastSEO()->helpers->schema->article->is_article_post_type' );
51
52 return YoastSEO()->helpers->schema->article->is_article_post_type( $post_type );
53 }
54 }
55