| @@ -10,8 +10,12 @@ | ||
| 10 | 10 | */ |
| 11 | 11 | use Automattic\Jetpack\Status\Host; |
| 12 | 12 | use Automattic\Jetpack\Sync\Functions; |
| 13 | 13 | |
| 14 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 15 | + exit( 0 ); | |
| 16 | +} | |
| 17 | + | |
| 14 | 18 | require_once __DIR__ . '/class.json-api-site-jetpack-base.php'; |
| 15 | 19 | require_once __DIR__ . '/class.json-api-post-jetpack.php'; |
| 16 | 20 | |
| 17 | 21 | /** |
| @@ -402,10 +406,8 @@ | ||
| 402 | 406 | |
| 403 | 407 | /** |
| 404 | 408 | * Defaults to false instead of returning the current site plan. |
| 405 | 409 | * |
| 406 | - * @see /modules/masterbar/admin-menu/class-dashboard-switcher-tracking.php. | |
| 407 | - * | |
| 408 | 410 | * @return bool |
| 409 | 411 | */ |
| 410 | 412 | public function get_plan() { |
| 411 | 413 | return false; |
| @@ -565,8 +567,12 @@ | ||
| 565 | 567 | public function is_fse_active() { |
| 566 | 568 | if ( ! Jetpack::is_plugin_active( 'full-site-editing/full-site-editing-plugin.php' ) ) { |
| 567 | 569 | return false; |
| 568 | 570 | } |
| 571 | + if ( function_exists( '\Automattic\Jetpack\Jetpack_Mu_Wpcom\Wpcom_Legacy_FSE\is_full_site_editing_active' ) ) { | |
| 572 | + // @phan-suppress-next-line PhanUndeclaredFunction | |
| 573 | + return \Automattic\Jetpack\Jetpack_Mu_Wpcom\Wpcom_Legacy_FSE\is_full_site_editing_active(); | |
| 574 | + } | |
| 569 | 575 | return function_exists( '\A8C\FSE\is_full_site_editing_active' ) && \A8C\FSE\is_full_site_editing_active(); |
| 570 | 576 | } |
| 571 | 577 | |
| 572 | 578 | /** |
| @@ -582,8 +588,12 @@ | ||
| 582 | 588 | public function is_fse_eligible() { |
| 583 | 589 | if ( ! Jetpack::is_plugin_active( 'full-site-editing/full-site-editing-plugin.php' ) ) { |
| 584 | 590 | return false; |
| 585 | 591 | } |
| 592 | + if ( function_exists( '\Automattic\Jetpack\Jetpack_Mu_Wpcom\Wpcom_Legacy_FSE\is_site_eligible_for_full_site_editing' ) ) { | |
| 593 | + // @phan-suppress-next-line PhanUndeclaredFunction | |
| 594 | + return \Automattic\Jetpack\Jetpack_Mu_Wpcom\Wpcom_Legacy_FSE\is_site_eligible_for_full_site_editing(); | |
| 595 | + } | |
| 586 | 596 | return function_exists( '\A8C\FSE\is_site_eligible_for_full_site_editing' ) && \A8C\FSE\is_site_eligible_for_full_site_editing(); |
| 587 | 597 | } |
| 588 | 598 | |
| 589 | 599 | /** |
| @@ -651,8 +661,19 @@ | ||
| 651 | 661 | * |
| 652 | 662 | * @return bool |
| 653 | 663 | */ |
| 654 | 664 | public function is_deleted() { |
| 665 | + return false; | |
| 666 | + } | |
| 667 | + | |
| 668 | + /** | |
| 669 | + * Indicates that a site is an A4A client. Not used in Jetpack. | |
| 670 | + * | |
| 671 | + * @see /wpcom/public.api/rest/sal/trait.json-api-site-wpcom.php. | |
| 672 | + * | |
| 673 | + * @return bool | |
| 674 | + */ | |
| 675 | + public function is_a4a_client() { | |
| 655 | 676 | return false; |
| 656 | 677 | } |
| 657 | 678 | |
| 658 | 679 | /** |