[wp-trac] [WordPress Trac] #35947: Customizer Bug
WordPress Trac
noreply at wordpress.org
Thu Feb 25 09:34:51 UTC 2016
#35947: Customizer Bug
--------------------------+-----------------------------
Reporter: tronoxas | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Customize | Version: 4.4.2
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
Here's a short video of the bug -
https://www.youtube.com/watch?v=va2CvpoBgZM
There's this unnecessary spacing when you go inside a panel.
Steps to be taken to reproduce the problem - this is the code that you can
use in functions.php to replicate the problem.
{{{#!php
<?php
function aristath_custom_test_settings( $wp_customize ) {
$panels_nr = 20;
$sections_nr = 20;
$fields_nr = 2;
// Create panels
for ( $panel_id = 0; $panel_id <= $panels_nr; $panel_id++ ) {
$wp_customize->add_panel( 'panel_' . $panel_id, array(
'title' => sprintf( __( 'Panel %s', 'my_theme' ),
$panel_id ),
'capability' => 'edit_theme_options',
) );
// Create sections
for ( $section_id = 0; $section_id <= $sections_nr; $section_id++
) {
$wp_customize->add_section( 'panel_' . $panel_id . '_section_'
. $section_id, array(
'title' => sprintf( __( 'Panel %1s Section %2s',
'my_theme' ), $panel_id, $section_id ),
'capability' => 'edit_theme_options',
'panel' => 'panel_' . $panel_id,
) );
// create fields
for ( $field_id = 0; $field_id <= $fields_nr; $field_id++ ) {
$setting = 'panel_' . $panel_id . '_section_' .
$section_id . '_field_' . $field_id;
$wp_customize->add_setting( $setting, array(
'default' => '',
'type' => 'theme_mod',
'capability' => 'edit_theme_options',
) );
$wp_customize->add_control( $setting, array(
'label' => sprintf( __( 'Panel %1s Section %2s
Field %3s', 'my_theme' ), $panel_id, $section_id, $field_id ),
'section' => 'panel_' . $panel_id . '_section_' .
$section_id,
'settings' => $setting,
'type' => 'text',
) );
}
}
}
}
add_action( 'customize_register', 'aristath_custom_test_settings' );
}}}
Problem occurs in twentysixteen. All the plugins have been deactivated.
OS & Browser - Windows 8 Pro 64 bit, Firefox.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35947>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list