PHP Class WPSEO_Social_Admin, wordpress-seo

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

Public Methods

Method Description
__construct ( ) Class constructor
get_meta_boxes ( string $post_type = 'post' ) : array Define the meta boxes for the Social tab
get_meta_section ( ) : WPSEO_Metabox_Tab_Section Returns the metabox section for the social settings.
og_data_compare ( WP_Post $post ) This method will compare opengraph fields with the posted values.
save_meta_boxes ( array $field_defs ) : array Filter over the meta boxes to save, this function adds the Social meta boxes.
tab_content ( ) : string
tab_header ( ) : string
translate_meta_boxes ( ) Translate text strings for use in the meta box

Private Methods

Method Description
get_social_tab_content ( string $medium, array $meta_field_defs ) : string Generates the html for a social settings tab for one of the supported social media.

Method Details

__construct() public method

Class constructor
public __construct ( )

get_meta_boxes() public method

Define the meta boxes for the Social tab
See also: WPSEO_Meta::get_meta_field_defs()
Deprecation: 1.5.0
Deprecation: use WPSEO_Meta::get_meta_field_defs()
public get_meta_boxes ( string $post_type = 'post' ) : array
$post_type string Optional post type string.
return array Array containing the meta boxes

get_meta_section() public method

Returns the metabox section for the social settings.
public get_meta_section ( ) : WPSEO_Metabox_Tab_Section
return WPSEO_Metabox_Tab_Section

og_data_compare() public method

When fields are changed, the facebook cache will be purge.
public og_data_compare ( WP_Post $post )
$post WP_Post Post instance.

save_meta_boxes() public method

Filter over the meta boxes to save, this function adds the Social meta boxes.
public save_meta_boxes ( array $field_defs ) : array
$field_defs array Array of metaboxes to save.
return array

tab_content() public method

Deprecation: 3.0 Removed.
public tab_content ( ) : string
return string

tab_header() public method

Deprecation: 3.0 Removed.
public tab_header ( ) : string
return string

translate_meta_boxes() public static method

IMPORTANT: if you want to add a new string (option) somewhere, make sure you add that array key to the main meta box definition array in the class WPSEO_Meta() as well!!!!
public static translate_meta_boxes ( )