PHP 클래스 Mlp_Quicklink

상속: implements Mlp_Updatable
파일 보기 프로젝트 열기: inpsyde/multilingual-press 1 사용 예제들

공개 메소드들

메소드 설명
__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

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

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