You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Existing Repeater not updating when new fields is added.
Version used:
WP Latest 4.9.6
Kirki 3.0.33
Using theme_mods or options?
theme_mods
Code to reproduce the issue (config + field(s))
Step 1: Create repeater with 2 fields
Step 2: Add and save data to fields
Step 3: Add new fields to repeater
Step 4: Update saved data
Step 5: Thats it will save only the first 2 fields value, but if you add new link it will get the 5 fields value.
Issue description:
Existing Repeater not updating when new fields is added.
Version used:
WP Latest 4.9.6
Kirki 3.0.33
Using theme_mods or options?
theme_mods
Code to reproduce the issue (config + field(s))
Step 1: Create repeater with 2 fields
Step 2: Add and save data to fields
Step 3: Add new fields to repeater
Step 4: Update saved data
Step 5: Thats it will save only the first 2 fields value, but if you add new link it will get the 5 fields value.
Code:
Kirki::add_field(THEME_CUSTOMISER_ID, array(
'type' => 'repeater',
'label' => esc_attr__('Copyrights Links', TEXTDOMAIN),
'section' => 'copyrights_section',
'priority' => 10,
'row_label' => array(
'type' => 'field',
'value' => esc_attr__('Custom Link', TEXTDOMAIN),
'field' => 'link_text',
),
'button_label' => esc_attr__('Add Links', TEXTDOMAIN),
'settings' => 'copyright_links',
'default' => array(
array(
'link_text' => esc_attr__('Disclaimer', TEXTDOMAIN),
'link_url' => '/disclaimer',
'link_new_tab' => false,
'link_relationship' => '',
'link_class' => ''
),
array(
'link_text' => esc_attr__('Privacy Policy', TEXTDOMAIN),
'link_url' => '/privacy-policy',
'link_new_tab' => false,
'link_relationship' => '',
'link_class' => ''
),
array(
'link_text' => esc_attr__('Terms & Conditions', TEXTDOMAIN),
'link_url' => '/terms-conditions',
'link_new_tab' => false,
'link_relationship' => '',
'link_class' => ''
),
),
'fields' => array(
'link_text' => array(
'type' => 'text',
'label' => esc_attr__('Link Text', TEXTDOMAIN),
'description' => esc_attr__('This will be the label for your link', TEXTDOMAIN),
'default' => ''
),
'link_url' => array(
'type' => 'url',
'label' => esc_attr__('Link URL', TEXTDOMAIN),
'description' => esc_attr__('This will be the link URL', TEXTDOMAIN),
'default' => ''
),
'link_new_tab' => array(
'type' => 'checkbox',
'label' => esc_attr__('Open New Tab', TEXTDOMAIN),
'default' => false
),
'link_relationship' => array(
'type' => 'text',
'label' => esc_attr__('Link Relationship (XFN)', TEXTDOMAIN),
'description' => esc_attr__('This will be the link Relationship', TEXTDOMAIN),
'default' => ''
),
'link_class' => array(
'type' => 'text',
'label' => esc_attr__('CSS Classes (Optional)', TEXTDOMAIN),
'description' => esc_attr__('This will be the link Relationship', TEXTDOMAIN),
'default' => ''
)
)
));
Screenshots
The text was updated successfully, but these errors were encountered: