WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#18334 closed enhancement (fixed)

Add IDs to div.widgets-holder-wrap in widget admin screen to allow custom layout

Reported by: sillybean Owned by:
Milestone: 3.3 Priority: normal
Severity: normal Version: 3.2.1
Component: Widgets Keywords: has-patch ui-feedback
Focuses: Cc:

Description

I've been fiddling around with the layout of wp-admin/widgets.php, using a stylesheet full of overrides enqueued to that page in my theme functions file, to see if I can produce a layout that better matches the theme and makes more sense to my users. (None of them understand the stacked-sidebar model.)

I've discovered that I can get pretty far, until it comes to creating two columns of sidebars. I can move the divs with the IDs matching those I registered, but the div.sidebar-name doesn't come with it. Since their wrapper, div.widgets-holder-wrap, doesn't have an ID, I can't easily rearrange the screen while the two parts as a group.

TL;DR: If you could add IDs to the wrappers within div#widgets-right, it'd be possible for adventurous theme developers to rearrange the sidebars.

See attached patch, and sample functions.php and admin-widget-overrides.css.

Screenshot without the IDs
Screenshot with the IDs

Attachments (3)

widgetIDs.diff (598 bytes) - added by sillybean 3 years ago.
Tiny patch to add IDs to widget wrappers
admin-widget-overrides.css (964 bytes) - added by sillybean 3 years ago.
CSS file that overrides the layout of the widget admin screen
functions.php (2.9 KB) - added by sillybean 3 years ago.
Sample theme functions.php including widget definitions and stylesheets

Download all attachments as: .zip

Change History (13)

sillybean3 years ago

Tiny patch to add IDs to widget wrappers

comment:1 SergeyBiryukov3 years ago

  • Keywords has-patch added

sillybean3 years ago

CSS file that overrides the layout of the widget admin screen

sillybean3 years ago

Sample theme functions.php including widget definitions and stylesheets

comment:2 smub3 years ago

This looks really neat Stephanie.

comment:3 ramiy3 years ago

i agree with you, the old stacked-sidebar model should be upgraded.

i hope to see this in 3.3.

comment:4 mikeschinkel3 years ago

  • Cc mikeschinkel@… added

This is really nice Stephanie, props.

As an aside, I'd would love to see a progressive search feature for the Available Widgets list like how search works in CPanel or on the Mac.

comment:5 ashfame3 years ago

  • Cc ashishsainiashfame@… added

comment:6 naomicbush3 years ago

  • Cc naomicbush added

comment:7 ptahdunbar3 years ago

+1 on this and search for available/inactive widgets.

comment:8 follow-up: sillybean3 years ago

  • Keywords ui-feedback added

Might this be folded in to the work being done on #17979?

comment:9 SergeyBiryukov3 years ago

  • Milestone changed from Awaiting Review to 3.3

comment:10 in reply to: ↑ 8 azaozz3 years ago

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

Replying to sillybean:

Yes, seems this was handled in #17979.

Note: See TracTickets for help on using tickets.