WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 3 years ago

#33418 closed enhancement (duplicate)

The main WP Admin Menu generator needs to be overhauled

Reported by: wonderboymusic Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Administration Keywords: has-patch dev-feedback
Focuses: Cc:

Description

Problem: I want to build my own admin with JS or an actual templating engine, how do I get the default menu data?

wp-admin/menu.php is a maze of tuples, (ambiguous) globals,and uninitialized arrays. Not a lot is happening in this file, but you wouldn't know it because of how complicated it all looks. Also problematic: all of this code is top-level and inline, so it is not repeatable or portable.

There are other pieces to this, but to start, I have overhauled the code in wp-admin/menu.php by encapsulating it in a class, WP_Admin_Menu.

Attachments (1)

wp-admin-menu.diff (29.2 KB) - added by wonderboymusic 4 years ago.

Download all attachments as: .zip

Change History (10)

#1 @klihelp
4 years ago

Interesting idea to build own admin.

#2 @SergeyBiryukov
4 years ago

Related: #12718, #19206.

Last edited 4 years ago by SergeyBiryukov (previous) (diff)

#3 @wonderboymusic
4 years ago

menu-Related: #16865

#4 @wonderboymusic
4 years ago

  • Owner set to wonderboymusic
  • Status changed from new to assigned

#5 @helen
4 years ago

Related: #26960 (for the actual end output)

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


4 years ago

#7 @wonderboymusic
4 years ago

  • Milestone changed from 4.4 to Awaiting Review
  • Owner wonderboymusic deleted

I don't have the stomach for this right now. The impetus for doing it is to expose the data in a REST endpoint. 4.4 won't have endpoints. Even so, may not be super useful. We'll see later.

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


3 years ago

#9 @swissspidy
3 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from assigned to closed

Duplicate of #12718.

Note: See TracTickets for help on using tickets.