WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 4 years ago

Last modified 3 years ago

#19464 closed enhancement (maybelater)

Auto add do_action for menu in admin

Reported by: ciantic Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Menus Keywords: close
Focuses: Cc:
PR Number:

Description

In menu's there is this feature: "Automatically add new top-level pages"

I'm in a process to implement "Automatically add categories" and "Automatically add new subpages of page:", but unfortunately there is no action which to hook so I could insert HTML right after or before the "auto-add-pages" in my plugin.

So I suggest to add a new action or filter like "menu_auto_add" so it would be simple to insert the HTML after the auto-add-pages.

Attachments (1)

19464.patch (655 bytes) - added by briandichiara 5 years ago.
added new hook after_menu_settings that passes the ID of the current selected menu to appear below auto-add-pages and menu-theme-locations

Download all attachments as: .zip

Change History (8)

#1 @scribu
8 years ago

  • Type changed from feature request to enhancement

#2 @toscho
6 years ago

  • Cc info@… added

@briandichiara
5 years ago

added new hook after_menu_settings that passes the ID of the current selected menu to appear below auto-add-pages and menu-theme-locations

This ticket was mentioned in Slack in #core by briandichiara. View the logs.


5 years ago

#4 @celloexpressions
5 years ago

  • Keywords close added

I'd suggest not doing this just yet, or like this, if we can help it. Based on the 3 years of inactivity, it doesn't seem pressing.

In the next couple releases (likely 4.3, maybe 4.2), we'll be merging the Menu Customizer into core, adding menu management to the Customizer. We'd like to deprecate the admin screen at the same time, making the Customizer the canonical place for managing menus. In the Customizer, this is as simple as leveraging the Customizer API to add new controls to the various menus sections.

#5 @briandichiara
5 years ago

I just want to add that ticket #29854 was also asking for the same thing, however was incorrectly tagged as duplicate of another ticket, when it should have been tagged as a duplicate of this one.

As for menu customizer, I'm not very familiar with the project, but do we already know that it will be going into core? I feel like this area would be a good place to have a hook for custom menu settings, and don't want to assume the project will go into core. And even if it did, wouldn't benefit from having a similar hook.

#6 @wonderboymusic
4 years ago

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

Menus in the Customizer are in core now - changes should occur there, if someone wants to reopen and run with it

#7 @slushman
3 years ago

I'm not seeing any hooks in Customizer for this concept either. Is there any way to do this? I need to add some menu options/settings to the area described in this ticket and in the matching areas the Customizer menu areas.

Note: See TracTickets for help on using tickets.