class-ryte-option.php
3.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin
*/
/**
* This class handles the data for the option where the Ryte data is stored.
*
* @deprecated 19.6
* @codeCoverageIgnore
*/
class WPSEO_Ryte_Option {
/**
* Indicates the data is not fetched.
*
* @deprecated 19.6
* @var int
*/
const NOT_FETCHED = 0;
/**
* Indicates the option is indexable.
*
* @deprecated 19.6
* @var int
*/
const IS_INDEXABLE = 0;
/**
* Indicates the option is not indexable.
*
* @deprecated 19.6
* @var int
*/
const IS_NOT_INDEXABLE = 0;
/**
* Indicates the data could not be fetched.
*
* @deprecated 19.6
* @var int
*/
const CANNOT_FETCH = -1;
/**
* The name of the option where data will be stored.
*
* @deprecated 19.6
* @var string
*/
const OPTION_NAME = '';
/**
* The key of the status in the option.
*
* @deprecated 19.6
* @var string
*/
const STATUS = '';
/**
* The key of the last fetch date in the option.
*
* @deprecated 19.6
* @var string
*/
const LAST_FETCH = '';
/**
* The limit for fetching the status manually.
*
* @deprecated 19.6
* @var int
*/
const FETCH_LIMIT = 0;
/**
* Setting the object by setting the properties.
*
* @deprecated 19.6
* @codeCoverageIgnore
*/
public function __construct() {
_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
}
/**
* Getting the status from the option.
*
* @deprecated 19.6
* @codeCoverageIgnore
*
* @return int|string
*/
public function get_status() {
_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
return -1;
}
/**
* Saving the status to the options.
*
* @deprecated 19.6
* @codeCoverageIgnore
*
* @param string $status The status to save.
*/
public function set_status( $status ) {
_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
}
/**
* Saving the last fetch timestamp to the options.
*
* @deprecated 19.6
* @codeCoverageIgnore
*
* @param int $timestamp Timestamp with the new value.
*/
public function set_last_fetch( $timestamp ) {
_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
}
/**
* Determines whether the indexability status should be fetched.
*
* If LAST_FETCH isn't set, we assume the indexability status hasn't been fetched
* yet and return true. Then, we check whether the last fetch is within the
* FETCH_LIMIT time interval (15 seconds) to avoid too many consecutive API calls.
*
* @deprecated 19.6
* @codeCoverageIgnore
*
* @return bool Whether the indexability status should be fetched.
*/
public function should_be_fetched() {
_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
return false;
}
/**
* Saving the option with the current data.
*
* @deprecated 19.6
* @codeCoverageIgnore
*/
public function save_option() {
_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
}
/**
* Returns the value of the onpage_enabled status.
*
* @deprecated 19.6
* @codeCoverageIgnore
*
* @return bool
*/
public function is_enabled() {
_deprecated_function( __METHOD__, 'Yoast SEO 19.6' );
return false;
}
}