WordPress.org

Make WordPress Core

Changeset 16831


Ignore:
Timestamp:
12/09/10 06:54:48 (5 years ago)
Author:
scribu
Message:

Add @return to add_*menu_page() docs. Fixes #15747

File:
1 edited

Legend:

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

    r16829 r16831  
    863863 * @param string $icon_url The url to the icon to be used for this menu 
    864864 * @param int $position The position in the menu order this one should appear 
     865 * 
     866 * @return string The resulting page's hook_suffix 
    865867 */ 
    866868function add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '', $position = NULL ) { 
     
    911913 * @param callback $function The function to be called to output the content for this page. 
    912914 * @param string $icon_url The url to the icon to be used for this menu 
     915 * 
     916 * @return string The resulting page's hook_suffix 
    913917 */ 
    914918function add_object_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '') { 
     
    935939 * @param callback $function The function to be called to output the content for this page. 
    936940 * @param string $icon_url The url to the icon to be used for this menu 
     941 * 
     942 * @return string The resulting page's hook_suffix 
    937943 */ 
    938944function add_utility_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '') { 
     
    959965 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu) 
    960966 * @param callback $function The function to be called to output the content for this page. 
     967 * 
     968 * @return string The resulting page's hook_suffix 
    961969 */ 
    962970function add_submenu_page( $parent_slug, $page_title, $menu_title, $capability, $menu_slug, $function = '' ) { 
     
    10211029 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu) 
    10221030 * @param callback $function The function to be called to output the content for this page. 
     1031 * 
     1032 * @return string The resulting page's hook_suffix 
    10231033 */ 
    10241034function add_management_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) { 
     
    10401050 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu) 
    10411051 * @param callback $function The function to be called to output the content for this page. 
     1052 * 
     1053 * @return string The resulting page's hook_suffix 
    10421054 */ 
    10431055function add_options_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) { 
     
    10591071 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu) 
    10601072 * @param callback $function The function to be called to output the content for this page. 
     1073 * 
     1074 * @return string The resulting page's hook_suffix 
    10611075 */ 
    10621076function add_theme_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) { 
     
    10781092 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu) 
    10791093 * @param callback $function The function to be called to output the content for this page. 
     1094 * 
     1095 * @return string The resulting page's hook_suffix 
    10801096 */ 
    10811097function add_plugins_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) { 
     
    10971113 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu) 
    10981114 * @param callback $function The function to be called to output the content for this page. 
     1115 * 
     1116 * @return string The resulting page's hook_suffix 
    10991117 */ 
    11001118function add_users_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) { 
     
    11191137 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu) 
    11201138 * @param callback $function The function to be called to output the content for this page. 
     1139 * 
     1140 * @return string The resulting page's hook_suffix 
    11211141 */ 
    11221142function add_dashboard_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) { 
     
    11381158 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu) 
    11391159 * @param callback $function The function to be called to output the content for this page. 
     1160 * 
     1161 * @return string The resulting page's hook_suffix 
    11401162 */ 
    11411163function add_posts_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) { 
     
    11571179 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu) 
    11581180 * @param callback $function The function to be called to output the content for this page. 
     1181 * 
     1182 * @return string The resulting page's hook_suffix 
    11591183 */ 
    11601184function add_media_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) { 
     
    11761200 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu) 
    11771201 * @param callback $function The function to be called to output the content for this page. 
     1202 * 
     1203 * @return string The resulting page's hook_suffix 
    11781204 */ 
    11791205function add_links_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) { 
     
    11951221 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu) 
    11961222 * @param callback $function The function to be called to output the content for this page. 
    1197  */ 
     1223 * 
     1224 * @return string The resulting page's hook_suffix 
     1225*/ 
    11981226function add_pages_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) { 
    11991227    return add_submenu_page( 'edit.php?post_type=page', $page_title, $menu_title, $capability, $menu_slug, $function ); 
     
    12141242 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu) 
    12151243 * @param callback $function The function to be called to output the content for this page. 
    1216  */ 
     1244 * 
     1245 * @return string The resulting page's hook_suffix 
     1246*/ 
    12171247function add_comments_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) { 
    12181248    return add_submenu_page( 'edit-comments.php', $page_title, $menu_title, $capability, $menu_slug, $function ); 
Note: See TracChangeset for help on using the changeset viewer.