|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* Legacy/deprecated Sync Setting getter and setter. |
|
4
|
|
|
* |
|
5
|
|
|
* @package automattic/jetpack-sync |
|
6
|
|
|
*/ |
|
7
|
|
|
|
|
8
|
|
|
use Automattic\Jetpack\Sync\Settings; |
|
9
|
|
|
|
|
10
|
|
|
/** |
|
11
|
|
|
* Class Jetpack_Sync_Settings |
|
12
|
|
|
* |
|
13
|
|
|
* @deprecated Use Automattic\Jetpack\Sync\Settings |
|
14
|
|
|
*/ |
|
15
|
|
|
class Jetpack_Sync_Settings { |
|
16
|
|
|
|
|
17
|
|
|
/** |
|
18
|
|
|
* Return all settings |
|
19
|
|
|
* |
|
20
|
|
|
* @deprecated See Automattic/Jetpack/Sync/Settings |
|
21
|
|
|
* |
|
22
|
|
|
* @return array All Sync Settings. |
|
23
|
|
|
*/ |
|
24
|
|
|
public static function get_settings() { |
|
25
|
|
|
_deprecated_function( __METHOD__, 'jetpack-7.5', 'Automattic\Jetpack\Sync\Settings' ); |
|
26
|
|
|
return Settings::get_settings(); |
|
27
|
|
|
} |
|
28
|
|
|
|
|
29
|
|
|
/** |
|
30
|
|
|
* Return a single setting. |
|
31
|
|
|
* |
|
32
|
|
|
* @deprecated See Automattic\Jetpack\Sync\Settings |
|
33
|
|
|
* |
|
34
|
|
|
* @param string $setting Setting to return. |
|
35
|
|
|
* |
|
36
|
|
|
* @return mixed Value of setting. |
|
37
|
|
|
*/ |
|
38
|
|
|
public static function get_setting( $setting ) { |
|
39
|
|
|
_deprecated_function( __METHOD__, 'jetpack-7.5', 'Automattic\Jetpack\Sync\Settings' ); |
|
40
|
|
|
return Settings::get_setting( $setting ); |
|
41
|
|
|
} |
|
42
|
|
|
|
|
43
|
|
|
/** |
|
44
|
|
|
* Update a sync setting |
|
45
|
|
|
* |
|
46
|
|
|
* @deprecated See Automattic\Jetpack\Sync\Settings |
|
47
|
|
|
* |
|
48
|
|
|
* @param mixed $new_settings New setting to set. |
|
49
|
|
|
*/ |
|
50
|
|
|
public static function update_settings( $new_settings ) { |
|
51
|
|
|
_deprecated_function( __METHOD__, 'jetpack-7.5', 'Automattic\Jetpack\Sync\Settings' ); |
|
52
|
|
|
Settings::update_settings( $new_settings ); |
|
53
|
|
|
} |
|
54
|
|
|
|
|
55
|
|
|
/** |
|
56
|
|
|
* Return is_network_setting result. |
|
57
|
|
|
* |
|
58
|
|
|
* @deprecated See Automattic\Jetpack\Sync\Settings |
|
59
|
|
|
* |
|
60
|
|
|
* @param string $setting Setting to check. |
|
61
|
|
|
* |
|
62
|
|
|
* @return bool |
|
63
|
|
|
*/ |
|
64
|
|
|
public static function is_network_setting( $setting ) { |
|
65
|
|
|
_deprecated_function( __METHOD__, 'jetpack-7.5', 'Automattic\Jetpack\Sync\Settings' ); |
|
66
|
|
|
return Settings::is_network_setting( $setting ); |
|
67
|
|
|
} |
|
68
|
|
|
|
|
69
|
|
|
/** |
|
70
|
|
|
* Return blocklisted post types SQL. |
|
71
|
|
|
* |
|
72
|
|
|
* @deprecated See Automattic\Jetpack\Sync\Settings |
|
73
|
|
|
*/ |
|
74
|
|
|
public static function get_blacklisted_post_types_sql() { |
|
75
|
|
|
_deprecated_function( __METHOD__, 'jetpack-7.5', 'Automattic\Jetpack\Sync\Settings' ); |
|
76
|
|
|
return Settings::get_blacklisted_post_types_sql(); |
|
77
|
|
|
} |
|
78
|
|
|
|
|
79
|
|
|
/** |
|
80
|
|
|
* Return allowed post meta SQL. |
|
81
|
|
|
* |
|
82
|
|
|
* @deprecated See Automattic\Jetpack\Sync\Settings |
|
83
|
|
|
* |
|
84
|
|
|
* @return string |
|
85
|
|
|
*/ |
|
86
|
|
|
public static function get_whitelisted_post_meta_sql() { |
|
87
|
|
|
_deprecated_function( __METHOD__, 'jetpack-7.5', 'Automattic\Jetpack\Sync\Settings' ); |
|
88
|
|
|
return Settings::get_whitelisted_post_meta_sql(); |
|
89
|
|
|
} |
|
90
|
|
|
|
|
91
|
|
|
/** |
|
92
|
|
|
* Return allowed comment meta SQL |
|
93
|
|
|
* |
|
94
|
|
|
* @deprecated See Automattic\Jetpack\Sync\Settings |
|
95
|
|
|
*/ |
|
96
|
|
|
public static function get_whitelisted_comment_meta_sql() { |
|
97
|
|
|
_deprecated_function( __METHOD__, 'jetpack-7.5', 'Automattic\Jetpack\Sync\Settings' ); |
|
98
|
|
|
return Settings::get_whitelisted_comment_meta_sql(); |
|
99
|
|
|
} |
|
100
|
|
|
|
|
101
|
|
|
/** |
|
102
|
|
|
* Return get_comments_filter_sql |
|
103
|
|
|
* |
|
104
|
|
|
* @deprecated See Automattic\Jetpack\Sync\Settings |
|
105
|
|
|
*/ |
|
106
|
|
|
public static function get_comments_filter_sql() { |
|
107
|
|
|
_deprecated_function( __METHOD__, 'jetpack-7.5', 'Automattic\Jetpack\Sync\Settings' ); |
|
108
|
|
|
return Settings::get_comments_filter_sql(); |
|
109
|
|
|
} |
|
110
|
|
|
|
|
111
|
|
|
/** |
|
112
|
|
|
* Result data. |
|
113
|
|
|
* |
|
114
|
|
|
* @deprecated See Automattic\Jetpack\Sync\Settings |
|
115
|
|
|
*/ |
|
116
|
|
|
public static function reset_data() { |
|
117
|
|
|
_deprecated_function( __METHOD__, 'jetpack-7.5', 'Automattic\Jetpack\Sync\Settings' ); |
|
118
|
|
|
Settings::reset_data(); |
|
119
|
|
|
} |
|
120
|
|
|
|
|
121
|
|
|
/** |
|
122
|
|
|
* Set importing status. |
|
123
|
|
|
* |
|
124
|
|
|
* @deprecated See Automattic\Jetpack\Sync\Settings |
|
125
|
|
|
* |
|
126
|
|
|
* @param mixed $is_importing Value to set. |
|
127
|
|
|
*/ |
|
128
|
|
|
public static function set_importing( $is_importing ) { |
|
129
|
|
|
_deprecated_function( __METHOD__, 'jetpack-7.5', 'Automattic\Jetpack\Sync\Settings' ); |
|
130
|
|
|
Settings::set_importing( $is_importing ); |
|
131
|
|
|
} |
|
132
|
|
|
|
|
133
|
|
|
/** |
|
134
|
|
|
* Return is_importing status. |
|
135
|
|
|
* |
|
136
|
|
|
* @deprecated See Automattic\Jetpack\Sync\Settings |
|
137
|
|
|
* |
|
138
|
|
|
* @return bool |
|
139
|
|
|
*/ |
|
140
|
|
|
public static function is_importing() { |
|
141
|
|
|
_deprecated_function( __METHOD__, 'jetpack-7.5', 'Automattic\Jetpack\Sync\Settings' ); |
|
142
|
|
|
return Settings::is_importing(); |
|
143
|
|
|
} |
|
144
|
|
|
|
|
145
|
|
|
/** |
|
146
|
|
|
* Return is_sync_enabled status. |
|
147
|
|
|
* |
|
148
|
|
|
* @deprecated See Automattic\Jetpack\Sync\Settings |
|
149
|
|
|
* |
|
150
|
|
|
* @return bool |
|
151
|
|
|
*/ |
|
152
|
|
|
public static function is_sync_enabled() { |
|
153
|
|
|
_deprecated_function( __METHOD__, 'jetpack-7.5', 'Automattic\Jetpack\Sync\Settings' ); |
|
154
|
|
|
return Settings::is_sync_enabled(); |
|
155
|
|
|
} |
|
156
|
|
|
|
|
157
|
|
|
/** |
|
158
|
|
|
* Set cron status. |
|
159
|
|
|
* |
|
160
|
|
|
* @deprecated See Automattic\Jetpack\Sync\Settings |
|
161
|
|
|
* |
|
162
|
|
|
* @param mixed $is_doing_cron Value to set. |
|
163
|
|
|
*/ |
|
164
|
|
|
public static function set_doing_cron( $is_doing_cron ) { |
|
165
|
|
|
_deprecated_function( __METHOD__, 'jetpack-7.5', 'Automattic\Jetpack\Sync\Settings' ); |
|
166
|
|
|
Settings::set_doing_cron( $is_doing_cron ); |
|
167
|
|
|
} |
|
168
|
|
|
|
|
169
|
|
|
/** |
|
170
|
|
|
* Return is_doing_cron status. |
|
171
|
|
|
* |
|
172
|
|
|
* @deprecated See Automattic\Jetpack\Sync\Settings |
|
173
|
|
|
* |
|
174
|
|
|
* @return bool |
|
175
|
|
|
*/ |
|
176
|
|
|
public static function is_doing_cron() { |
|
177
|
|
|
_deprecated_function( __METHOD__, 'jetpack-7.5', 'Automattic\Jetpack\Sync\Settings' ); |
|
178
|
|
|
return Settings::is_doing_cron(); |
|
179
|
|
|
} |
|
180
|
|
|
|
|
181
|
|
|
/** |
|
182
|
|
|
* Return is_syncing status. |
|
183
|
|
|
* |
|
184
|
|
|
* @deprecated See Automattic\Jetpack\Sync\Settings |
|
185
|
|
|
* |
|
186
|
|
|
* @return bool |
|
187
|
|
|
*/ |
|
188
|
|
|
public static function is_syncing() { |
|
189
|
|
|
_deprecated_function( __METHOD__, 'jetpack-7.5', 'Automattic\Jetpack\Sync\Settings' ); |
|
190
|
|
|
return Settings::is_syncing(); |
|
191
|
|
|
} |
|
192
|
|
|
|
|
193
|
|
|
/** |
|
194
|
|
|
* Set "is syncing" status. |
|
195
|
|
|
* |
|
196
|
|
|
* @deprecated See Automattic\Jetpack\Sync\Settings |
|
197
|
|
|
* |
|
198
|
|
|
* @param mixed $is_syncing Is syncing value. |
|
199
|
|
|
*/ |
|
200
|
|
|
public static function set_is_syncing( $is_syncing ) { |
|
201
|
|
|
_deprecated_function( __METHOD__, 'jetpack-7.5', 'Automattic\Jetpack\Sync\Settings' ); |
|
202
|
|
|
Settings::set_is_syncing( $is_syncing ); |
|
203
|
|
|
} |
|
204
|
|
|
|
|
205
|
|
|
/** |
|
206
|
|
|
* Return is_sending status. |
|
207
|
|
|
* |
|
208
|
|
|
* @deprecated See Automattic\Jetpack\Sync\Settings |
|
209
|
|
|
* |
|
210
|
|
|
* @return bool |
|
211
|
|
|
*/ |
|
212
|
|
|
public static function is_sending() { |
|
213
|
|
|
_deprecated_function( __METHOD__, 'jetpack-7.5', 'Automattic\Jetpack\Sync\Settings' ); |
|
214
|
|
|
return Settings::is_sending(); |
|
215
|
|
|
} |
|
216
|
|
|
|
|
217
|
|
|
/** |
|
218
|
|
|
* Set "is sending" status. |
|
219
|
|
|
* |
|
220
|
|
|
* @deprecated See Automattic\Jetpack\Sync\Settings |
|
221
|
|
|
* |
|
222
|
|
|
* @param mixed $is_sending Is sending value. |
|
223
|
|
|
*/ |
|
224
|
|
|
public static function set_is_sending( $is_sending ) { |
|
225
|
|
|
_deprecated_function( __METHOD__, 'jetpack-7.5', 'Automattic\Jetpack\Sync\Settings' ); |
|
226
|
|
|
Settings::set_is_sending( $is_sending ); |
|
227
|
|
|
} |
|
228
|
|
|
|
|
229
|
|
|
} |
|
230
|
|
|
|