| @@ -2,8 +2,9 @@ | ||
| 2 | 2 | |
| 3 | 3 | namespace Yoast\WP\SEO\Integrations\Admin; |
| 4 | 4 | |
| 5 | 5 | use WPSEO_Admin_Asset_Manager; |
| 6 | +use Yoast\WP\SEO\Conditionals\Abilities_API_Conditional; | |
| 6 | 7 | use Yoast\WP\SEO\Conditionals\Admin_Conditional; |
| 7 | 8 | use Yoast\WP\SEO\Conditionals\Jetpack_Conditional; |
| 8 | 9 | use Yoast\WP\SEO\Conditionals\Third_Party\Elementor_Activated_Conditional; |
| 9 | 10 | use Yoast\WP\SEO\Dashboard\Infrastructure\Endpoints\Site_Kit_Consent_Management_Endpoint; |
| @@ -81,8 +82,15 @@ | ||
| 81 | 82 | */ |
| 82 | 83 | private $myyoast_connection_script_data; |
| 83 | 84 | |
| 84 | 85 | /** |
| 86 | + * The Abilities API conditional. | |
| 87 | + * | |
| 88 | + * @var Abilities_API_Conditional | |
| 89 | + */ | |
| 90 | + private $abilities_api_conditional; | |
| 91 | + | |
| 92 | + /** | |
| 85 | 93 | * {@inheritDoc} |
| 86 | 94 | */ |
| 87 | 95 | public static function get_conditionals() { |
| 88 | 96 | return [ Admin_Conditional::class ]; |
| @@ -101,8 +109,9 @@ | ||
| 101 | 109 | * management endpoint. |
| 102 | 110 | * @param Schema_Configuration $schema_configuration The schema configuration. |
| 103 | 111 | * @param MyYoast_Connection_Script_Data $myyoast_connection_script_data The MyYoast connection |
| 104 | 112 | * script-data provider. |
| 113 | + * @param Abilities_API_Conditional $abilities_api_conditional The Abilities API conditional. | |
| 105 | 114 | */ |
| 106 | 115 | public function __construct( |
| 107 | 116 | WPSEO_Admin_Asset_Manager $admin_asset_manager, |
| 108 | 117 | Options_Helper $options_helper, |
| @@ -110,9 +119,10 @@ | ||
| 110 | 119 | Jetpack_Conditional $jetpack_conditional, |
| 111 | 120 | Site_Kit $site_kit_integration_data, |
| 112 | 121 | Site_Kit_Consent_Management_Endpoint $site_kit_consent_management_endpoint, |
| 113 | 122 | Schema_Configuration $schema_configuration, |
| 114 | - MyYoast_Connection_Script_Data $myyoast_connection_script_data | |
| 123 | + MyYoast_Connection_Script_Data $myyoast_connection_script_data, | |
| 124 | + Abilities_API_Conditional $abilities_api_conditional | |
| 115 | 125 | ) { |
| 116 | 126 | $this->admin_asset_manager = $admin_asset_manager; |
| 117 | 127 | $this->options_helper = $options_helper; |
| 118 | 128 | $this->elementor_conditional = $elementor_conditional; |
| @@ -120,8 +130,9 @@ | ||
| 120 | 130 | $this->site_kit_integration_data = $site_kit_integration_data; |
| 121 | 131 | $this->site_kit_consent_management_endpoint = $site_kit_consent_management_endpoint; |
| 122 | 132 | $this->schema_configuration = $schema_configuration; |
| 123 | 133 | $this->myyoast_connection_script_data = $myyoast_connection_script_data; |
| 134 | + $this->abilities_api_conditional = $abilities_api_conditional; | |
| 124 | 135 | } |
| 125 | 136 | |
| 126 | 137 | /** |
| 127 | 138 | * {@inheritDoc} |
| @@ -246,8 +257,10 @@ | ||
| 246 | 257 | 'site_kit_configuration' => $this->site_kit_integration_data->to_array(), |
| 247 | 258 | 'site_kit_consent_management_url' => $this->site_kit_consent_management_endpoint->get_url(), |
| 248 | 259 | 'schema_framework_enabled' => $this->options_helper->get( 'enable_schema', true ) === true && ! $this->schema_configuration->is_schema_disabled_programmatically(), |
| 249 | 260 | 'myyoast_connection' => $this->myyoast_connection_script_data->present(), |
| 261 | + 'schema_aggregation_active' => $this->options_helper->get( 'enable_schema_aggregation_endpoint', false ) === true, | |
| 262 | + 'abilities_api_active' => $this->abilities_api_conditional->is_met(), | |
| 250 | 263 | ], |
| 251 | 264 | ); |
| 252 | 265 | } |
| 253 | 266 | |