Свойство | Тип | Описание | |
---|---|---|---|
$_bAddedScriptToFooter | |||
$aFieldTypeSlugs | The slug is used for the type key in a field definition array.
$this->addSettingFields(
array(
'section_id' => '...',
'type' => 'github', // <--- THIS PART
'field_id' => '...',
'title' => '...',
)
); |
Свойство | Тип | Описание | |
---|---|---|---|
$aDefaultKeys | The keys are used for the field definition array.
$this->addSettingFields(
array(
'section_id' => '...',
'type' => '...',
'field_id' => '...',
'my_custom_key' => '...', // <-- THIS PART
)
); |
Метод | Описание | |
---|---|---|
_replyToAddScript ( ) |
Метод | Описание | |
---|---|---|
construct ( ) | User constructor. | |
getEnqueuingScripts ( ) | Returns an array holding the urls of enqueuing scripts. | |
getEnqueuingStyles ( ) | Returns an array holding the urls of enqueuing styles. | |
getField ( $aField ) | Returns the output of the field type. | |
getIEStyles ( ) | Returns IE specific CSS rules. | |
getScripts ( ) | Returns the field type specific JavaScript script. | |
getStyles ( ) | Returns the field type specific CSS rules. | |
setUp ( ) | Loads the field type necessary components. |
Метод | Описание | |
---|---|---|
_getButtonLabelByType ( $sButtonType, $sUserName, $sValue ) | ||
_getCountAPIByType ( $sButtonType, $sUserName, $sRepository ) | ||
_getCountHrefByType ( $sButtonType, $sUserName, $sRepository ) | ||
_getGitHubAPICountSlugByType ( $sType ) | Returns the API count slug used for the given type. | |
_getGitHubAPISlugByType ( $sType ) | Returns the API slug used for the given type. | |
_getHrefByType ( $sButtonType, $sUserName, $sRepository ) | ||
_getIcontByType ( $sButtonType ) |
false
.array( 'async' => '', 'data-id' => '...' )
array(
'src' => dirname( __FILE__ ) . '/asset/github-buttons/buttons.js',
'handle_id' => 'github-bjs',
'in_footer' => true,
'attributes' => array(
'async' => '',
'defer' => '',
),
)
protected getEnqueuingScripts ( ) |
array( 'data-id' => '...' )
array(
array(
'src' => dirname( __FILE__ ) . '/assets/css/main.css',
'handle_id' => 'custom_button_css',
),
);
protected getEnqueuingStyles ( ) |
protected getScripts ( ) |
protected setUp ( ) |
$this->addSettingFields(
array(
'section_id' => '...',
'type' => '...',
'field_id' => '...',
'my_custom_key' => '...', // <-- THIS PART
)
);
protected $aDefaultKeys |