PHP Class Twitter\WordPress\Head\WidgetsMetaElements

Since: 1.0.0
Mostra file Open project: twitter/wordpress

Public Methods

Method Description
buildMetaElements ( ) : string Build HTML meta elements to be included as children of
getWidgetOptions ( ) : array | boolean Get any stored widget theme options
optOutOfTwitterTailoredAudiences ( ) : boolean Opt-out of using visits to this website to influence Twitter tailored content and other suggestions for Twitter users
outputMetaElements ( ) : void Output a HTML string if wiidget theme or other preferences exist
widgetOptionsToMetaElementPairs ( array $options ) : array Convert stored option associative array into a new associative array of meta element name-content pairs for consumption by Twitter's widget JS

Method Details

buildMetaElements() public static method

Build HTML meta elements to be included as children of
Since: 1.0.0
public static buildMetaElements ( ) : string
return string HTML meta elements

getWidgetOptions() public static method

Get any stored widget theme options
Since: 1.0.0
public static getWidgetOptions ( ) : array | boolean
return array | boolean array of set options or false if no option exists

optOutOfTwitterTailoredAudiences() public static method

Applies when Twitter's widgets.js appears on the page to enhance a button or widget
Since: 1.0.0
public static optOutOfTwitterTailoredAudiences ( ) : boolean
return boolean opt out of Twitter tailored audiences

outputMetaElements() public static method

Output a HTML string if wiidget theme or other preferences exist
Since: 1.0.0
public static outputMetaElements ( ) : void
return void

widgetOptionsToMetaElementPairs() public static method

Convert stored option associative array into a new associative array of meta element name-content pairs for consumption by Twitter's widget JS
Since: 1.0.0
public static widgetOptionsToMetaElementPairs ( array $options ) : array
$options array widget options stored by the site
return array associative array