PHP Класс Mlp_Quicklink

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

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

Метод Описание
__construct ( Inpsyde\MultilingualPress\Module\ModuleManager $module_manager, Mlp_Language_Api_Interface $language_api, AssetManager $asset_manager, Inpsyde\MultilingualPress\Common\Nonce\Nonce $nonce ) Constructor. Sets up the properties.
deactivate_module ( ) : void Deletes the according site option on module deactivation.
draw_options_page_form_fields ( ) : void Displays the module options page form fields.
extend_allowed_hosts ( array $home_hosts, string $remote_host ) : string[] Adds all domains of the network to the allowed hosts.
frontend_tab ( string $content ) : string Create the tab and prepend it to the body tag.
initialize ( ) : void Wires up all functions.
load_style ( ) : boolean Requires the stylesheet.
save_options_page_form_fields ( ) : void Saves module user input.
update ( string $name ) : void Nothing to do here.

Защищенные методы

Метод Описание
get_html_container ( string $selections, string $type, array $translated, string $position ) : string Returns the remote post links in form of up to three link elements, or a select element for more than three links.
to_html ( array $translated, string $position ) : string Converts the list of translated posts into HTML.

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

Метод Описание
get_translations ( ) : Inpsyde\MultilingualPress\Common\Type\Translation[] Returns the translations.
redirect_quick_link ( string $url ) : void Catches quicklink submissions and redirects if the URL is valid.
register_setting ( ) : boolean Registers the module.

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

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

Constructor. Sets up the properties.
public __construct ( Inpsyde\MultilingualPress\Module\ModuleManager $module_manager, Mlp_Language_Api_Interface $language_api, AssetManager $asset_manager, Inpsyde\MultilingualPress\Common\Nonce\Nonce $nonce )
$module_manager Inpsyde\MultilingualPress\Module\ModuleManager Module manager object.
$language_api Mlp_Language_Api_Interface Language API object.
$asset_manager Inpsyde\MultilingualPress\Asset\AssetManager Asset manager object.
$nonce Inpsyde\MultilingualPress\Common\Nonce\Nonce Nonce object.

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

Deletes the according site option on module deactivation.
С версии: 0.1
public static deactivate_module ( ) : void
Результат void

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

Displays the module options page form fields.
С версии: 0.1
public draw_options_page_form_fields ( ) : void
Результат void

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

Adds all domains of the network to the allowed hosts.
С версии: 1.0.4
public extend_allowed_hosts ( array $home_hosts, string $remote_host ) : string[]
$home_hosts array Array with one entry: the host of home_url().
$remote_host string Host name of the URL to validate.
Результат string[]

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

Create the tab and prepend it to the body tag.
public frontend_tab ( string $content ) : string
$content string HTML content.
Результат string

get_html_container() защищенный Метод

Returns the remote post links in form of up to three link elements, or a select element for more than three links.
protected get_html_container ( string $selections, string $type, array $translated, string $position ) : string
$selections string 'option' or 'a' elements.
$type string 'links' or 'form'.
$translated array Original array of translated posts, passed to the filter.
$position string Quicklink position.
Результат string

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

Wires up all functions.
public initialize ( ) : void
Результат void

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

Requires the stylesheet.
public load_style ( ) : boolean
Результат boolean

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

Saves module user input.
С версии: 0.1
public save_options_page_form_fields ( ) : void
Результат void

to_html() защищенный Метод

Converts the list of translated posts into HTML.
protected to_html ( array $translated, string $position ) : string
$translated array Translated posts.
$position string Position of the quicklinks tab.
Результат string

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

Nothing to do here.
public update ( string $name ) : void
$name string
Результат void