Skip to content

Register simple Customizer fields natively - #2088

Draft
sebastianthulin with Copilot wants to merge 2 commits into
mainfrom
copilot/customizer-use-native-fields
Draft

Register simple Customizer fields natively#2088
sebastianthulin with Copilot wants to merge 2 commits into
mainfrom
copilot/customizer-use-native-fields

Conversation

Copilot AI commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Kirki is being retired from Municipio, so simple 1:1 Customizer fields should use native WordPress controls where possible. Complex Kirki-specific fields remain on Kirki for follow-up work.

  • Native field registration

    • Routes simple fields through customize_register.
    • Supports native-compatible types such as select, radio, text, textarea, checkbox, number, url, color, image, and upload.
    • Keeps fields with Kirki-specific options on Kirki::add_field().
  • Applicator compatibility

    • Exposes native field definitions to existing Customizer applicators.
    • Reads native field values via get_theme_mod() while preserving Kirki value reads for complex fields.
  • Focused coverage

    • Adds tests for native-field detection and native setting/control registration.
KirkiField::addField([
    'type'     => 'select',
    'settings' => 'column_size_left',
    'label'    => esc_html__('Left', 'municipio'),
    'section'  => $sectionID,
    'default'  => 'normal',
    'choices'  => [
        'normal' => esc_html__('Normal', 'municipio'),
        'large'  => esc_html__('Large', 'municipio'),
    ],
]);

Simple fields like this are now registered as native WordPress Customizer controls instead of Kirki fields.

Copilot AI changed the title [WIP] Convert customizer fields to native fields Register simple Customizer fields natively Jun 3, 2026
Copilot AI requested a review from sebastianthulin June 3, 2026 07:10
@sonarqubecloud

sonarqubecloud Bot commented Jun 3, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Customizer should use native fields as far as possible

2 participants