PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 18.1
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v18.1
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 / admin / extension.php

extension.php in Yoast SEO – Advanced SEO with real-time guidance and built-in AI 18.1, at src/deprecated/admin/extension.php

141 lines 2.7 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\Admin
6 */
7
8 // phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound -- Reason: The class is deprecated.
9
10 /**
11 * Represents the values for a single Yoast Premium extension plugin.
12 *
13 * @deprecated 15.4
14 */
15 class WPSEO_Extension {
16
17 /**
18 * Holds the extension config.
19 *
20 * @var array
21 */
22 protected $config = [];
23
24 /**
25 * WPSEO_Extension constructor.
26 *
27 * @deprecated 15.4
28 * @codeCoverageIgnore
29 *
30 * @param array $config The config to use.
31 */
32 public function __construct( array $config ) {
33 _deprecated_function( __METHOD__, 'WPSEO 15.4' );
34
35 $this->config = $config;
36 }
37
38 /**
39 * Returns the product title.
40 *
41 * @deprecated 15.4
42 * @codeCoverageIgnore
43 *
44 * @return string The set title.
45 */
46 public function get_title() {
47 _deprecated_function( __METHOD__, 'WPSEO 15.4' );
48
49 return $this->config['title'];
50 }
51
52 /**
53 * Returns the product title to display.
54 *
55 * @deprecated 15.4
56 * @codeCoverageIgnore
57 *
58 * @return string The title to display on the license page.
59 */
60 public function get_display_title() {
61 _deprecated_function( __METHOD__, 'WPSEO 15.4' );
62
63 return empty( $this->config['display_title'] ) ? $this->config['title'] : $this->config['display_title'];
64 }
65
66 /**
67 * Returns URL to the page where the product can be bought.
68 *
69 * @deprecated 15.4
70 * @codeCoverageIgnore
71 *
72 * @return string The buy url.
73 */
74 public function get_buy_url() {
75 _deprecated_function( __METHOD__, 'WPSEO 15.4' );
76
77 return $this->config['buyUrl'];
78 }
79
80 /**
81 * Returns URL to the page with more info.
82 *
83 * @deprecated 15.4
84 * @codeCoverageIgnore
85 *
86 * @return string The url to the info page.
87 */
88 public function get_info_url() {
89 _deprecated_function( __METHOD__, 'WPSEO 15.4' );
90
91 return $this->config['infoUrl'];
92 }
93
94 /**
95 * Returns the image.
96 *
97 * @deprecated 15.4
98 * @codeCoverageIgnore
99 *
100 * @return string The image.
101 */
102 public function get_image() {
103 _deprecated_function( __METHOD__, 'WPSEO 15.4' );
104
105 return $this->config['image'];
106 }
107
108 /**
109 * Returns the buy button value if set, otherwise fallback to the title.
110 *
111 * @deprecated 15.4
112 * @codeCoverageIgnore
113 *
114 * @return string The buy button.
115 */
116 public function get_buy_button() {
117 _deprecated_function( __METHOD__, 'WPSEO 15.4' );
118
119 if ( isset( $this->config['buy_button'] ) ) {
120 return $this->config['buy_button'];
121 }
122
123 return $this->config['title'];
124 }
125
126 /**
127 * Returns the benefits.
128 *
129 * @deprecated 15.4
130 * @codeCoverageIgnore
131 *
132 * @return array The array with benefits.
133 */
134 public function get_benefits() {
135 _deprecated_function( __METHOD__, 'WPSEO 15.4' );
136
137 return $this->config['benefits'];
138 }
139 }
140 // phpcs:enable
141