WPSEO_Abstract_Post_Filter::is_filter_active
Returns true when the filter is active.
Метод класса: WPSEO_Abstract_Post_Filter{}
Хуков нет.
Возвращает
true|false. Whether the filter is active.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->is_filter_active();
Код WPSEO_Abstract_Post_Filter::is_filter_active() WPSEO Abstract Post Filter::is filter active Yoast 26.3
protected function is_filter_active() {
// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information.
if ( isset( $_GET[ self::FILTER_QUERY_ARG ] ) && is_string( $_GET[ self::FILTER_QUERY_ARG ] ) ) {
// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information.
return sanitize_text_field( wp_unslash( $_GET[ self::FILTER_QUERY_ARG ] ) ) === $this->get_query_val();
}
return false;
}