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.
)
Property | Type | Description | |
---|---|---|---|
$aFieldTypeSlugs | Defines the field type slugs used for this field type. |
Property | Type | Description | |
---|---|---|---|
$aDefaultKeys | Defines the default key-values of this field type settings. |
Method | Description | |
---|---|---|
getField ( $aField ) : string | Returns the output of the field type. | |
setUp ( ) | Loads the field type necessary components. |
Method | Description | |
---|---|---|
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. |
Method | Description | |
---|---|---|
_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 | ||
return | array |
protected getScripts ( ) |
protected $aDefaultKeys |