Make WordPress Core

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#12101 closed defect (bug) (fixed)

Improve documentation for add_*_page

Reported by: westi's profile westi Owned by: westi's profile westi
Milestone: 3.0 Priority: normal
Severity: normal Version: 3.0
Component: Menus Keywords:
Focuses: Cc:

Description

We need some php doc for the menu functions and some argument renaming so as to hilight best practise and how we recommend the functions are used.

We also need to hilight that functions should check the capability as well and we ask for it to enforce visibility.

Change History (8)

#1 @westi
15 years ago

(In [12914]) Add phpdoc to all the add_*_page functions.
Rename arguments to empasise that people should be using Capabilities not User Levels and named hooks not FILE.
See #12101.

#2 follow-up: @westi
15 years ago

That improves things quite a bit.

We still need to review the codex to ensure it recommends best practise too.

#3 in reply to: ↑ 2 @markmcwilliams
15 years ago

Replying to westi:

That improves things quite a bit.

We still need to review the codex to ensure it recommends best practise too.

Sure does, I just had a quick read through and got to say I understand those functions a lot more now, but I have never needed to think about thses functions, so I'm not sure if the codex is upto scratch or not? :)

#4 @westi
15 years ago

  • Keywords needs-docs added

#5 @westi
15 years ago

  • Keywords needs-codex added; needs-docs removed

#6 @nacin
15 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Resolving as fixed. This will stay in the new "Needs Codex Work" report even after closure. Once handled there, the keyword can be removed so it drops from the report.

#7 @michaelh
15 years ago

  • Keywords needs-codex removed

A little dicey knowing if the "function" parameter explanations, for both add_menu_page and add_submenu_page, are correct, but will remove the needs-codex tag for now.

http://codex.wordpress.org/Adding_Administration_Menus

#8 @westi
15 years ago

Looks good to me.

Thanks Michael!

Note: See TracTickets for help on using tickets.