Make WordPress Core

Ticket #34360: 34360.2.diff

File 34360.2.diff, 2.8 KB (added by SergeyBiryukov, 8 years ago)
  • src/wp-admin/includes/plugin.php

     
    10031003//
    10041004
    10051005/**
    1006  * Add a top level menu page
     1006 * Add a top-level menu page.
    10071007 *
    10081008 * This function takes a capability which will be used to determine whether
    10091009 * or not a page is included in the menu.
     
    10161016 * @global array $_registered_pages
    10171017 * @global array $_parent_pages
    10181018 *
    1019  * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected
    1020  * @param string $menu_title The text to be used for the menu
    1021  * @param string $capability The capability required for this menu to be displayed to the user.
    1022  * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu)
    1023  * @param callable $function The function to be called to output the content for this page.
    1024  * @param string $icon_url The url to the icon to be used for this menu.
    1025  *     * Pass a base64-encoded SVG using a data URI, which will be colored to match the color scheme.
    1026  *       This should begin with 'data:image/svg+xml;base64,'.
    1027  *     * Pass the name of a Dashicons helper class to use a font icon, e.g. 'dashicons-chart-pie'.
    1028  *     * Pass 'none' to leave div.wp-menu-image empty so an icon can be added via CSS.
    1029  * @param int $position The position in the menu order this one should appear
    1030  *
    1031  * @return string The resulting page's hook_suffix
     1019 * @param string   $page_title The text to be displayed in the title tags of the page when the menu is selected.
     1020 * @param string   $menu_title The text to be used for the menu.
     1021 * @param string   $capability The capability required for this menu to be displayed to the user.
     1022 * @param string   $menu_slug  The slug name to refer to this menu by (should be unique for this menu).
     1023 * @param callable $function   The function to be called to output the content for this page.
     1024 * @param string   $icon_url   The URL to the icon to be used for this menu.
     1025 *                             * Pass a base64-encoded SVG using a data URI, which will be colored to match the color scheme.
     1026 *                               This should begin with 'data:image/svg+xml;base64,'.
     1027 *                             * Pass the name of a Dashicons helper class to use a font icon, e.g. 'dashicons-chart-pie'.
     1028 *                             * Pass 'none' to leave div.wp-menu-image empty so an icon can be added via CSS.
     1029 * @param int      $position   The position in the menu order this one should appear.
     1030 * @return string The resulting page's hook_suffix.
    10321031 */
    10331032function add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '', $position = null ) {
    10341033        global $menu, $admin_page_hooks, $_registered_pages, $_parent_pages;