Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Admin Sidebar Sorting
#1
How are the sidebars in the admin panel sorted? For example, sidebar items (made by plugins) on the settings page..
Reply
#2
the main sidebar items are hardcoded

plugin items are added in the order they are registered.
which is alphabetically.

we had toyed with using a priority for plugins but we figured everyone would just prioritize their own plugins first...

mike
My Github Repos: Github
Website: DigiMute
Reply
#3
n00dles101 Wrote:the main sidebar items are hardcoded

plugin items are added in the order they are registered.
which is alphabetically.

we had toyed with using a priority for plugins but we figured everyone would just prioritize their own plugins first...

mike

Thanks for answering Smile
So the plugin filename controls the order (Alphabetically), or the plugin name?
Reply
#4
Just looking into this. The files in the plugin folder read in using the opendir function which on a Unix/Linux system will return the files according to the filestamp.

This causing a problem?

Priority system is easy to implement. It does make sense for some plugins to run after all other, caching etc...

M
My Github Repos: Github
Website: DigiMute
Reply
#5
n00dles101 Wrote:Just looking into this. The files in the plugin folder read in using the opendir function which on a Unix/Linux system will return the files according to the filestamp.

This causing a problem?

Priority system is easy to implement. It does make sense for some plugins to run after all other, caching etc...

M

Its not* (edit: Forgot the "not") so much of a problem as it is an annoyance, I have run into times where the interface would be easier to use if the sidebar was organized a certain way. screenshot explains Smile

[Image: Capture.JPG]

It would be great to be able to accomplish ordering like in the below snippet:
Code:
add_action('xxxxxx-sidebar','createSideMenu',array('your-plugin-filename','Menu Text',1));
Reply




Users browsing this thread: 1 Guest(s)