Yoast\WP\SEO\AI_Consent\User_Interface

Ai_Consent_Integration::get_script_data │ public │ Yoast 1.0

Устарела с версии 28.4. Больше не поддерживается и может быть удалена. Рекомендуется заменить эту функцию на аналог.

Returns the script data for the AI consent button.

Метод класса: Ai_Consent_Integration{}

Хуков нет.

Возвращает

array<string, string|bool>.

Использование

$Ai_Consent_Integration = new Ai_Consent_Integration();
$Ai_Consent_Integration->get_script_data(): array;

Список изменений

Устарела с 28.4

Код Ai_Consent_Integration::get_script_data() Yoast 28.9

public function get_script_data(): array {
	\_deprecated_function( __METHOD__, 'Yoast SEO 28.4' );
	return [
		'hasConsent' => $this->user_helper->get_meta( $this->user_helper->get_current_user_id(), '_yoast_wpseo_ai_consent', true ),
		'pluginUrl'  => \plugins_url( '', \WPSEO_FILE ),
		'linkParams' => $this->short_link_helper->get_query_params(),
		'endpoints'  => $this->endpoints_repository->get_all_endpoints()->to_paths_array(),
		'adminUrl'   => \admin_url(),
	];
}