Docs: Improve docblocks for `_get_plugin_data_markup_translate()` and `_sort_uname_callback()`.

Props Jaydeep Rami.
Fixes #42228.



git-svn-id: https://develop.svn.wordpress.org/trunk@44581 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Gary Pendergast 2019-01-14 06:53:44 +00:00
parent f5f5da1fff
commit 7de213856b
1 changed files with 27 additions and 1 deletions

View File

@ -114,8 +114,29 @@ function get_plugin_data( $plugin_file, $markup = true, $translate = true ) {
* Sanitizes plugin data, optionally adds markup, optionally translates.
*
* @since 2.7.0
* @access private
*
* @see get_plugin_data()
*
* @access private
*
* @param string $plugin_file Path to the main plugin file.
* @param array $plugin_data An array of plugin data. See `get_plugin_data()`.
* @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_markup_translate( $plugin_file, $plugin_data, $markup = true, $translate = true ) {
@ -376,7 +397,12 @@ function get_mu_plugins() {
* Callback to sort array by a 'Name' key.
*
* @since 3.1.0
*
* @access private
*
* @param array $a array with 'Name' key.
* @param array $b array with 'Name' key.
* @return int Return 0 or 1 based on two string comparison.
*/
function _sort_uname_callback( $a, $b ) {
return strnatcasecmp( $a['Name'], $b['Name'] );