Class ImageCheckboxCustomFieldType
Defines the image_checkbox field type.
Field Type Specific Arguments
width
- (integer) The image width.height
- (integer) The image height.
Example
array( 'field_id' => 'image_checkbox', 'type' => 'image_checkbox', 'title' => __( 'Image Checkbox', '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>", ), ),
Since: 1.0.0
Located at custom-field-types/image_checkbox-custom-field-type/ImageCheckboxCustomFieldType.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_checkbox', // <--- 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.
|
protected
string
|
$_sCheckboxClassSelector |
#
The class selector to indicate that the input tag is a admin page framework checkbox. This selector is used for the repeatable and sortable field scripts. Since
3.1.7
|