tags:

views:

75

answers:

3
<?php [[add_menu_page|add_menu_page]]( $page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $position ); ?> 

how does this [[add_menu_page|add_menu_page]] work? and what is the underlying logic?

ref. http://codex.wordpress.org/Adding_Administration_Menus

+2  A: 

It is a bug in the documentation.

If you wish to use the add_menu_page function then you just type add_menu_page().

Rupert
I think this is the case considering the correct usage shown on: http://codex.wordpress.org/Function_Reference/add_menu_page
Peter Ajtai
+2  A: 

Does the Wordpress documentation run on a wiki? Because on most wikis (at least, of the MediaWiki variety), the [[ | ]] syntax is used to describe a link to another wiki page. That is probably just a link to the page about add_menu_page(). You can just read it like this:

<?php add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $position ); ?> 

I checked the page and it isn't a link--so was probably copied incorrectly from a wiki at some point, because that definitely looks like a MediaWiki link.

hatkirby
A: 

Often in documentation [a|b] is a means of telling the reader that you can use either a or b.. in this case I'd say it is an error in the documentation.

John Hunt