WordPress.org

Make WordPress Core

Ticket #42228: 42228_updated.patch

File 42228_updated.patch, 2.1 KB (added by Jaydeep Rami, 4 years ago)

Add new patch with argument description.

  • src/wp-admin/includes/plugin.php

     
    113113/**
    114114 * Sanitizes plugin data, optionally adds markup, optionally translates.
    115115 *
    116  * @since 2.7.0
     116 * @since  2.7.0
    117117 * @access private
    118  * @see get_plugin_data()
     118 *
     119 * @param string $plugin_file Path to the main plugin file.
     120 * @param array  $plugin_data An array of plugin data. See `get_plugin_data()`.
     121 * @param bool   $markup      Optional. If the returned data should have HTML markup applied.
     122 *                            Default true.
     123 * @param bool   $translate   Optional. If the returned data should be translated. Default true.
     124 *
     125 * @see    get_plugin_data()
     126 *
     127 * @return array {
     128 *     Plugin data. Values will be empty if not supplied by the plugin.
     129 *
     130 *     @type string $Name        Name of the plugin. Should be unique.
     131 *     @type string $Title       Title of the plugin and link to the plugin's site (if set).
     132 *     @type string $Description Plugin description.
     133 *     @type string $Author      Author's name.
     134 *     @type string $AuthorURI   Author's website address (if set).
     135 *     @type string $Version     Plugin version.
     136 *     @type string $TextDomain  Plugin textdomain.
     137 *     @type string $DomainPath  Plugins relative directory path to .mo files.
     138 *     @type bool   $Network     Whether the plugin can only be activated network-wide.
     139 * }
    119140 */
    120141function _get_plugin_data_markup_translate( $plugin_file, $plugin_data, $markup = true, $translate = true ) {
    121142
     
    364385/**
    365386 * Callback to sort array by a 'Name' key.
    366387 *
    367  * @since 3.1.0
     388 * @since  3.1.0
    368389 * @access private
     390 *
     391 * @param array $a array with 'Name' key.
     392 * @param array $b array with 'Name' key.
     393 *
     394 * @return int Return 0 or 1 based on two string comparison.
    369395 */
    370396function _sort_uname_callback( $a, $b ) {
    371397        return strnatcasecmp( $a['Name'], $b['Name'] );
     
    14571483 *
    14581484 * @since 3.1.0
    14591485 *
     1486
    14601487 * @global array $submenu
    14611488 *
    14621489 * @param string $menu_slug    The slug for the parent menu.