Yoast\WP\SEO\Helpers
Crawl_Cleanup_Helper::get_allowed_extravars()
Returns the list of the allowed extra vars.
Метод класса: Crawl_Cleanup_Helper{}
Хуки из метода
Возвращает
Массив
. The list of the allowed extra vars.
Использование
$Crawl_Cleanup_Helper = new Crawl_Cleanup_Helper(); $Crawl_Cleanup_Helper->get_allowed_extravars();
Код Crawl_Cleanup_Helper::get_allowed_extravars() Crawl Cleanup Helper::get allowed extravars Yoast 23.4
public function get_allowed_extravars() { $default_allowed_extravars = [ 'utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'gclid', 'gtm_debug', ]; /** * Filter: 'Yoast\WP\SEO\allowlist_permalink_vars' - Allows plugins to register their own variables not to clean. * * @since 19.2.0 * * @param array $allowed_extravars The list of the allowed vars (empty by default). */ $allowed_extravars = \apply_filters( 'Yoast\WP\SEO\allowlist_permalink_vars', $default_allowed_extravars ); $clean_permalinks_extra_variables = $this->options_helper->get( 'clean_permalinks_extra_variables' ); if ( $clean_permalinks_extra_variables !== '' ) { $allowed_extravars = \array_merge( $allowed_extravars, \explode( ',', $clean_permalinks_extra_variables ) ); } return $allowed_extravars; }