PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 19.0
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v19.0
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-utils.php

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

66 lines 1.9 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 /**
9 * Schema utility functions.
10 *
11 * @since 11.6
12 * @deprecated 14.0
13 */
14 class WPSEO_Schema_Utils {
15
16 /**
17 * Retrieves a user's Schema ID.
18 *
19 * @deprecated 14.0
20 * @codeCoverageIgnore
21 *
22 * @param int $user_id The ID of the User you need a Schema ID for.
23 * @param WPSEO_Schema_Context $context A value object with context variables.
24 *
25 * @return string The user's schema ID.
26 */
27 public static function get_user_schema_id( $user_id, $context ) {
28 _deprecated_function( __METHOD__, 'WPSEO 14.0', 'YoastSEO()->helpers->schema->id->get_user_schema_id' );
29 return YoastSEO()->helpers->schema->id->get_user_schema_id( $user_id, $context );
30 }
31
32 /**
33 * Retrieves the post title with fallback to `No title`.
34 *
35 * @deprecated 14.0
36 * @codeCoverageIgnore
37 *
38 * @param int $post_id Optional. Post ID.
39 *
40 * @return string The post title with fallback to `No title`.
41 */
42 public static function get_post_title_with_fallback( $post_id = 0 ) {
43 _deprecated_function( __METHOD__, 'WPSEO 14.0', ' YoastSEO()->helpers->post->get_post_title_with_fallback' );
44 return YoastSEO()->helpers->post->get_post_title_with_fallback( $post_id );
45 }
46
47 /**
48 * Adds the `inLanguage` property to a Schema piece.
49 *
50 * Must use one of the language codes from the IETF BCP 47 standard. The
51 * language tag syntax is made of one or more subtags separated by a hyphen
52 * e.g. "en", "en-US", "zh-Hant-CN".
53 *
54 * @deprecated 14.0
55 * @codeCoverageIgnore
56 *
57 * @param array $data The Schema piece data.
58 *
59 * @return array The Schema piece data with added language property.
60 */
61 public static function add_piece_language( $data ) {
62 _deprecated_function( __METHOD__, 'WPSEO 14.0', 'YoastSEO()->helpers->schema->language->add_piece_language' );
63 return YoastSEO()->helpers->schema->language->add_piece_language( $data );
64 }
65 }
66