Opened 4 years ago
Closed 4 years ago
#10516 closed feature request (wontfix)
Force Another Widgets Page Sidebar To Be Open By Default.
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Widgets | Version: | 2.8.1 |
| Severity: | minor | Keywords: | has-patch |
| Cc: |
Description
Other versions of WordPress allowed links to the Appearance > Widgets Page to force any sidebar to be opened on page load by including something like: ?sidebar=sidebar-2, WordPress 2.8 and greater should include this same functionality. Some theme pages may want to link to the Widgets page, but also open up the correct sidebar for people.
Attachments (1)
Change History (13)
comment:1
follow-up:
↓ 5
Denis-de-Bernardy
— 4 years ago
- Milestone changed from 2.8.3 to 2.9
- Type changed from defect (bug) to feature request
comment:2
follow-up:
↓ 3
azaozz
— 4 years ago
- Resolution set to wontfix
- Status changed from new to closed
The sidebars on the widgets page are folded with css class. It's quite easy to open and close them with either js or css.
comment:3
in reply to:
↑ 2
dcole07
— 4 years ago
Replying to azaozz:
The sidebars on the widgets page are folded with css class. It's quite easy to open and close them with either js or css.
But you can't provide a link that will do that. I have a theme that provides an advanced layout page, where you can click a link to edit a particular sidebar, instead of hunting for it on the Widgets page. I'll be back to fight the decision not to patch this if I can't find a work-a-round... it's not like it causes problems or would add a ton of loading time.
comment:4
dcole07
— 4 years ago
- Keywords has-patch added; needs-patch removed
- Resolution wontfix deleted
- Status changed from closed to reopened
Patch 10516.diff allows the URL to pick which sidebar is open on the Widgets page. I think it's useful to allow the URL to pick which sidebar is open. You can't always do it with CSS or JavaScript, i.e when you provide someone with a link.
comment:5
in reply to:
↑ 1
dcole07
— 4 years ago
Replying to Denis-de-Bernardy:
As much as I agree, see #9769...
I have a case where I provide "edit sidebar" buttons on a custom theme page, which has the layout of the page. This way people don't need to now the names of the sidebars, then just click the link, then drop widgets into the open sidebar. This makes it easier for people, because their adding widgets by referring to locations, not names... i.e. if they want a widget in the left sidebar, they click the edit button in the left sidebar.
comment:6
Denis-de-Bernardy
— 4 years ago
sounds cool. it would be nice if your patch also used get_user_options() or whatever the function is, to default to the latest sidebar used instead.
comment:8
dcole07
— 4 years ago
I've tested patch 10515.diff under WordPress 2.9 revision 11779. The patch is only a couple lines of code and is very passive, i.e. isn't going to be effected by other patches. The sidebars continue to work as they did before under the normal mode and under the accessibility mode. Then links are clicked that contain something like ?sidebar=sidebar-2, that sidebar is opened on page load. Everything works properly and like expected.
comment:9
follow-up:
↓ 10
azaozz
— 4 years ago
Still think this can be done with js and is a plugin code. Also the Accessibility Mode uses $_GETsidebar? to pass the current sidebar to step two and this may interfere with it.
comment:10
in reply to:
↑ 9
dcole07
— 4 years ago
Replying to azaozz:
Also the Accessibility Mode uses $_GETsidebar? to pass the current sidebar to step two and this may interfere with it.
I did testing in WP 2.9 revision 11779 and now again in revision 11812. Even with the additional information, it doesn't effect the Accessibility Mode. I added, edited, and removed widgets while in the Accessibility Mode and nothing odd happened, even if there was sidebar=sidebar-1, but you change sidebar 2.
If I and other did create a JS work-a-around, then it wouldn't work for everyone, e.g. the people that use the Accessibility Mode because they have to. An alternative to this approach would be to use a filter, then developers could modify it how they like.
comment:11
ryan
— 4 years ago
- Milestone changed from 2.9 to Future Release
comment:12
Denis-de-Bernardy
— 4 years ago
- Keywords commit removed
- Milestone Future Release deleted
- Resolution set to wontfix
- Status changed from reopened to closed
being a bit pragmatic here and re-closing...
hook a js into admin_footer-widgets.php (or whatever that page-specific's hook is)
As much as I agree, see #9769...