mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 17:48:01 +01:00
Docs: Document the plugin data array returned by get_plugin_data()
with a hash-notation.
See #32246. Built from https://develop.svn.wordpress.org/trunk@34818 git-svn-id: http://core.svn.wordpress.org/trunk@34783 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f6948c38fa
commit
6650dfea4f
@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Parse the plugin contents to retrieve plugin's metadata.
|
||||
* Parses the plugin contents to retrieve plugin's metadata.
|
||||
*
|
||||
* The metadata of the plugin's data searches for the following in the plugin's
|
||||
* header. All plugin data must be on its own line. For plugin description, it
|
||||
@ -33,20 +33,6 @@
|
||||
* activated on a single site when Multisite is enabled.
|
||||
* * / # Remove the space to close comment
|
||||
*
|
||||
* Plugin data returned array contains the following:
|
||||
*
|
||||
* - 'Name' - Name of the plugin, must be unique.
|
||||
* - 'Title' - Title of the plugin and the link to the plugin's web site.
|
||||
* - 'Description' - Description of what the plugin does and/or notes
|
||||
* - from the author.
|
||||
* - 'Author' - The author's name
|
||||
* - 'AuthorURI' - The authors web site address.
|
||||
* - 'Version' - The plugin version number.
|
||||
* - 'PluginURI' - Plugin web site address.
|
||||
* - 'TextDomain' - Plugin's text domain for localization.
|
||||
* - 'DomainPath' - Plugin's relative directory path to .mo files.
|
||||
* - 'Network' - Boolean. Whether the plugin can only be activated network wide.
|
||||
*
|
||||
* Some users have issues with opening large files and manipulating the contents
|
||||
* for want is usually the first 1kiB or 2kiB. This function stops pulling in
|
||||
* the plugin contents when it has all of the required plugin data.
|
||||
@ -59,15 +45,25 @@
|
||||
* the file. This is not checked however and the file is only opened for
|
||||
* reading.
|
||||
*
|
||||
* @link https://core.trac.wordpress.org/ticket/5651 Previous Optimizations.
|
||||
* @link https://core.trac.wordpress.org/ticket/7372 Further and better Optimizations.
|
||||
*
|
||||
* @since 1.5.0
|
||||
*
|
||||
* @param string $plugin_file Path to the plugin file
|
||||
* @param bool $markup Optional. If the returned data should have HTML markup applied. Defaults to true.
|
||||
* @param bool $translate Optional. If the returned data should be translated. Defaults to true.
|
||||
* @return array See above for description.
|
||||
* @param bool $markup Optional. If the returned data should have HTML markup applied.
|
||||
* Default true.
|
||||
* @param bool $translate Optional. If the returned data should be translated. Default true.
|
||||
* @return array {
|
||||
* Plugin data. Values will be empty if not supplied by the plugin.
|
||||
*
|
||||
* @type string $Name Name of the plugin. Should be unique.
|
||||
* @type string $Title Title of the plugin and link to the plugin's site (if set).
|
||||
* @type string $Description Plugin description.
|
||||
* @type string $Author Author's name.
|
||||
* @type string $AuthorURI Author's website address (if set).
|
||||
* @type string $Version Plugin version.
|
||||
* @type string $TextDomain Plugin textdomain.
|
||||
* @type string $DomainPath Plugins relative directory path to .mo files.
|
||||
* @type bool $Network Whether the plugin can only be activated network-wide.
|
||||
* }
|
||||
*/
|
||||
function get_plugin_data( $plugin_file, $markup = true, $translate = true ) {
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.4-alpha-34817';
|
||||
$wp_version = '4.4-alpha-34818';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user