PHP Class WPSEO_Taxonomy_Social_Fields, wordpress-seo

Inheritance: extends WPSEO_Taxonomy_Fields
ファイルを表示 Open project: yoast/wordpress-seo Class Usage Examples

Public Methods

Method Description
__construct ( stdClass | WP_Term $term, array $options = null ) Setting the class properties
get ( ) : array Returning the fields for the social media tab
get_by_network ( string $network ) : array Gets the social meta fields by social network for the taxonomy.
show_social ( ) : boolean When this method returns false, the social tab in the meta box will be hidden

Private Methods

Method Description
filter_social_networks ( array $social_networks ) : array Filter the social networks which are disabled in the configuration
get_social_networks ( ) : array Getting array with the social networks
social_network ( string $network, string $label, string $image_size ) : array Returns array with the config fields for the social network

Method Details

__construct() public method

Setting the class properties
public __construct ( stdClass | WP_Term $term, array $options = null )
$term stdClass | WP_Term The current taxonomy.
$options array The options.

get() public method

Returning the fields for the social media tab
public get ( ) : array
return array

get_by_network() public method

Gets the social meta fields by social network for the taxonomy.
public get_by_network ( string $network ) : array
$network string The social network for which to fetch the fields.
return array

show_social() public method

When this method returns false, the social tab in the meta box will be hidden
public show_social ( ) : boolean
return boolean