WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 3 months ago

#19270 closed enhancement (invalid)

Current theme's "OPTIONS:" links should be filter-able

Reported by: jaredh123 Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.1
Component: Themes Keywords: has-patch
Focuses: Cc:

Description

On the "Manage Themes" tab of "themes.php", the links shown after the label "OPTIONS:" which link to widgets, menus, and optionally any sub-menu's registered by the theme should be filterable by themes.

See attached screenshot if you're unclear what I'm talking about.

Reasons why it should be filter-able:

  • themes that don't register any menus still contain links to menus screen
  • links to top-level menus with their own sub-menus registered by theme (not themes.php sub-menus) don't get shown here currently
  • this would be a perfect place for theme authors to add a link to a support page or forum

Attachments (3)

patch-19270.diff (423 bytes) - added by jaredh123 2 years ago.
patch
current_theme_options.png (87.9 KB) - added by jaredh123 2 years ago.
screenshot
19270.2.diff (3.2 KB) - added by martythornley 22 months ago.

Download all attachments as: .zip

Change History (15)

jaredh1232 years ago

patch

jaredh1232 years ago

screenshot

comment:1 in reply to: ↑ description nacin2 years ago

Replying to jaredh123:

  • themes that don't register any menus still contain links to menus screen

Yeah, because menus can still be used in a widget. As long as the theme supports widgets, it implicitly supports menus.

  • links to top-level menus with their own sub-menus registered by theme (not themes.php sub-menus) don't get shown here currently

Themes should probably be registering sub-menus then, under Appearance. There isn't much of a use case for a top-level menu here.

  • this would be a perfect place for theme authors to add a link to a support page or forum

Why? They're options, not links to external resources.

comment:2 jaredh1232 years ago

  • regarding menus: I understand that menus can be added via widgets, but by putting a link to the menus page right next to the current theme, it implies that this is a basic way you interact with and customize the theme, which is misleading when a theme only supports menus indirectly through widgets
  • regarding top-level menus: yes, usually appearance sub-menus are correct, but very powerful themes with multiple pages often move to a top level menu to avoid cluttering the appearance menu. Even many plugins do this -- if a theme author has determined this is the best route for a particular theme, why not allow them to also filter these links and add them to this area.
  • regarding support links: yeah, I suppose you're right, but it could give the user a really warm and fuzzy feeling if these links were really dialed in, so that they pointed to the correct options pages, and optionally something like a help forum.

I don't see any cost to not doing this -- the overhead of the single function call has to be negligible, right?

Last edited 2 years ago by jaredh123 (previous) (diff)

comment:3 martythornley22 months ago

  • Version changed from 3.3 to 3.4

Opened a similar ticket with more versatile patch here:
http://core.trac.wordpress.org/ticket/21030

comment:4 martythornley22 months ago

  • Cc marty@… added

martythornley22 months ago

comment:5 martythornley22 months ago

Patch added

comment:6 ocean9022 months ago

  • Version changed from 3.4 to 3.1

Introduced in 3.1, see #14936.

comment:7 follow-up: jaredh12322 months ago

Was it a mistake to say this was introduced in 3.1? I just rechecked the 3.4 code and there is no filter to modify the $options array set in lines 153-177 of wp-admin/themes.php

comment:8 in reply to: ↑ 7 SergeyBiryukov22 months ago

Replying to jaredh123:

Was it a mistake to say this was introduced in 3.1?

The options list for current theme was introduced in 3.1, not the filter.

comment:9 jaredh12322 months ago

Oh, my bad, thanks for clarifying.

comment:10 follow-up: martythornley22 months ago

My reasoning for calling it 3.4 is that the link I want to be able to filter is the new "Customize" link. That was added in 3.4 as part of the new customizer. Links to the customizer will cause confusion for theme developers that don't want to use it.

Regardless of the version, what are the thoughts on getting this in? Seems like a pretty simple addition that gives themes a little more flexibility.

comment:11 in reply to: ↑ 10 nacin22 months ago

Replying to martythornley:

Links to the customizer will cause confusion for theme developers that don't want to use it.

We've already gone over this in #20858. That's not going to be an option even with a filter.

comment:12 ocean903 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

Section doesn't exists anymore.

Note: See TracTickets for help on using tickets.