Yoast\WP\SEO\MyYoast_Client\User_Interface
Myyoast_Connection_Data_Presenter::get_connect_url
Builds the nonce-protected Integrations-page URL that auto-starts the MyYoast connection flow when opened.
Built with add_query_arg() wp_create_nonce() than wp_nonce_url(): the latter HTML-encodes the & separators for markup output, but this URL is localized and assigned to a React href, where it isn't decoded — the browser would then send amp;start-myyoast-connection as the query-arg name and the flow would never start. This form keeps the separators as plain &.
Метод класса: Myyoast_Connection_Data_Presenter{}
Хуков нет.
Возвращает
string. The connect URL.
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_connect_url();
Код Myyoast_Connection_Data_Presenter::get_connect_url() Myyoast Connection Data Presenter::get connect url Yoast 28.4
private function get_connect_url() {
return \add_query_arg(
'_wpnonce',
\wp_create_nonce( 'wpseo-start-myyoast-connection' ),
\self_admin_url( 'admin.php?page=' . Integrations_Page::PAGE . '&start-myyoast-connection=1' ),
);
}