Yoast\WP\SEO\Helpers
Redirect_Helper::do_safe_redirect()
Wraps wp_safe_redirect to allow testing for safe redirects.
Метод класса: Redirect_Helper{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$Redirect_Helper = new Redirect_Helper(); $Redirect_Helper->do_safe_redirect( $location, $status, $reason );
- $location(строка) (обязательный)
- The path to redirect to.
- $status(int)
- The status code to use.
По умолчанию: 302 - $reason(строка)
- The reason for the redirect.
По умолчанию: 'Yoast SEO'
Код Redirect_Helper::do_safe_redirect() Redirect Helper::do safe redirect Yoast 24.4
public function do_safe_redirect( $location, $status = 302, $reason = 'Yoast SEO' ) { \wp_safe_redirect( $location, $status, $reason ); exit; }