*/ protected function input_properties(): array { return array(); } /** * @since 0.0.34 * @return array */ protected function required_input(): array { return array(); } /** * @since 0.0.34 * @return array */ protected function output_properties(): array { return array( 'google_consent_mode_status' => array( 'type' => 'object', 'additionalProperties' => true ), ); } /** * @since 0.0.34 * @return array */ protected function annotations(): array { return array( 'readonly' => true, 'destructive' => false, 'idempotent' => true, ); } /** * @since 0.0.34 * @return bool */ protected function requires_account(): bool { return true; } /** * @since 0.0.34 * @return string */ protected function account_subject(): string { return __( 'The reported Google Consent Mode status', 'acrossai-abilities-manager' ); } /** * @since 0.0.34 * @param array $input Input. * @return array|WP_Error */ protected function run( array $input ) { $class = '\\CookieYes\\Lite\\Admin\\Modules\\Settings\\Includes\\Controller'; if ( ! class_exists( $class ) || ! method_exists( $class, 'get_app_info' ) ) { return new WP_Error( 'consent_feature_unavailable', __( 'This edition of the consent plugin does not expose a reported Google Consent Mode status.', 'acrossai-abilities-manager' ) ); } $info = (array) $class::get_instance()->get_app_info(); return array( 'google_consent_mode_status' => isset( $info['gcm'] ) ? (array) $info['gcm'] : Consent_Repository::gcm_state(), ); } }