WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#29172 closed defect (bug) (fixed)

Customizer Sections and Panels default to being at the top, not the bottom

Reported by: celloexpressions Owned by: ocean90
Milestone: 4.0 Priority: low
Severity: normal Version: 3.4
Component: Customize Keywords: has-patch
Focuses: Cc:
PR Number:

Description

One of the concerns with panels always being at the top of the Customizer is that they push down the title & tagline section. But new Customizer sections that don't specify a priority get a default priority of 10, which is before all core sections. We should change the default to be at the bottom, after all core sections and with some breathing room for custom sections that want to be before unspecified/default ones. Panels inherit this same priority, since they're implemented as a subclass of sections. The lowest core section is static front page at 120; I'm suggesting 160 for default (all of the core section priorities are multiples of 20, that leaves a "core" space in between, plus all intermediate values).

This came up during dev chat when discussing our options for #28979 at length, see logs. Putting on 4.0 per that discussion, #28979, and because this is a really simple, one-character change/fix. Yes, it moves existing sections around that didn't specify priorities, and yes, that's okay because they didn't specify a priority and things are moving around a bit anyway in 4.0 with panels. I'm much more comfortable with suggesting not specifying your own priority (which you usually shouldn't really need to do in a plugin) if the default is 160.

Attachments (1)

29172.diff (448 bytes) - added by celloexpressions 5 years ago.
Change default section (and panel) priority from 10 to 160.

Download all attachments as: .zip

Change History (5)

@celloexpressions
5 years ago

Change default section (and panel) priority from 10 to 160.

#1 @celloexpressions
5 years ago

  • Priority changed from normal to low

#2 @celloexpressions
5 years ago

  • Component changed from General to Customize

This is fixed for panels now that they're their own class (default 160). Patch should still work for sections.

This ticket was mentioned in IRC in #wordpress-dev by celloexpressions. View the logs.


5 years ago

#4 @ocean90
5 years ago

  • Owner set to ocean90
  • Resolution set to fixed
  • Status changed from new to closed

In 29508:

Customizer: Increase default priority for a section to 160.

props celloexpressions.
fixes #29172.

Note: See TracTickets for help on using tickets.