PHP Класс WPCOM_Legacy_Redirector, vip-mu-plugins-public

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

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

Метод Описание
get_redirect_post_id ( $url )
get_redirect_uri ( $url )
init ( )
insert_legacy_redirect ( string $from_url, integer | string $redirect_to ) : boolean | WP_Error
maybe_do_redirect ( )
start ( )

Приватные методы

Метод Описание
get_url_hash ( $url )
normalise_url ( string $url ) : string Takes a request URL and "normalises" it, stripping common elements

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

get_redirect_post_id() статический публичный Метод

static public get_redirect_post_id ( $url )

get_redirect_uri() статический публичный Метод

static public get_redirect_uri ( $url )

init() статический публичный Метод

static public init ( )

insert_legacy_redirect() статический публичный Метод

static public insert_legacy_redirect ( string $from_url, integer | string $redirect_to ) : boolean | WP_Error
$from_url string URL or path that should be redirected; should have leading slash if path.
$redirect_to integer | string The post ID or URL to redirect to.
Результат boolean | WP_Error Error if invalid redirect URL specified or if the URI already has a rule; false if not is_admin, true otherwise.

maybe_do_redirect() статический публичный Метод

static public maybe_do_redirect ( )

start() статический публичный Метод

static public start ( )