Make WordPress Core


Ignore:
Timestamp:
11/24/2014 06:04:10 AM (11 years ago)
Author:
DrewAPicture
Message:

Ensure inline code is markdown-escaped as such, HTML tags are removed from summaries, and that code snippets in descriptions are properly indented.

Affects DocBlocks for the following core elements:

  • Markdown-indent a code snippet in the description for wp_salt()
  • Backtick-escape inline code in the return description for get_avatar()
  • Various markdown formatting in the description for add_filter()
  • Markdown-indent a code snippet in the description for apply_filters()
  • Backtick-escape inline code in the @see description for apply_filters_ref_array()
  • Backtick-escape inline code in the description for do_action()
  • Backtick-escape variables in the parameter and return descriptions for do_action_ref_array()
  • Various markdown formatting in the description for get_plugin_data()

Props rarst.
See #30473.

File:
1 edited

Legend:

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

    r30199 r30544  
    1515 * and the same goes for the plugin data. The below is formatted for printing.
    1616 *
    17  * <code>
    18  * /*
    19  * Plugin Name: Name of Plugin
    20  * Plugin URI: Link to plugin information
    21  * Description: Plugin Description
    22  * Author: Plugin author's name
    23  * Author URI: Link to the author's web site
    24  * Version: Must be set in the plugin for WordPress 2.3+
    25  * Text Domain: Optional. Unique identifier, should be same as the one used in
    26  *      plugin_text_domain()
    27  * Domain Path: Optional. Only useful if the translations are located in a
    28  *      folder above the plugin's base path. For example, if .mo files are
    29  *      located in the locale folder then Domain Path will be "/locale/" and
    30  *      must have the first slash. Defaults to the base folder the plugin is
    31  *      located in.
    32  * Network: Optional. Specify "Network: true" to require that a plugin is activated
    33  *      across all sites in an installation. This will prevent a plugin from being
    34  *      activated on a single site when Multisite is enabled.
    35  *  * / # Remove the space to close comment
    36  * </code>
     17 *     /*
     18 *     Plugin Name: Name of Plugin
     19 *     Plugin URI: Link to plugin information
     20 *     Description: Plugin Description
     21 *     Author: Plugin author's name
     22 *     Author URI: Link to the author's web site
     23 *     Version: Must be set in the plugin for WordPress 2.3+
     24 *     Text Domain: Optional. Unique identifier, should be same as the one used in
     25 *          plugin_text_domain()
     26 *     Domain Path: Optional. Only useful if the translations are located in a
     27 *          folder above the plugin's base path. For example, if .mo files are
     28 *          located in the locale folder then Domain Path will be "/locale/" and
     29 *          must have the first slash. Defaults to the base folder the plugin is
     30 *          located in.
     31 *     Network: Optional. Specify "Network: true" to require that a plugin is activated
     32 *          across all sites in an installation. This will prevent a plugin from being
     33 *          activated on a single site when Multisite is enabled.
     34 *      * / # Remove the space to close comment
    3735 *
    3836 * Plugin data returned array contains the following:
    39  *      'Name' - Name of the plugin, must be unique.
    40  *      'Title' - Title of the plugin and the link to the plugin's web site.
    41  *      'Description' - Description of what the plugin does and/or notes
    42  *      from the author.
    43  *      'Author' - The author's name
    44  *      'AuthorURI' - The authors web site address.
    45  *      'Version' - The plugin version number.
    46  *      'PluginURI' - Plugin web site address.
    47  *      'TextDomain' - Plugin's text domain for localization.
    48  *      'DomainPath' - Plugin's relative directory path to .mo files.
    49  *      'Network' - Boolean. Whether the plugin can only be activated network wide.
     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.
    5049 *
    5150 * Some users have issues with opening large files and manipulating the contents
     
    6362 * @link https://core.trac.wordpress.org/ticket/5651 Previous Optimizations.
    6463 * @link https://core.trac.wordpress.org/ticket/7372 Further and better Optimizations.
     64 *
    6565 * @since 1.5.0
    6666 *
Note: See TracChangeset for help on using the changeset viewer.