PHP Class Twitter\WordPress\Admin\Settings\Cards\SiteAttribution

Since: 1.0.0
Inheritance: implements Twitter\WordPress\Admin\Settings\SettingsSection
Afficher le fichier Open project: twitter/wordpress

Protected Properties

Свойство Type Description
$hook_suffix The hook suffix of the parent settings page

Méthodes publiques

Méthode Description
addHelpTab ( WP_Screen $screen ) : void Display inline help content
addToSettingsPage ( string $hook_suffix ) : boolean Add site attribution option and settings section to an existing settings page
defineSection ( ) : void Define site attribution section and the fields within
displaySiteAttributionUsername ( ) : void Input a Twitter screen_name to attribute to site content
featureName ( ) : string Reference the feature by name
onload ( ) : void Set up settings section
sanitize ( string $screen_name ) : string Clean up user inputted Twitter username value before saving the option
sectionHeader ( ) : void Introduce the settings section

Method Details

addHelpTab() public static méthode

Display inline help content
Since: 1.0.0
public static addHelpTab ( WP_Screen $screen ) : void
$screen WP_Screen current screen
Résultat void

addToSettingsPage() public static méthode

Add site attribution 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
Résultat boolean site attribution settings loaded

defineSection() public méthode

Define site attribution section and the fields within
Since: 1.0.0
public defineSection ( ) : void
Résultat void

displaySiteAttributionUsername() public méthode

Input a Twitter screen_name to attribute to site content
Since: 1.0.0
public displaySiteAttributionUsername ( ) : void
Résultat void

featureName() public static méthode

Reference the feature by name
Since: 1.0.0
public static featureName ( ) : string
Résultat string translated feature name

onload() public méthode

Set up settings section
Since: 1.0.0
public onload ( ) : void
Résultat void

sanitize() public static méthode

Clean up user inputted Twitter username value before saving the option
Since: 1.0.0
public static sanitize ( string $screen_name ) : string
$screen_name string inputted Twitter username value
Résultat string sanitized Twitter username value

sectionHeader() public static méthode

Introduce the settings section
Since: 1.0.0
public static sectionHeader ( ) : void
Résultat void

Property Details

$hook_suffix protected_oe property

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