WordPress.org

Make WordPress Core

Changeset 18136


Ignore:
Timestamp:
06/03/11 23:30:46 (3 years ago)
Author:
nacin
Message:

Document that add_submenu_page() might return false if ! current_user_can(). see #17677.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/plugin.php

    r18084 r18136  
    964964 * @param callback $function The function to be called to output the content for this page. 
    965965 * 
    966  * @return string The resulting page's hook_suffix 
     966 * @return string|bool The resulting page's hook_suffix, or false if the user does not have the capability required. 
    967967 */ 
    968968function add_submenu_page( $parent_slug, $page_title, $menu_title, $capability, $menu_slug, $function = '' ) { 
     
    10281028 * @param callback $function The function to be called to output the content for this page. 
    10291029 * 
    1030  * @return string The resulting page's hook_suffix 
     1030 * @return string|bool The resulting page's hook_suffix, or false if the user does not have the capability required. 
    10311031 */ 
    10321032function add_management_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) { 
     
    10491049 * @param callback $function The function to be called to output the content for this page. 
    10501050 * 
    1051  * @return string The resulting page's hook_suffix 
     1051 * @return string|bool The resulting page's hook_suffix, or false if the user does not have the capability required. 
    10521052 */ 
    10531053function add_options_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) { 
     
    10701070 * @param callback $function The function to be called to output the content for this page. 
    10711071 * 
    1072  * @return string The resulting page's hook_suffix 
     1072 * @return string|bool The resulting page's hook_suffix, or false if the user does not have the capability required. 
    10731073 */ 
    10741074function add_theme_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) { 
     
    10911091 * @param callback $function The function to be called to output the content for this page. 
    10921092 * 
    1093  * @return string The resulting page's hook_suffix 
     1093 * @return string|bool The resulting page's hook_suffix, or false if the user does not have the capability required. 
    10941094 */ 
    10951095function add_plugins_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) { 
     
    11121112 * @param callback $function The function to be called to output the content for this page. 
    11131113 * 
    1114  * @return string The resulting page's hook_suffix 
     1114 * @return string|bool The resulting page's hook_suffix, or false if the user does not have the capability required. 
    11151115 */ 
    11161116function add_users_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) { 
     
    11361136 * @param callback $function The function to be called to output the content for this page. 
    11371137 * 
    1138  * @return string The resulting page's hook_suffix 
     1138 * @return string|bool The resulting page's hook_suffix, or false if the user does not have the capability required. 
    11391139 */ 
    11401140function add_dashboard_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) { 
     
    11571157 * @param callback $function The function to be called to output the content for this page. 
    11581158 * 
    1159  * @return string The resulting page's hook_suffix 
     1159 * @return string|bool The resulting page's hook_suffix, or false if the user does not have the capability required. 
    11601160 */ 
    11611161function add_posts_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) { 
     
    11781178 * @param callback $function The function to be called to output the content for this page. 
    11791179 * 
    1180  * @return string The resulting page's hook_suffix 
     1180 * @return string|bool The resulting page's hook_suffix, or false if the user does not have the capability required. 
    11811181 */ 
    11821182function add_media_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) { 
     
    11991199 * @param callback $function The function to be called to output the content for this page. 
    12001200 * 
    1201  * @return string The resulting page's hook_suffix 
     1201 * @return string|bool The resulting page's hook_suffix, or false if the user does not have the capability required. 
    12021202 */ 
    12031203function add_links_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) { 
     
    12201220 * @param callback $function The function to be called to output the content for this page. 
    12211221 * 
    1222  * @return string The resulting page's hook_suffix 
     1222 * @return string|bool The resulting page's hook_suffix, or false if the user does not have the capability required. 
    12231223*/ 
    12241224function add_pages_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) { 
     
    12411241 * @param callback $function The function to be called to output the content for this page. 
    12421242 * 
    1243  * @return string The resulting page's hook_suffix 
     1243 * @return string|bool The resulting page's hook_suffix, or false if the user does not have the capability required. 
    12441244*/ 
    12451245function add_comments_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) { 
Note: See TracChangeset for help on using the changeset viewer.