Admin Page Framework - Field Type Pack Documentation
  • Package
  • Class

Packages

  • AdminPageFrameworkFieldTypePack
    • CustomFieldType

Classes

  • AutoCompleteCustomFieldType
  • DateCustomFieldType
  • DateRangeCustomFieldType
  • DateTimeCustomFieldType
  • DateTimeRangeCustomFieldType
  • DialCustomFieldType
  • EDDSoftwareLicensingCustomFieldType
  • FontCustomFieldType
  • GeometryCustomFieldType
  • GridCustomFieldType
  • ImageCheckboxCustomFieldType
  • ImageRadioCustomFieldType
  • LinkCustomFieldType
  • RevealerCustomFieldType
  • TimeCustomFieldType
  • TimeRangeCustomFieldType

Class TimeCustomFieldType

Defines the time field type.

Field Type Specific Arguments

  • time_format - (string) date format default: H:mm.
  • options - (array) the option values passed to the datetimepicker() jQuery plugin method.

Example

array( // Single time picker
    'field_id'      => 'time',
    'type'          => 'time',
    'title'         => __( 'Time', 'admin-page-framework-field-type-pack' ),
    'time_format'   => 'H:mm', // H:mm is the default format.
),
array( // Repeatable time picker fields
    'field_id'      => 'time_repeatable',
    'type'          => 'time',
    'title'         => __( 'Repeatable Time Fields', 'admin-page-framework-field-type-pack' ),
    'repeatable'    => true,
    'options'       => array(
        'hourGrid'      => 4,
        'minuteGrid'    => 10,
        'timeFormat'    => 'hh:mm tt',
    ),
    'description'   => __( 'The grid option is set.', 'admin-page-framework-field-type-pack' ),
),
array( // Sortable
    'field_id'      => 'time_sortable',
    'type'          => 'time',
    'title'         => __( 'Sortable', 'admin-page-framework-field-type-pack' ),
    'sortable'      => true,
    'options'       => array(
        'hourMin' => 8,
        'hourMax' => 16,
    ),
    'description'   => __( 'The maximum and minimum hours are set.', 'admin-page-framework-field-type-pack' ),
    array(), // the second item
    array(), // the third item
),
Package: AdminPageFrameworkFieldTypePack\CustomFieldType
Since: 1.0.0
See: http://trentrichardson.com/examples/timepicker/#tp-options
Located at custom-field-types/date-time-custom-field-types/TimeCustomFieldType.php

Methods summary

protected
# setUp( )

Loads the field type necessary components.

protected
# getEnqueuingScripts( )

Returns an array holding the urls of enqueuing scripts.

protected
# getEnqueuingStyles( )

Returns an array holding the urls of enqueuing styles.

protected
# getScripts( )

Returns the field type specific JavaScript script.

protected
# getIEStyles( )

Returns IE specific CSS rules.

protected
# getStyles( )

Returns the field type specific CSS rules.

protected
# getField( mixed $aField )

Returns the output of the field type.

protected
# _getTimePickerEnablerScript( mixed $sInputID, mixed $sTimeFormat, mixed $asOptions )

A helper function for the above getDateField() method.

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.
Admin Page Framework - Field Type Pack Documentation generated by ApiGen 2.8.0