Class ImageRadioCustomFieldType
Defines the image_radio field type.
Field Type Specific Arguments
width
- (integer) The image width.height
- (integer) The image height.
Example
array( 'field_id' => 'image_radio', 'type' => 'image_radio', 'title' => __( 'Image Radio', 'admin-page-framework-field-type-pack' ), 'width' => 96, 'height' => 64, 'label_min_width' => 200, 'label' => array( 'a' => AdminPageFrameworkFieldTypePack_Registry::$sDirPath . '/asset/image/a.jpg', 'b' => AdminPageFrameworkFieldTypePack_Registry::$sDirPath . '/asset/image/b.jpg', 'c' => AdminPageFrameworkFieldTypePack_Registry::$sDirPath . '/asset/image/c.jpg', ), 'after_input' => array( 'a' => "<br /><span>" . __( 'First Image' ) . "</span>", 'b' => "<br /><span>" . __( 'Second Image' ) . "</span>", 'c' => "<br /><span>" . __( 'Third Image' ) . "</span>", ), 'default' => 'b', )
Package: AdminPageFrameworkFieldTypePack\CustomFieldType
Since: 1.0.0
Located at custom-field-types/image_radio-custom-field-type/ImageRadioCustomFieldType.php
Since: 1.0.0
Located at custom-field-types/image_radio-custom-field-type/ImageRadioCustomFieldType.php
Methods summary
protected
|
|
protected
|
#
setUp( )
Loads the field type necessary components. This method is triggered when a field definition array that calls this field type is parsed. |
protected
|
#
getEnqueuingScripts( )
Returns an array holding the urls of enqueuing scripts. The returning array should be composed with all numeric keys. Each element can be either a string( the url or the path of the source file) or an array of custom argument. Custom Argument Array
|
protected
|
#
getEnqueuingStyles( )
Returns an array holding the urls of enqueuing styles. Custom Argument Array
|
protected
|
|
protected
|
|
protected
|
|
protected
|
Magic methods summary
Properties summary
public
array
|
$aFieldTypeSlugs |
#
Defines the field type slugs used for this field type. The slug is used for the type key in a field definition array. $this->addSettingFields( array( 'section_id' => ..., 'type' => 'image_radio', // <--- THIS PART 'field_id' => ..., 'title' => ..., ) ); |
protected
array
|
$aDefaultKeys |
#
Defines the default key-values of this field type. The keys are used for the field definition array. $this->addSettingFields( array( 'section_id' => ..., 'type' => ..., 'field_id' => ..., 'my_custom_key' => ..., // <-- THIS PART ) ); Remark
$_aDefaultKeys holds shared default key-values defined in the base class.
|