WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 2 years ago

#31643 new enhancement

Allow widget sidebars to be loaded open or closed via filtering

Reported by: silb3r Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.2
Component: Widgets Keywords: dev-feedback
Focuses: administration Cc:

Description

This could be useful to allow certain sidebars to always load open or closed.

Attachments (3)

registered_sidebar_wrap_class_filter.diff (478 bytes) - added by silb3r 3 years ago.
Add the "registered_sidebar_wrap_class" filter to enable filtering of sidebars' $wrap_class
31634.diff (933 bytes) - added by welcher 2 years ago.
31634.2.diff (1.3 KB) - added by iamfriendly 2 years ago.
Refreshed the patch and added docs

Download all attachments as: .zip

Change History (6)

@silb3r
3 years ago

Add the "registered_sidebar_wrap_class" filter to enable filtering of sidebars' $wrap_class

#1 @welcher
2 years ago

  • Focuses administration added
  • Keywords needs-docs added

You may want to consider putting the classes into an array then passing that array to the filter. This will allow for much easier manipulation in the filter. See new patch to see what I mean.

Also, the filter needs some inline docs - https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/php/#4-hooks-actions-and-filters

@welcher
2 years ago

#2 @welcher
2 years ago

  • Keywords dev-feedback added

@iamfriendly
2 years ago

Refreshed the patch and added docs

#3 @iamfriendly
2 years ago

  • Keywords needs-docs removed

Refreshed the patch and added docs for the new filter.

Note: See TracTickets for help on using tickets.