PHP Class Twitter\WordPress\Admin\Settings\Buttons\Tweet

Since: 1.0.0
Inheritance: implements Twitter\WordPress\Admin\Settings\SettingsSection
Datei anzeigen Open project: twitter/wordpress

Protected Properties

Property Type Description
$hook_suffix The hook suffix of the parent settings page

Public Methods

Method Description
addToSettingsPage ( string $hook_suffix ) : boolean Add Tweet button content wrapper option and settings section to an existing settings page
defineSection ( ) : void Define Tweet button section and the fields within
displayPosition ( ) : void Choose to display a Tweet button before, after, or before & after every public post
displaySize ( ) : void Choose a large button size, overriding the default
featureName ( ) : string Reference the feature by name
getPositionOptions ( ) : array Get option values and labels for dropdown display
onload ( ) : void Set up settings section
sanitizeOption ( array $options ) : array Sanitize posted option before saving
sectionHeader ( ) : void Introduce the settings section

Method Details

addToSettingsPage() public static method

Add Tweet button content wrapper option and settings section to an existing settings page
Since: 1.0.0
public static addToSettingsPage ( string $hook_suffix ) : boolean
$hook_suffix string hook suffix of an existing settings page
return boolean site attribution settings loaded

defineSection() public method

Define Tweet button section and the fields within
Since: 1.0.0
public defineSection ( ) : void
return void

displayPosition() public method

Choose to display a Tweet button before, after, or before & after every public post
Since: 1.0.0
public displayPosition ( ) : void
return void

displaySize() public method

Choose a large button size, overriding the default
Since: 1.0.0
public displaySize ( ) : void
return void

featureName() public static method

Reference the feature by name
Since: 1.0.0
public static featureName ( ) : string
return string translated feature name

getPositionOptions() public static method

Get option values and labels for dropdown display
Since: 1.0.0
public static getPositionOptions ( ) : array
return array option values and labels { @type string option value @type string translated option label }

onload() public method

Set up settings section
Since: 1.0.0
public onload ( ) : void
return void

sanitizeOption() public static method

Sanitize posted option before saving
Since: 1.0.0
public static sanitizeOption ( array $options ) : array
$options array submitted option { @type string option name @type mixed option value }
return array $options cleaned option { @type string option name @type string option value }

sectionHeader() public static method

Introduce the settings section
Since: 1.0.0
public static sectionHeader ( ) : void
return void

Property Details

$hook_suffix protected_oe property

The hook suffix of the parent settings page
Since: 1.0.0
protected $hook_suffix