array(
'results' => array(
array(
'id' => 224, //the value saved in the database.
'text' => 'The title of this item.' //The text displayed in the drop-down list.
),
array(
'id' => 567,
'text' => 'The title of this item.'
),
... continues ...
),
'pagination' => array( // can be omitted
'more' => true, // (boolean) or false - whether the next paginated item exists or not.
)
)
array(
'id' => 78, // the value which will be stored in the database.
'text' => 'Tag Name', // the tag name gets displayed in the field.
'note' => 'A console message.' // (optional) A note displayed in the browser console.
'error' => 'An error massage.', // (optional) if this is set, an error message will be displayed.
)
프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$aFieldTypeSlugs | Defines the field type slugs used for this field type. |
프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$aDefaultKeys | Defines the default key-values of this field type settings. |
메소드 | 설명 | |
---|---|---|
getField ( $aField ) : string | Returns the output of the field type. | |
setUp ( ) | Loads the field type necessary components. |
메소드 | 설명 | |
---|---|---|
construct ( ) | ||
doOnFieldRegistration ( $aFieldset ) | Callks back the callback function if it is set. | |
getEnqueuingScripts ( ) : array | Returns an array holding the urls of enqueuing scripts. | |
getEnqueuingStyles ( ) : array | ||
getScripts ( ) | Returns the field type specific JavaScript script. | |
getStyles ( ) | Returns the field type specific CSS rules. |
메소드 | 설명 | |
---|---|---|
_getAjaxCallback ( $aRequest, $aFieldset ) : boolean | callable | ||
_getAttributesUpdatedForAJAX ( $aField ) : array | For AJAX enabled fields, the stored field data structure becomes different. | |
_getCamelCaseToDashed ( $sString ) : string | ||
_getChildInputByKey ( $sKey, $aField ) : string | ||
_getSelect2OptionsFormatted ( $aOptions, $aField ) : array | ||
_shouldProceedToAjaxRequest ( $aRequest, $aFieldset ) : boolean |
protected doOnFieldRegistration ( $aFieldset ) |
protected getEnqueuingScripts ( ) : array | ||
리턴 | array |
protected $aDefaultKeys |