PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 18.5
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v18.5
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 / helpers / open-graph / values-helper.php

values-helper.php in Yoast SEO – Advanced SEO with real-time guidance and built-in AI 18.5, at src/helpers/open-graph/values-helper.php

86 lines 2.6 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\Helpers\Open_Graph;
4
5 /**
6 * A helper object for the filtering of values.
7 */
8 class Values_Helper {
9
10 /**
11 * Filters the Open Graph title.
12 *
13 * @param string $title The default title.
14 * @param string $object_type The object type.
15 * @param string $object_subtype The object subtype.
16 *
17 * @return string The open graph title.
18 */
19 public function get_open_graph_title( $title, $object_type, $object_subtype ) {
20 /**
21 * Allow changing the Open Graph title.
22 *
23 * @param string $title The default title.
24 * @param string $object_subtype The object subtype.
25 */
26 return \apply_filters( 'Yoast\WP\SEO\open_graph_title_' . $object_type, $title, $object_subtype );
27 }
28
29 /**
30 * Filters the Open Graph description.
31 *
32 * @param string $description The default description.
33 * @param string $object_type The object type.
34 * @param string $object_subtype The object subtype.
35 *
36 * @return string The open graph description.
37 */
38 public function get_open_graph_description( $description, $object_type, $object_subtype ) {
39 /**
40 * Allow changing the Open Graph description.
41 *
42 * @param string $description The default description.
43 * @param string $object_subtype The object subtype.
44 */
45 return \apply_filters( 'Yoast\WP\SEO\open_graph_description_' . $object_type, $description, $object_subtype );
46 }
47
48 /**
49 * Filters the Open Graph image ID.
50 *
51 * @param int $image_id The default image ID.
52 * @param string $object_type The object type.
53 * @param string $object_subtype The object subtype.
54 *
55 * @return string The open graph image ID.
56 */
57 public function get_open_graph_image_id( $image_id, $object_type, $object_subtype ) {
58 /**
59 * Allow changing the Open Graph image ID.
60 *
61 * @param int $image_id The default image ID.
62 * @param string $object_subtype The object subtype.
63 */
64 return \apply_filters( 'Yoast\WP\SEO\open_graph_image_id_' . $object_type, $image_id, $object_subtype );
65 }
66
67 /**
68 * Filters the Open Graph image URL.
69 *
70 * @param string $image The default image URL.
71 * @param string $object_type The object type.
72 * @param string $object_subtype The object subtype.
73 *
74 * @return string The open graph image URL.
75 */
76 public function get_open_graph_image( $image, $object_type, $object_subtype ) {
77 /**
78 * Allow changing the Open Graph image URL.
79 *
80 * @param string $image The default image URL.
81 * @param string $object_subtype The object subtype.
82 */
83 return \apply_filters( 'Yoast\WP\SEO\open_graph_image_' . $object_type, $image, $object_subtype );
84 }
85 }
86