WordPress.org

Make WordPress Core

Changeset 34818


Ignore:
Timestamp:
10/04/2015 07:05:38 PM (4 years ago)
Author:
DrewAPicture
Message:

Docs: Document the plugin data array returned by get_plugin_data() with a hash-notation.

See #32246.

File:
1 edited

Legend:

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

    r34778 r34818  
    88
    99/**
    10  * Parse the plugin contents to retrieve plugin's metadata.
     10 * Parses the plugin contents to retrieve plugin's metadata.
    1111 *
    1212 * The metadata of the plugin's data searches for the following in the plugin's
     
    3434 *      * / # Remove the space to close comment
    3535 *
    36  * Plugin data returned array contains the following:
    37  *
    38  * - 'Name' - Name of the plugin, must be unique.
    39  * - 'Title' - Title of the plugin and the link to the plugin's web site.
    40  * - 'Description' - Description of what the plugin does and/or notes
    41  * - from the author.
    42  * - 'Author' - The author's name
    43  * - 'AuthorURI' - The authors web site address.
    44  * - 'Version' - The plugin version number.
    45  * - 'PluginURI' - Plugin web site address.
    46  * - 'TextDomain' - Plugin's text domain for localization.
    47  * - 'DomainPath' - Plugin's relative directory path to .mo files.
    48  * - 'Network' - Boolean. Whether the plugin can only be activated network wide.
    49  *
    5036 * Some users have issues with opening large files and manipulating the contents
    5137 * for want is usually the first 1kiB or 2kiB. This function stops pulling in
     
    6046 * reading.
    6147 *
    62  * @link https://core.trac.wordpress.org/ticket/5651 Previous Optimizations.
    63  * @link https://core.trac.wordpress.org/ticket/7372 Further and better Optimizations.
    64  *
    6548 * @since 1.5.0
    6649 *
    6750 * @param string $plugin_file Path to the plugin file
    68  * @param bool $markup Optional. If the returned data should have HTML markup applied. Defaults to true.
    69  * @param bool $translate Optional. If the returned data should be translated. Defaults to true.
    70  * @return array See above for description.
     51 * @param bool   $markup      Optional. If the returned data should have HTML markup applied.
     52 *                            Default true.
     53 * @param bool   $translate   Optional. If the returned data should be translated. Default true.
     54 * @return array {
     55 *     Plugin data. Values will be empty if not supplied by the plugin.
     56 *
     57 *     @type string $Name        Name of the plugin. Should be unique.
     58 *     @type string $Title       Title of the plugin and link to the plugin's site (if set).
     59 *     @type string $Description Plugin description.
     60 *     @type string $Author      Author's name.
     61 *     @type string $AuthorURI   Author's website address (if set).
     62 *     @type string $Version     Plugin version.
     63 *     @type string $TextDomain  Plugin textdomain.
     64 *     @type string $DomainPath  Plugins relative directory path to .mo files.
     65 *     @type bool   $Network     Whether the plugin can only be activated network-wide.
     66 * }
    7167 */
    7268function get_plugin_data( $plugin_file, $markup = true, $translate = true ) {
Note: See TracChangeset for help on using the changeset viewer.