Basic Input Field Types

text

array(
    'id'          => 'entry_slug',
    'type'        => 'text',
    'label'       => 'Entry slug',
    'description' => 'A plain single-line text value.',
    'default'     => 'featured-entry',
    'placeholder' => 'featured-entry',
),

url

array(
    'id'          => 'template_endpoint',
    'type'        => 'url',
    'label'       => 'Template endpoint',
    'description' => 'Sanitized with esc_url_raw().',
    'default'     => 'https://example.com/templates.json',
),

textarea

array(
    'id'      => 'summary',
    'type'    => 'textarea',
    'label'   => 'Summary',
    'default' => 'Use one PHP schema to drive defaults, UI, and storage.',
),

number

array(
    'id'      => 'retry_limit',
    'type'    => 'number',
    'label'   => 'Retry limit',
    'min'     => 0,
    'max'     => 10,
    'step'    => 1,
    'default' => 3,
),

slider

Range input backed by min / max / step, same options shape as number.

array(
    'id'          => 'entry_priority',
    'type'        => 'slider',
    'label'       => 'Entry priority',
    'description' => 'Rendered as a range input.',
    'min'         => 1,
    'max'         => 5,
    'step'        => 1,
    'default'     => 3,
),

spinner

Stepper input, same min / max / step options as slider.

array(
    'id'          => 'entry_score',
    'type'        => 'spinner',
    'label'       => 'Entry score',
    'min'         => 0,
    'max'         => 10,
    'step'        => 1,
    'default'     => 2,
),

date

array(
    'id'          => 'entry_review_date',
    'type'        => 'date',
    'label'       => 'Entry review date',
    'default'     => '2026-04-26',
),

color

array(
    'id'          => 'accent_color',
    'type'        => 'color',
    'label'       => 'Accent color',
    'description' => 'Rendered with the WP color picker.',
    'default'     => '#2271b1',
),

Back to top

Copyright © 2026 Lerm. Distributed under GPL-2.0-or-later.

This site uses Just the Docs, a documentation theme for Jekyll.