PHP Класс Mlp_Redirect_Frontend

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( Mlp_Redirect_Response_Interface $response, string $option_name ) Constructor.
add_noredirect_parameter ( string $url, integer $site_id ) : string Adds the noredirect query var to the given URL.
is_redirectable ( ) : boolean Checks if the current request should be redirected.
setup ( ) : void Initializes the redirect data and response classes.

Описание методов

__construct() публичный Метод

Constructor.
public __construct ( Mlp_Redirect_Response_Interface $response, string $option_name )
$response Mlp_Redirect_Response_Interface Redirect response object.
$option_name string Option name.

add_noredirect_parameter() публичный Метод

Adds the noredirect query var to the given URL.
public add_noredirect_parameter ( string $url, integer $site_id ) : string
$url string URL.
$site_id integer Site ID.
Результат string

is_redirectable() публичный Метод

Requires an accept header, the redirect feature being active for the current site, and the current language not being included in the $_SESSION's noredirect element.
public is_redirectable ( ) : boolean
Результат boolean

setup() публичный Метод

Initializes the redirect data and response classes.
public setup ( ) : void
Результат void