PHP Class WPSEO_Metabox_Tab_Section, wordpress-seo

Inheritance: implements WPSEO_Metabox_Section
Show file Open project: yoast/wordpress-seo

Public Properties

Property Type Description
$name string
$tabs WPSEO_Metabox_Tab[]

Public Methods

Method Description
__construct ( string $name, string $link_content, array $tabs = [], array $options = [] ) Constructor.
add_tab ( WPSEO_Metabox_Tab $tab ) Add a WPSEO_Metabox_Tab object to the tabs.
display_content ( ) Outputs the section content if any tab has been added.
display_link ( ) Outputs the section link if any tab has been added.

Protected Methods

Method Description
has_tabs ( ) : boolean Checks if any tabs have been added to the section.

Private Methods

Method Description
tab_content ( ) : string Concatenates all tabs' content into one html string.
tab_links ( ) : string Concatenates all tabs' links into one html string.

Method Details

__construct() public method

Constructor.
public __construct ( string $name, string $link_content, array $tabs = [], array $options = [] )
$name string The name of the section, used as an identifier in the html. Can only contain URL safe characters.
$link_content string The text content of the section link.
$tabs array The metabox tabs (`WPSEO_Metabox_Tabs[]`) to be included in the section.
$options array Optional link attributes.

add_tab() public method

Add a WPSEO_Metabox_Tab object to the tabs.
public add_tab ( WPSEO_Metabox_Tab $tab )
$tab WPSEO_Metabox_Tab Tab to add.

display_content() public method

Outputs the section content if any tab has been added.
public display_content ( )

has_tabs() protected method

Checks if any tabs have been added to the section.
protected has_tabs ( ) : boolean
return boolean

Property Details

$name public property

public string $name
return string

$tabs public property

public WPSEO_Metabox_Tab[] $tabs
return WPSEO_Metabox_Tab[]