Class DialCustomFieldType
Defines the dial field type.
Field Type Specific Arguments
This filed type does not have a type-specific argument. However, all the settings are done in theattributes
argument and with the
date-{...}
attributes. See more details here.
Example
array( 'field_id' => 'dials', 'title' => __( 'Multiple Dials', 'admin-page-framework-field-type-pack' ), 'type' => 'dial', 'label' => __( 'Default', 'admin-page-framework-field-type-pack' ), 'attributes' => array( 'field' => array( 'style' => 'display: inline; clear: none', // this makes the field element inline, which means next fields continues from the right end of the field, not from the new line. ), ), array( 'label' => __( 'Disable display input', 'admin-page-framework-field-type-pack' ), 'attributes' => array( // For details, see https://github.com/aterrien/jQuery-Knob 'data-width' => 100, 'data-displayInput' => 'false', ), ), array( 'label' => __( 'Cursor mode', 'admin-page-framework-field-type-pack' ), 'attributes' => array( 'data-width' => 150, 'data-cursor' => 'true', 'data-thickness' => '.3', 'data-fgColor' => '#222222', ), ), array( 'label' => __( 'Display previous value (effect)', 'admin-page-framework-field-type-pack' ), 'attributes' => array( 'data-width' => 200, 'data-min' => -100, 'data-displayPrevious' => 'true', // a boolean value also needs to be passed as string ), ), array( 'label' => __( 'Angle offset', 'admin-page-framework-field-type-pack' ), 'attributes' => array( 'data-angleOffset' => 90, 'data-linecap' => 'round', ), ), array( 'label' => __( 'Angle offset and arc', 'admin-page-framework-field-type-pack' ), 'attributes' => array( 'data-fgColor' => '#66CC66', 'data-angleOffset' => -125, 'data-angleArc' => 250, ), ), array( 'label' => __( '5-digit values, step 1000', 'admin-page-framework-field-type-pack' ), 'attributes' => array( 'data-step' => 1000, 'data-min' => -15000, 'data-max' => 15000, 'data-displayPrevious' => true, ), ), ), array( 'field_id' => 'dial_big', 'title' => __( 'Big', 'admin-page-framework-field-type-pack' ), 'type' => 'dial', 'attributes' => array( 'data-width' => 400, 'data-height' => 400, ), ), array( 'field_id' => 'dial_repeatable', 'title' => __( 'Repeatable', 'admin-page-framework-field-type-pack' ), 'type' => 'dial', 'repeatable' => true, ), array( 'field_id' => 'dial_sortable', 'title' => __( 'Sortable', 'admin-page-framework-field-type-pack' ), 'type' => 'dial', 'sortable' => true, 'attributes' => array( 'field' => array( 'style' => 'display: inline; clear: none', // this makes the field element inline, which means next fields continues from the right end of the field, not from the new line. ), 'data-width' => 100, 'data-height' => 100, ), array(), // the second item array(), // the third item array(), // the fourth item )
Package: AdminPageFrameworkFieldTypePack\CustomFieldType
Since: 1.0.0
See: http://anthonyterrien.com/knob/
See: https://github.com/aterrien/jQuery-Knob
Located at custom-field-types/dial-custom-field-type/DialCustomFieldType.php
Since: 1.0.0
See: http://anthonyterrien.com/knob/
See: https://github.com/aterrien/jQuery-Knob
Located at custom-field-types/dial-custom-field-type/DialCustomFieldType.php
Methods summary
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
Magic methods summary
Properties summary
public
array
|
$aFieldTypeSlugs |
#
Defines the field type slugs used for this field type. |
protected
array
|
$aDefaultKeys |
#
Defines the default key-values of this field type. Remark
$_aDefaultKeys holds shared default key-values defined in the base class.
|