<?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?
<?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?
It is a bug in the documentation.
If you wish to use the add_menu_page function then you just type add_menu_page()
.
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.
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.