PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3-a.1
Jetpack – WP Security, Backup, Speed, & Growth v16.3-a.1
16.3 16.3-beta 16.3-a.5 16.3-a.7 16.3-a.3 16.3-a.1 16.2 16.2-beta 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 All 508 releases
← All changes | sal/class.json-api-site-base.php +15 -40 16.3-beta → 16.3-a.1 View file →
@@ -1579,21 +1579,8 @@
1579 1579 return false;
1580 1580 }
1581 1581
1582 1582 /**
1583 - * Whether the site is still on the pre-2026 feature gating.
1584 - *
1585 - * @return bool
1586 - */
1587 - public function is_legacy_gating_site() {
1588 - if ( ! method_exists( 'WPCOM_Features', 'is_legacy_gating_site' ) ) {
1589 - return false;
1590 - }
1591 -
1592 - return (bool) WPCOM_Features::is_legacy_gating_site( $this->blog_id );
1593 - }
1594 -
1595 - /**
1596 1583 * Get the option of site intent which value is coming from the Hero Flow
1597 1584 *
1598 1585 * @return string
1599 1586 */
@@ -1643,18 +1630,30 @@
1643 1630 return array();
1644 1631 }
1645 1632
1646 1633 /**
1647 - * Whether the AI Launchpad is enabled for this site. Mirrors AI_Launchpad::is_enabled_for_site() in jetpack-mu-wpcom.
1634 + * Whether the AI Launchpad is enabled for this site, for the requesting user.
1648 1635 *
1636 + * The launchpad-personalization assignment is user-scoped: every site of an
1637 + * ai_launchpad user gets the AI Launchpad, however the site was created. Mirrors
1638 + * AI_Launchpad::is_enabled_for_site() in jetpack-mu-wpcom, so wp-admin and the
1639 + * Calypso-facing payload agree. Like the capabilities in this payload, the value
1640 + * is relative to the current user.
1641 + *
1649 1642 * @return bool
1650 1643 */
1651 1644 public function is_ai_launchpad_enabled() {
1652 - return (bool) get_option( 'wpcom_ai_launchpad_enabled' ) && ! $this->is_ai_launchpad_no_guidance();
1645 + if ( (bool) get_option( 'wpcom_ai_launchpad_enabled' ) ) {
1646 + return true;
1647 + }
1648 +
1649 + return class_exists( '\Automattic\Jetpack\Jetpack_Mu_Wpcom\Launchpad_Personalization_Experiment' )
1650 + // @phan-suppress-next-line PhanUndeclaredClassMethod -- Lives in jetpack-mu-wpcom, outside this plugin's dependency graph; the class_exists guard above covers contexts where it isn't loaded.
1651 + && 'ai_launchpad' === \Automattic\Jetpack\Jetpack_Mu_Wpcom\Launchpad_Personalization_Experiment::get_variation();
1653 1652 }
1654 1653
1655 1654 /**
1656 - * Whether the AI Launchpad was dismissed (skipped), which leaves the site with no setup guidance.
1655 + * Whether the AI Launchpad was dismissed, reverting the site to the regular launchpad.
1657 1656 *
1658 1657 * @return bool
1659 1658 */
1660 1659 public function is_ai_launchpad_dismissed() {
@@ -1670,22 +1669,8 @@
1670 1669 return (bool) get_option( 'wpcom_ai_launchpad_completed' );
1671 1670 }
1672 1671
1673 1672 /**
1674 - * Whether the site gets no setup guidance: no My Home, Site Setup, or launchpad. Mirrors
1675 - * wpcom_launchpad_is_no_guidance() in jetpack-mu-wpcom, which also counts a skipped AI Launchpad.
1676 - *
1677 - * @return bool
1678 - */
1679 - public function is_ai_launchpad_no_guidance() {
1680 - if ( get_option( 'wpcom_ai_launchpad_no_guidance' ) ) {
1681 - return true;
1682 - }
1683 -
1684 - return (bool) get_option( 'wpcom_ai_launchpad_enabled' ) && (bool) get_option( 'wpcom_ai_launchpad_dismissed' );
1685 - }
1686 -
1687 - /**
1688 1673 * Get site option for migration source site domain
1689 1674 *
1690 1675 * @return string
1691 1676 */
@@ -1894,16 +1879,6 @@
1894 1879 */
1895 1880 public function get_jetpack_recovery_mode_status() {
1896 1881 $status = get_option( 'jetpack_recovery_mode_status' );
1897 1882 return is_array( $status ) ? $status : null;
1898 - }
1899 -
1900 - /**
1901 - * Whether WordPress.com accounts must have two-step authentication to log in through SSO.
1902 - *
1903 - * @return bool
1904 - */
1905 - public function get_jetpack_sso_require_two_step() {
1906 - /** This filter is documented in projects/packages/connection/src/sso/class-helpers.php */
1907 - return (bool) apply_filters( 'jetpack_sso_require_two_step', get_option( 'jetpack_sso_require_two_step', false ) );
1908 1883 }
1909 1884 }