kirki icon indicating copy to clipboard operation
kirki copied to clipboard

Panel priorities don't work in nested Panels

Open rahulv3a opened this issue 7 years ago • 6 comments

Issue description:

Panel priorities don't work in nested Panels.

Output is chrome_2018-10-24_11-57-12

Expected output is chrome_2018-10-24_11-58-40

Version used:

Commit b2a192f 10 days ago

Using theme_mods or options?

theme_mods

Code to reproduce the issue (config + field(s))

Kirki::add_config( 'theme_config_id', array(
	'capability'  => 'edit_theme_options',
	'option_type' => 'theme_mod',
) );

Kirki::add_panel( 'panel_1', array(
  'title' => esc_attr__( 'Panel', 'textdomain' ),
) );

Kirki::add_section( 'section_1', array(
	'title'    => esc_attr__( 'Section 1', 'textdomain' ),
	'panel'    => 'panel_1',
	'priority' => 100,
) );

Kirki::add_field( 'theme_config_id', array(
	'type'        => 'checkbox',
	'settings'    => 'checkbox_setting_1',
	'label'       => esc_attr__( 'Checkbox 1', 'textdomain' ),
	'description' => esc_attr__( 'Description', 'textdomain' ),
	'section'     => 'section_1',
	'default'     => true,
) );

Kirki::add_section( 'section_2', array(
	'title'    => esc_attr__( 'Section 2', 'textdomain' ),
	'panel'    => 'panel_1',
	'priority' => 200,
) );

Kirki::add_field( 'theme_config_id', array(
	'type'        => 'checkbox',
	'settings'    => 'checkbox_setting_2',
	'label'       => esc_attr__( 'Checkbox 2', 'textdomain' ),
	'description' => esc_attr__( 'Description', 'textdomain' ),
	'section'     => 'section_2',
	'default'     => true,
) );

Kirki::add_section( 'section_3', array(
	'title'    => esc_attr__( 'Section 3', 'textdomain' ),
	'panel'    => 'panel_1',
	'priority' => 300,
) );

Kirki::add_field( 'theme_config_id', array(
	'type'        => 'checkbox',
	'settings'    => 'checkbox_setting_3',
	'label'       => esc_attr__( 'Checkbox 3', 'textdomain' ),
	'description' => esc_attr__( 'Description', 'textdomain' ),
	'section'     => 'section_3',
	'default'     => true,
) );

Kirki::add_panel( 'panel_2', array(
	'title'    => esc_attr__( 'Panel', 'textdomain' ),
	'panel'    => 'panel_1',
	'priority' => 400,
) );

Kirki::add_section( 'section_4', array(
	'title' => esc_attr__( 'Section 4', 'textdomain' ),
	'panel' => 'panel_2',
) );

Kirki::add_field( 'theme_config_id', array(
	'type'        => 'checkbox',
	'settings'    => 'checkbox_setting_4',
	'label'       => esc_attr__( 'Checkbox 4', 'textdomain' ),
	'description' => esc_attr__( 'Description', 'textdomain' ),
	'section'     => 'section_4',
	'default'     => true,
) );

rahulv3a avatar Oct 24 '18 06:10 rahulv3a

check your settings. i think you have an error in the setup. does the error still exist?

niklasp avatar Nov 21 '18 13:11 niklasp

I tried this exact code with Twenty Seventeen theme again. Panel and section priorities don't work in nested Panels

rahulv3a avatar Nov 24 '18 09:11 rahulv3a

Confirmed bug.

aristath avatar Nov 26 '18 19:11 aristath

I have this same problem. Priority rule doesn't work properly for panels and sections into panels. Kirki: 3.0.39 Wordpress: 5.2

MichaelRise avatar May 17 '19 22:05 MichaelRise

Hello and thank you for reporting this issue.

We are closing most open GitHub issues with the release of Kirki 4 to start fresh with this major release.

If you are still running into issues after you have tested your theme with Kirki 4, please let us know so we can reopen the issue.

Please note that Kirki 3 is no longer actively supported. Moving forward, we will only provide support the very latest version of Kirki.

Thank you for your understanding.

Best, David

mapsteps avatar Dec 28 '21 15:12 mapsteps

The issue persists with v4. Please reopen this one.

rahulv3a avatar Dec 31 '21 08:12 rahulv3a