PluginProbe ʕ •ᴥ•ʔ
Jetpack – WP Security, Backup, Speed, & Growth / 14.3.1
Jetpack – WP Security, Backup, Speed, & Growth v14.3.1
12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 13.8.3 13.9.2 14.0.1 14.1.1 14.2.2 14.3.1 14.4.2 14.5.1 14.6.1 14.7.1 14.8.1 14.9.2 15.0.3 15.1.2 15.2.1 15.3.2 15.4.1 15.5.1 15.6.1 15.7.2 15.8.1 15.9.2 16.0.2 16.1.3 16.2-a.5 16.2-a.3 16.1.2 16.2-a.1 16.1.1 16.1 16.1-beta 16.1-beta.2 16.1-beta.3 16.1-a.5 16.1-a.3 16.0.1 16.1-a.1 16.0 16.0-beta 16.0-a.7 16.0-a.5 15.9.1 16.0-a.3 16.0-a.1 15.9 15.9-beta 15.9-a.7 15.9-a.5 15.9-a.3 15.9-a.1 15.8 15.8-beta 15.8-a.7 15.8-a.5 5.2.5 5.3.4 5.4.4 5.5.5 5.6.5 5.7.5 5.8.4 5.9.4 6.0.4 6.1 6.1.1 6.1.2 6.1.3 6.1.4 6.1.5 6.2 6.2.1 6.2.2 6.2.3 6.2.4 6.2.5 6.3 6.3.1 6.3.2 6.3.3 6.3.4 6.3.5 6.3.6 6.3.7 6.4 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 6.4.6 6.5 6.5.1 6.5.2 6.5.3 6.5.4 6.6 6.6.1 6.6.2 6.6.3 6.6.4 6.6.5 6.7 6.7.1 6.7.2 6.7.3 6.7.4 6.8 6.8.1 6.8.2 6.8.3 6.8.4 6.8.5 6.9 6.9.1 6.9.2 6.9.3 6.9.4 7.0 7.0.1 7.0.2 7.0.3 7.0.4 7.0.5 7.1 7.1.1 7.1.2 7.1.3 7.1.4 7.1.5 7.2 7.2.1 7.2.1.1 7.2.2 7.2.3 7.2.4 7.2.5 7.3 7.3.0.1 7.3.1 7.3.1.1 7.3.2 7.3.3 7.3.4 7.3.5 7.4 7.4.1 7.4.2 7.4.3 7.4.4 7.4.5 7.5 7.5.0.1 7.5.1 7.5.2 7.5.3 7.5.4 7.5.5 7.5.6 7.5.7 7.6 7.6.1 7.6.2 7.6.3 7.6.4 7.7 7.7.1 7.7.2 7.7.3 7.7.4 7.7.5 7.7.6 7.8 7.8.1 7.8.2 7.8.3 7.8.4 7.9 7.9.1 7.9.2 7.9.3 7.9.4 8.0 8.0.1 8.0.2 8.0.3 8.1 8.1.1 8.1.2 8.1.3 8.1.4 8.2 8.2.0.1 8.2.1 8.2.2 8.2.3 8.2.4 8.2.5 8.2.6 8.3 8.3.1 8.3.2 8.3.3 8.4 8.4.1 8.4.2 8.4.3 8.4.4 8.4.5 8.5 8.5.1 8.5.2 8.5.3 8.6 8.6.1 8.6.2 8.6.3 8.6.4 8.7 8.7.0.1 8.7.1 8.7.2 8.7.3 8.7.4 8.8 8.8.1 8.8.2 8.8.3 8.8.4 8.8.5 8.9 8.9.1 8.9.2 8.9.3 8.9.4 9.0 9.0.1 9.0.2 9.0.3 9.0.4 9.0.5 9.1 9.1.1 9.1.2 9.1.3 9.2 9.2.1 9.2.2 9.2.3 9.2.4 9.3 9.3.1 9.3.2 9.3.3 9.3.4 9.3.5 9.4 9.4.1 9.4.2 9.4.3 9.4.4 9.5 9.5.1 9.5.2 9.5.3 9.5.4 9.5.5 9.6 9.6.1 9.6.2 9.6.3 9.6.4 9.7 9.7.1 9.7.2 15.7-beta.2 9.7.3 15.7.1 9.8 15.8-a.1 9.8.1 15.8-a.3 9.8.2 2.0.9 9.8.3 2.1.7 9.9 2.2.10 9.9.1 2.3.10 9.9.2 2.4.7 9.9.3 2.5.5 2.6.6 2.7.5 2.8.5 2.9.6 3.0.6 3.1.5 3.2.5 3.3.6 3.4.6 3.5.6 3.6.4 3.7.5 3.8.5 3.9.10 4.0.7 4.1.4 4.2.5 4.3.5 4.4.5 4.5.3 4.6.3 4.7.4 4.8.5 4.9.3 5.0.3 5.1.4 trunk 10.0 10.0.1 10.0.2 10.1 10.1.1 10.1.2 10.2 10.2.1 10.2.2 10.2.3 10.3 10.3.1 10.3.2 10.4 10.4.1 10.4.2 10.5 10.5.1 10.5.2 10.5.3 10.6 10.6.1 10.6.2 10.7 10.7.1 10.7.2 10.8 10.8.1 10.8.2 10.9 10.9.1 10.9.2 10.9.3 11.0 11.0.1 11.0.2 11.1 11.1.1 11.1.2 11.1.3 11.1.4 11.2 11.2.1 11.2.2 11.3 11.3.1 11.3.2 11.3.3 11.3.4 11.4 11.4.1 11.4.2 11.5 11.5.1 11.5.2 11.5.3 11.6 11.6.1 11.6.2 11.7 11.7.1 11.7.2 11.7.3 11.8 11.8.3 11.8.4 11.8.5 11.8.6 11.9 11.9.1 11.9.2 11.9.3 12.0 12.0.1 12.0.2 12.1 12.1.1 12.1.2 12.2 12.2.1 12.2.2 12.3 12.3.1 12.4 12.4.1 12.5 12.5.1 12.6 12.6.1 12.6.2 12.6.3 12.7 12.7.1 12.7.2 12.8 12.8.1 12.8.2 12.9 12.9.1 12.9.2 12.9.3 12.9.4 13.0 13.0.1 13.1 13.1.1 13.1.2 13.1.3 13.1.4 13.2 13.2.1 13.2.2 13.2.3 13.3 13.3.1 13.3.2 13.4 13.4.1 13.4.2 13.4.3 13.4.4 13.5 13.5.1 13.6 13.6.1 13.7 13.7.1 13.8 13.8.1 13.8.2 13.9 13.9.1 14.0 14.1 14.2 14.2.1 14.3 14.4 14.4.1 14.5 14.6 14.7 14.8 14.9 14.9.1 15.0 15.0.1 15.0.2 15.1 15.1.1 15.2 15.3 15.3.1 15.4 15.5 15.6 15.7 15.7-a.1 15.7-a.3 15.7-a.5 15.7-a.7 15.7-beta
jetpack / sal / class.json-api-site-jetpack.php
jetpack / sal Last commit date
class.json-api-date.php 3 years ago class.json-api-links.php 2 years ago class.json-api-metadata.php 1 year ago class.json-api-platform-jetpack.php 3 years ago class.json-api-platform.php 3 years ago class.json-api-post-base.php 2 years ago class.json-api-post-jetpack.php 4 years ago class.json-api-site-base.php 1 year ago class.json-api-site-jetpack-base.php 3 years ago class.json-api-site-jetpack.php 1 year ago class.json-api-token.php 2 years ago
class.json-api-site-jetpack.php
735 lines
1 <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
2 /**
3 * This class extends the Abstract_Jetpack_Site class, which includes providing
4 * the implementation for functions that were declared in that class.
5 *
6 * @see class.json-api-site-jetpack-base.php for more context on some of
7 * the functions extended here.
8 *
9 * @package automattic/jetpack
10 */
11 use Automattic\Jetpack\Status\Host;
12 use Automattic\Jetpack\Sync\Functions;
13
14 require_once __DIR__ . '/class.json-api-site-jetpack-base.php';
15 require_once __DIR__ . '/class.json-api-post-jetpack.php';
16
17 /**
18 * Base class for Jetpack_Site. This code runs on Jetpack (.org) sites.
19 */
20 class Jetpack_Site extends Abstract_Jetpack_Site {
21
22 /**
23 * Retrieves a Jetpack option's value, given the option name.
24 *
25 * @param string $name the name of the Jetpack option, without the 'jetpack' prefix (eg. 'log' for 'jetpack_log').
26 *
27 * @return mixed
28 */
29 protected function get_mock_option( $name ) {
30 return get_option( 'jetpack_' . $name );
31 }
32
33 /**
34 * If a Jetpack constant name has been defined, this will return the value of the constant.
35 *
36 * @param string $name the name of the Jetpack constant to check.
37 *
38 * @return mixed
39 */
40 protected function get_constant( $name ) {
41 if ( defined( $name ) ) {
42 return constant( $name );
43 }
44 return null;
45 }
46
47 /**
48 * Returns the site URL for the current network.
49 *
50 * @return string
51 */
52 protected function main_network_site() {
53 return network_site_url();
54 }
55
56 /**
57 * Returns the WordPress version for the current site.
58 *
59 * @return string
60 */
61 protected function wp_version() {
62 global $wp_version;
63 return $wp_version;
64 }
65
66 /**
67 * Returns the maximum upload size allowed in php.ini.
68 *
69 * @return int
70 */
71 protected function max_upload_size() {
72 return wp_max_upload_size();
73 }
74
75 /**
76 * This function returns the value of the 'WP_MEMORY_LIMIT' constant converted to an integer byte value.
77 *
78 * @return int
79 */
80 protected function wp_memory_limit() {
81 return wp_convert_hr_to_bytes( WP_MEMORY_LIMIT );
82 }
83
84 /**
85 * This function returns the value of the 'WP_MAX_MEMORY_LIMIT' constant converted to an integer byte value.
86 *
87 * @return int
88 */
89 protected function wp_max_memory_limit() {
90 return wp_convert_hr_to_bytes( WP_MAX_MEMORY_LIMIT );
91 }
92
93 /**
94 * Returns true if the site is within a system with a multiple networks, false otherwise.
95 *
96 * @see /projects/packages/status/src/class-status.php
97 *
98 * @return bool
99 */
100 protected function is_main_network() {
101 return Jetpack::is_multi_network();
102 }
103
104 /**
105 * Returns true if Multisite is enabled, false otherwise.
106 *
107 * @return bool
108 */
109 public function is_multisite() {
110 return (bool) is_multisite();
111 }
112
113 /**
114 * Returns true if the current site is a single user site, false otherwise.
115 *
116 * @return bool
117 */
118 public function is_single_user_site() {
119 return (bool) Jetpack::is_single_user_site();
120 }
121
122 /**
123 * Returns true if is_vcs_checkout discovers a version control checkout, false otherwise.
124 *
125 * @see projects/packages/sync/src/class-functions.php.
126 *
127 * @return bool
128 */
129 protected function is_version_controlled() {
130 return Functions::is_version_controlled();
131 }
132
133 /**
134 * Returns true if the site has file write access, false otherwise.
135 *
136 * @see projects/packages/sync/src/class-functions.php.
137 *
138 * @return bool
139 */
140 protected function file_system_write_access() {
141 return Functions::file_system_write_access();
142 }
143
144 /**
145 * Returns true if the current theme supports the $feature_name, false otherwise.
146 *
147 * @param string $feature_name the name of the Jetpack feature.
148 *
149 * @return bool
150 */
151 protected function current_theme_supports( $feature_name ) {
152 return current_theme_supports( $feature_name );
153 }
154
155 /**
156 * Gets theme support arguments to be checked against the specific Jetpack feature.
157 *
158 * @param string $feature_name the name of the Jetpack feature to check against.
159 *
160 * @return array
161 */
162 protected function get_theme_support( $feature_name ) {
163 return get_theme_support( $feature_name );
164 }
165
166 /**
167 * Fetch a list of active plugins that are using Jetpack Connection.
168 *
169 * @return array An array of active plugins (by slug) that are using Jetpack Connection.
170 */
171 protected function get_connection_active_plugins() {
172 $plugins = $this->get_mock_option( 'connection_active_plugins' );
173
174 return is_array( $plugins ) ? array_keys( $plugins ) : array();
175 }
176
177 /**
178 * Gets updates and then stores them in the jetpack_updates option, returning an array with the option schema.
179 *
180 * @return array
181 */
182 public function get_updates() {
183 return (array) Jetpack::get_updates();
184 }
185
186 /**
187 * Returns the Jetpack blog ID for a site.
188 *
189 * @return int
190 */
191 public function get_id() {
192 return $this->platform->token->blog_id;
193 }
194
195 /**
196 * Returns true if a site has the 'videopress' option enabled, false otherwise.
197 *
198 * @return bool
199 */
200 public function has_videopress() {
201 // TODO - this only works on wporg site - need to detect videopress option for remote Jetpack site on WPCOM.
202 $videopress = Jetpack_Options::get_option( 'videopress', array() );
203 if ( isset( $videopress['blog_id'] ) && $videopress['blog_id'] > 0 ) {
204 return true;
205 }
206
207 return false;
208 }
209
210 /**
211 * Returns VideoPress storage used, in MB.
212 *
213 * @see class.json-api-site-jetpack-shadow.php on WordPress.com for implementation. Only applicable on WordPress.com.
214 *
215 * @return float
216 */
217 public function get_videopress_storage_used() {
218 return 0;
219 }
220
221 /**
222 * Sets the upgraded_filetypes_enabled Jetpack option to true as a default.
223 *
224 * Only relevant for WordPress.com sites:
225 * See wpcom_site_has_upgraded_upload_filetypes at /wpcom/wp-content/mu-plugins/misc.php.
226 *
227 * @return bool
228 */
229 public function upgraded_filetypes_enabled() {
230 return true;
231 }
232
233 /**
234 * Sets the is_mapped_domain Jetpack option to true as a default.
235 *
236 * Primarily used in WordPress.com to confirm the current blog's domain does or doesn't match the primary redirect.
237 *
238 * @see /wpcom/wp-content/mu-plugins/insecure-content-helpers.php within WordPress.com.
239 *
240 * @return bool
241 */
242 public function is_mapped_domain() {
243 return true;
244 }
245
246 /**
247 * Fallback to the home URL since all Jetpack sites don't have an unmapped *.wordpress.com domain.
248 *
249 * @return string
250 */
251 public function get_unmapped_url() {
252 // Fallback to the home URL since all Jetpack sites don't have an unmapped *.wordpress.com domain.
253 return $this->get_url();
254 }
255
256 /**
257 * Whether the domain is a site redirect or not. Defaults to false on a Jetpack site.
258 *
259 * Primarily used in WordPress.com where it is determined if a HTTP status check is a redirect or not and whether an exception should be thrown.
260 *
261 * @see /wpcom/wp-includes/Requests/Response.php within WordPress.com.
262 *
263 * @return bool
264 */
265 public function is_redirect() {
266 return false;
267 }
268
269 /**
270 * Whether or not the current user is following this blog. Defaults to false.
271 *
272 * @return bool
273 */
274 public function is_following() {
275 return false;
276 }
277
278 /**
279 * Points to the user ID of the site owner
280 *
281 * @return null for Jetpack sites
282 */
283 public function get_site_owner() {
284 return null;
285 }
286
287 /**
288 * Whether or not the Jetpack 'wordads' module is active on the site.
289 *
290 * @return bool
291 */
292 public function has_wordads() {
293 return Jetpack::is_module_active( 'wordads' );
294 }
295
296 /**
297 * Defaults to false on Jetpack sites, however is used on WordPress.com sites. This nonce is used for previews on Jetpack sites.
298 *
299 * @see /wpcom/public.api/rest/sal/class.json-api-site-jetpack-shadow.php.
300 *
301 * @return bool
302 */
303 public function get_frame_nonce() {
304 return false;
305 }
306
307 /**
308 * Defaults to false on Jetpack sites, however is used on WordPress.com sites,
309 * where it creates a nonce to be used with iframed block editor requests to a Jetpack site.
310 *
311 * @see /wpcom/public.api/rest/sal/class.json-api-site-jetpack-shadow.php.
312 *
313 * @return bool
314 */
315 public function get_jetpack_frame_nonce() {
316 return false;
317 }
318
319 /**
320 * Defaults to false on Jetpack sites, however is used on WordPress.com sites, where it returns true if the headstart-fresh blog sticker is present.
321 *
322 * @see /wpcom/public.api/rest/sal/trait.json-api-site-wpcom.php.
323 *
324 * @return bool
325 */
326 public function is_headstart_fresh() {
327 return false;
328 }
329
330 /**
331 * Returns the allowed mime types and file extensions for a site.
332 *
333 * @return array
334 */
335 public function allowed_file_types() {
336 $allowed_file_types = array();
337
338 // https://codex.wordpress.org/Uploading_Files.
339 $mime_types = get_allowed_mime_types();
340 foreach ( $mime_types as $type => $mime_type ) {
341 $extras = explode( '|', $type );
342 foreach ( $extras as $extra ) {
343 $allowed_file_types[] = $extra;
344 }
345 }
346
347 return $allowed_file_types;
348 }
349
350 /**
351 * Return site's privacy status.
352 *
353 * @return bool Is site private?
354 */
355 public function is_private() {
356 return (int) $this->get_atomic_cloud_site_option( 'blog_public' ) === -1;
357 }
358
359 /**
360 * Return site's coming soon status.
361 *
362 * @return bool Is site "Coming soon"?
363 */
364 public function is_coming_soon() {
365 return $this->is_private() && (int) $this->get_atomic_cloud_site_option( 'wpcom_coming_soon' ) === 1;
366 }
367
368 /**
369 * Return site's launch status.
370 *
371 * @return string|bool Launch status ('launched', 'unlaunched', or false).
372 */
373 public function get_launch_status() {
374 return $this->get_atomic_cloud_site_option( 'launch-status' );
375 }
376
377 /**
378 * Given an option name, returns false if the site isn't WoA or doesn't have the ability to retrieve cloud site options.
379 * Otherwise, if the option name exists amongst Jetpack options, the option value is returned.
380 *
381 * @param string $option The option name to check.
382 *
383 * @return string|bool
384 */
385 public function get_atomic_cloud_site_option( $option ) {
386 if ( ! ( new Host() )->is_woa_site() ) {
387 return false;
388 }
389
390 $jetpack = Jetpack::init();
391 if ( ! method_exists( $jetpack, 'get_cloud_site_options' ) ) {
392 return false;
393 }
394
395 $result = $jetpack->get_cloud_site_options( array( $option ) );
396 if ( ! array_key_exists( $option, $result ) ) {
397 return false;
398 }
399
400 return $result[ $option ];
401 }
402
403 /**
404 * Defaults to false instead of returning the current site plan.
405 *
406 * @return bool
407 */
408 public function get_plan() {
409 return false;
410 }
411
412 /**
413 * Defaults to 0 for the number of WordPress.com subscribers - this is filled in on the WordPress.com side.
414 *
415 * @see /wpcom/public.api/rest/sal/trait.json-api-site-wpcom.php.
416 *
417 * @return int
418 */
419 public function get_subscribers_count() {
420 return 0;
421 }
422
423 /**
424 * Defaults to false - this is filled on the WordPress.com side in multiple locations.
425 *
426 * @see WPCOM_JSON_API_GET_Site_Endpoint::decorate_jetpack_response.
427 * @return bool
428 */
429 public function get_capabilities() {
430 return false;
431 }
432
433 /**
434 * Returns the language code for the current site.
435 *
436 * @return string
437 */
438 public function get_locale() {
439 return get_bloginfo( 'language' );
440 }
441
442 /**
443 * The flag indicates that the site has Jetpack installed.
444 *
445 * @return bool
446 */
447 public function is_jetpack() {
448 return true;
449 }
450
451 /**
452 * The flag indicates that the site is connected to WP.com via Jetpack Connection.
453 *
454 * @return bool
455 */
456 public function is_jetpack_connection() {
457 return true;
458 }
459
460 /**
461 * Returns the current site's Jetpack version.
462 *
463 * @return string
464 */
465 public function get_jetpack_version() {
466 return JETPACK__VERSION;
467 }
468
469 /**
470 * Empty function declaration - this function is filled out on the WordPress.com side, returning true if the site has an AK / VP bundle.
471 *
472 * @see /wpcom/public.api/rest/sal/class.json-api-site-jetpack-shadow.php.
473 */
474 public function get_ak_vp_bundle_enabled() {}
475
476 /**
477 * Returns the front page meta description for current site.
478 *
479 * @see /modules/seo-tools/class-jetpack-seo-utils.php.
480 *
481 * @return string
482 */
483 public function get_jetpack_seo_front_page_description() {
484 return Jetpack_SEO_Utils::get_front_page_meta_description();
485 }
486
487 /**
488 * Returns custom title formats from site option.
489 *
490 * @see /modules/seo-tools/class-jetpack-seo-titles.php.
491 *
492 * @return array
493 */
494 public function get_jetpack_seo_title_formats() {
495 return Jetpack_SEO_Titles::get_custom_title_formats();
496 }
497
498 /**
499 * Returns website verification codes. Allowed keys include: google, pinterest, bing, yandex, facebook.
500 *
501 * @see /modules/verification-tools/blog-verification-tools.php.
502 *
503 * @return array
504 */
505 public function get_verification_services_codes() {
506 return get_option( 'verification_services_codes', null );
507 }
508
509 /**
510 * Returns null for Jetpack sites. For WordPress.com sites this returns the value of the 'podcasting_archive' option.
511 *
512 * @see /wpcom/public.api/rest/sal/class.json-api-site-wpcom.php.
513 *
514 * @return null
515 */
516 public function get_podcasting_archive() {
517 return null;
518 }
519
520 /**
521 * Defaulting to true, this function is expanded out on the WordPress.com side, returning an error if the site is not connected or not communicating to us.
522 *
523 * @see /wpcom/public.api/rest/sal/class.json-api-site-jetpack-shadow.php.
524 *
525 * @return bool
526 */
527 public function is_connected_site() {
528 return true;
529 }
530
531 /**
532 * Defaulting to false and not relevant for Jetpack sites, this is expanded on the WordPress.com side for a specific wp.com/start 'WP for teams' flow.
533 *
534 * @see /wpcom/public.api/rest/sal/class.json-api-site-wpcom.php.
535 *
536 * @return bool
537 */
538 public function is_wpforteams_site() {
539 return false;
540 }
541
542 /**
543 * Returns true if a user has got the capability that is being checked, false otherwise.
544 *
545 * @param string $role The capability to check.
546 *
547 * @return bool
548 */
549 public function current_user_can( $role ) {
550 return current_user_can( $role );
551 }
552
553 /**
554 * Check if full site editing should be considered as currently active. Full site editing
555 * requires the FSE plugin to be installed and activated, as well the current
556 * theme to be FSE compatible. The plugin can also be explicitly disabled via the
557 * a8c_disable_full_site_editing filter.
558 *
559 * @since 7.7.0
560 *
561 * @return bool true if full site editing is currently active.
562 */
563 public function is_fse_active() {
564 if ( ! Jetpack::is_plugin_active( 'full-site-editing/full-site-editing-plugin.php' ) ) {
565 return false;
566 }
567 if ( function_exists( '\Automattic\Jetpack\Jetpack_Mu_Wpcom\Wpcom_Legacy_FSE\is_full_site_editing_active' ) ) {
568 // @phan-suppress-next-line PhanUndeclaredFunction
569 return \Automattic\Jetpack\Jetpack_Mu_Wpcom\Wpcom_Legacy_FSE\is_full_site_editing_active();
570 }
571 return function_exists( '\A8C\FSE\is_full_site_editing_active' ) && \A8C\FSE\is_full_site_editing_active();
572 }
573
574 /**
575 * Check if site should be considered as eligible for full site editing. Full site editing
576 * requires the FSE plugin to be installed and activated. For this method to return true
577 * the current theme does not need to be FSE compatible. The plugin can also be explicitly
578 * disabled via the a8c_disable_full_site_editing filter.
579 *
580 * @since 8.1.0
581 *
582 * @return bool true if site is eligible for full site editing
583 */
584 public function is_fse_eligible() {
585 if ( ! Jetpack::is_plugin_active( 'full-site-editing/full-site-editing-plugin.php' ) ) {
586 return false;
587 }
588 if ( function_exists( '\Automattic\Jetpack\Jetpack_Mu_Wpcom\Wpcom_Legacy_FSE\is_site_eligible_for_full_site_editing' ) ) {
589 // @phan-suppress-next-line PhanUndeclaredFunction
590 return \Automattic\Jetpack\Jetpack_Mu_Wpcom\Wpcom_Legacy_FSE\is_site_eligible_for_full_site_editing();
591 }
592 return function_exists( '\A8C\FSE\is_site_eligible_for_full_site_editing' ) && \A8C\FSE\is_site_eligible_for_full_site_editing();
593 }
594
595 /**
596 * Check if site should be considered as eligible for use of the core Site Editor.
597 * The Site Editor requires a block based theme to be active.
598 *
599 * @since 12.2 Uses wp_is_block_theme() to determine if site is eligible instead of gutenberg_is_fse_theme().
600 * @return bool true if site is eligible for the Site Editor
601 */
602 public function is_core_site_editor_enabled() {
603 return wp_is_block_theme();
604 }
605
606 /**
607 * Return the last engine used for an import on the site. Not used in Jetpack.
608 *
609 * @see /wpcom/public.api/rest/sal/class.json-api-site-wpcom.php.
610 *
611 * @return null
612 */
613 public function get_import_engine() {
614 return null;
615 }
616
617 /**
618 * Post functions
619 */
620
621 /**
622 * Wrap a WP_Post object with SAL methods, returning a Jetpack_Post object.
623 *
624 * @param WP_Post $post A WP_Post object.
625 * @param string $context The post request context (for example 'edit' or 'display').
626 *
627 * @return Jetpack_Post
628 */
629 public function wrap_post( $post, $context ) {
630 return new Jetpack_Post( $this, $post, $context );
631 }
632
633 /**
634 * Get the option storing the Anchor podcast ID that identifies a site as a podcasting site.
635 *
636 * @return string
637 */
638 public function get_anchor_podcast() {
639 return $this->get_atomic_cloud_site_option( 'anchor_podcast' );
640 }
641
642 /**
643 * Get user interactions with a site. Not used in Jetpack.
644 *
645 * @see /wpcom/public.api/rest/sal/trait.json-api-site-wpcom.php.
646 *
647 * @return null
648 */
649 public function get_user_interactions() {
650 return null;
651 }
652
653 /**
654 * Get site deleted status. Not used in Jetpack.
655 *
656 * @see /wpcom/public.api/rest/sal/trait.json-api-site-wpcom.php.
657 *
658 * @return bool
659 */
660 public function is_deleted() {
661 return false;
662 }
663
664 /**
665 * Indicates that a site is an A4A client. Not used in Jetpack.
666 *
667 * @see /wpcom/public.api/rest/sal/trait.json-api-site-wpcom.php.
668 *
669 * @return bool
670 */
671 public function is_a4a_client() {
672 return false;
673 }
674
675 /**
676 * Detect whether a site is WordPress.com Staging Site. Not used in Jetpack.
677 *
678 * @see /wpcom/public.api/rest/sal/trait.json-api-site-wpcom.php.
679 *
680 * @return false
681 */
682 public function is_wpcom_staging_site() {
683 return false;
684 }
685
686 /**
687 * Get site option for the production blog id (if is a WP.com Staging Site). Not used in Jetpack.
688 *
689 * @see /wpcom/public.api/rest/sal/trait.json-api-site-wpcom.php.
690 *
691 * @return null
692 */
693 public function get_wpcom_production_blog_id() {
694 return null;
695 }
696
697 /**
698 * Get site option for the staging blog ids (if it has them). Not used in Jetpack.
699 *
700 * @see /wpcom/public.api/rest/sal/trait.json-api-site-wpcom.php.
701 *
702 * @return null
703 */
704 public function get_wpcom_staging_blog_ids() {
705 return null;
706 }
707
708 /**
709 * Get site option for the admin interface on WordPress.com Atomic sites. Not used in Jetpack.
710 *
711 * @return null
712 */
713 public function get_wpcom_admin_interface() {
714 return null;
715 }
716
717 /**
718 * Get Zendesk site meta. Not used in Jetpack.
719 *
720 * @return null
721 */
722 public function get_zendesk_site_meta() {
723 return null;
724 }
725
726 /**
727 * Detect whether there's a pending plan for this site. Not used in Jetpack.
728 *
729 * @return false
730 */
731 public function is_pending_plan() {
732 return false;
733 }
734 }
735