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. Built from https://develop.svn.wordpress.org/trunk@30544 git-svn-id: http://core.svn.wordpress.org/trunk@30533 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9955384dbe
commit
188e47869f
|
@ -14,39 +14,38 @@
|
||||||
* must not have any newlines or only parts of the description will be displayed
|
* must not have any newlines or only parts of the description will be displayed
|
||||||
* and the same goes for the plugin data. The below is formatted for printing.
|
* and the same goes for the plugin data. The below is formatted for printing.
|
||||||
*
|
*
|
||||||
* <code>
|
* /*
|
||||||
* /*
|
* Plugin Name: Name of Plugin
|
||||||
* Plugin Name: Name of Plugin
|
* Plugin URI: Link to plugin information
|
||||||
* Plugin URI: Link to plugin information
|
* Description: Plugin Description
|
||||||
* Description: Plugin Description
|
* Author: Plugin author's name
|
||||||
* Author: Plugin author's name
|
* Author URI: Link to the author's web site
|
||||||
* Author URI: Link to the author's web site
|
* Version: Must be set in the plugin for WordPress 2.3+
|
||||||
* Version: Must be set in the plugin for WordPress 2.3+
|
* Text Domain: Optional. Unique identifier, should be same as the one used in
|
||||||
* Text Domain: Optional. Unique identifier, should be same as the one used in
|
* plugin_text_domain()
|
||||||
* plugin_text_domain()
|
* Domain Path: Optional. Only useful if the translations are located in a
|
||||||
* Domain Path: Optional. Only useful if the translations are located in a
|
* folder above the plugin's base path. For example, if .mo files are
|
||||||
* folder above the plugin's base path. For example, if .mo files are
|
* located in the locale folder then Domain Path will be "/locale/" and
|
||||||
* located in the locale folder then Domain Path will be "/locale/" and
|
* must have the first slash. Defaults to the base folder the plugin is
|
||||||
* must have the first slash. Defaults to the base folder the plugin is
|
* located in.
|
||||||
* located in.
|
* Network: Optional. Specify "Network: true" to require that a plugin is activated
|
||||||
* Network: Optional. Specify "Network: true" to require that a plugin is activated
|
* across all sites in an installation. This will prevent a plugin from being
|
||||||
* across all sites in an installation. This will prevent a plugin from being
|
* activated on a single site when Multisite is enabled.
|
||||||
* activated on a single site when Multisite is enabled.
|
* * / # Remove the space to close comment
|
||||||
* * / # Remove the space to close comment
|
|
||||||
* </code>
|
|
||||||
*
|
*
|
||||||
* Plugin data returned array contains the following:
|
* 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.
|
* - 'Name' - Name of the plugin, must be unique.
|
||||||
* 'Description' - Description of what the plugin does and/or notes
|
* - 'Title' - Title of the plugin and the link to the plugin's web site.
|
||||||
* from the author.
|
* - 'Description' - Description of what the plugin does and/or notes
|
||||||
* 'Author' - The author's name
|
* - from the author.
|
||||||
* 'AuthorURI' - The authors web site address.
|
* - 'Author' - The author's name
|
||||||
* 'Version' - The plugin version number.
|
* - 'AuthorURI' - The authors web site address.
|
||||||
* 'PluginURI' - Plugin web site address.
|
* - 'Version' - The plugin version number.
|
||||||
* 'TextDomain' - Plugin's text domain for localization.
|
* - 'PluginURI' - Plugin web site address.
|
||||||
* 'DomainPath' - Plugin's relative directory path to .mo files.
|
* - 'TextDomain' - Plugin's text domain for localization.
|
||||||
* 'Network' - Boolean. Whether the plugin can only be activated network wide.
|
* - '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
|
* 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
|
* for want is usually the first 1kiB or 2kiB. This function stops pulling in
|
||||||
|
@ -62,6 +61,7 @@
|
||||||
*
|
*
|
||||||
* @link https://core.trac.wordpress.org/ticket/5651 Previous Optimizations.
|
* @link https://core.trac.wordpress.org/ticket/5651 Previous Optimizations.
|
||||||
* @link https://core.trac.wordpress.org/ticket/7372 Further and better Optimizations.
|
* @link https://core.trac.wordpress.org/ticket/7372 Further and better Optimizations.
|
||||||
|
*
|
||||||
* @since 1.5.0
|
* @since 1.5.0
|
||||||
*
|
*
|
||||||
* @param string $plugin_file Path to the plugin file
|
* @param string $plugin_file Path to the plugin file
|
||||||
|
|
|
@ -1772,16 +1772,14 @@ if ( !function_exists('wp_salt') ) :
|
||||||
* {@link https://api.wordpress.org/secret-key/1.1/salt/ secret key created} just
|
* {@link https://api.wordpress.org/secret-key/1.1/salt/ secret key created} just
|
||||||
* for you.
|
* for you.
|
||||||
*
|
*
|
||||||
* <code>
|
* define('AUTH_KEY', ' Xakm<o xQy rw4EMsLKM-?!T+,PFF})H4lzcW57AF0U@N@< >M%G4Yt>f`z]MON');
|
||||||
* define('AUTH_KEY', ' Xakm<o xQy rw4EMsLKM-?!T+,PFF})H4lzcW57AF0U@N@< >M%G4Yt>f`z]MON');
|
* define('SECURE_AUTH_KEY', 'LzJ}op]mr|6+![P}Ak:uNdJCJZd>(Hx.-Mh#Tz)pCIU#uGEnfFz|f ;;eU%/U^O~');
|
||||||
* define('SECURE_AUTH_KEY', 'LzJ}op]mr|6+![P}Ak:uNdJCJZd>(Hx.-Mh#Tz)pCIU#uGEnfFz|f ;;eU%/U^O~');
|
* define('LOGGED_IN_KEY', '|i|Ux`9<p-h$aFf(qnT:sDO:D1P^wZ$$/Ra@miTJi9G;ddp_<q}6H1)o|a +&JCM');
|
||||||
* define('LOGGED_IN_KEY', '|i|Ux`9<p-h$aFf(qnT:sDO:D1P^wZ$$/Ra@miTJi9G;ddp_<q}6H1)o|a +&JCM');
|
* define('NONCE_KEY', '%:R{[P|,s.KuMltH5}cI;/k<Gx~j!f0I)m_sIyu+&NJZ)-iO>z7X>QYR0Z_XnZ@|');
|
||||||
* define('NONCE_KEY', '%:R{[P|,s.KuMltH5}cI;/k<Gx~j!f0I)m_sIyu+&NJZ)-iO>z7X>QYR0Z_XnZ@|');
|
* define('AUTH_SALT', 'eZyT)-Naw]F8CwA*VaW#q*|.)g@o}||wf~@C-YSt}(dh_r6EbI#A,y|nU2{B#JBW');
|
||||||
* define('AUTH_SALT', 'eZyT)-Naw]F8CwA*VaW#q*|.)g@o}||wf~@C-YSt}(dh_r6EbI#A,y|nU2{B#JBW');
|
* define('SECURE_AUTH_SALT', '!=oLUTXh,QW=H `}`L|9/^4-3 STz},T(w}W<I`.JjPi)<Bmf1v,HpGe}T1:Xt7n');
|
||||||
* define('SECURE_AUTH_SALT', '!=oLUTXh,QW=H `}`L|9/^4-3 STz},T(w}W<I`.JjPi)<Bmf1v,HpGe}T1:Xt7n');
|
* define('LOGGED_IN_SALT', '+XSqHc;@Q*K_b|Z?NC[3H!!EONbh.n<+=uKR:>*c(u`g~EJBf#8u#R{mUEZrozmm');
|
||||||
* define('LOGGED_IN_SALT', '+XSqHc;@Q*K_b|Z?NC[3H!!EONbh.n<+=uKR:>*c(u`g~EJBf#8u#R{mUEZrozmm');
|
* define('NONCE_SALT', 'h`GXHhD>SLWVfg1(1(N{;.V!MoE(SfbA_ksP@&`+AycHcAV$+?@3q+rxV{%^VyKT');
|
||||||
* define('NONCE_SALT', 'h`GXHhD>SLWVfg1(1(N{;.V!MoE(SfbA_ksP@&`+AycHcAV$+?@3q+rxV{%^VyKT');
|
|
||||||
* </code>
|
|
||||||
*
|
*
|
||||||
* Salting passwords helps against tools which has stored hashed values of
|
* Salting passwords helps against tools which has stored hashed values of
|
||||||
* common dictionary strings. The added values makes it harder to crack.
|
* common dictionary strings. The added values makes it harder to crack.
|
||||||
|
@ -2090,7 +2088,7 @@ if ( !function_exists( 'get_avatar' ) ) :
|
||||||
* @param int $size Size of the avatar image
|
* @param int $size Size of the avatar image
|
||||||
* @param string $default URL to a default image to use if no avatar is available
|
* @param string $default URL to a default image to use if no avatar is available
|
||||||
* @param string $alt Alternative text to use in image tag. Defaults to blank
|
* @param string $alt Alternative text to use in image tag. Defaults to blank
|
||||||
* @return string <img> tag for the user's avatar
|
* @return string `<img>` tag for the user's avatar.
|
||||||
*/
|
*/
|
||||||
function get_avatar( $id_or_email, $size = '96', $default = '', $alt = false ) {
|
function get_avatar( $id_or_email, $size = '96', $default = '', $alt = false ) {
|
||||||
if ( ! get_option('show_avatars') )
|
if ( ! get_option('show_avatars') )
|
||||||
|
|
|
@ -45,22 +45,21 @@ if ( ! isset( $wp_current_filter ) )
|
||||||
* the opportunity to modify a value by returning a new value.
|
* the opportunity to modify a value by returning a new value.
|
||||||
*
|
*
|
||||||
* The following example shows how a callback function is bound to a filter hook.
|
* The following example shows how a callback function is bound to a filter hook.
|
||||||
* Note that $example is passed to the callback, (maybe) modified, then returned:
|
|
||||||
*
|
*
|
||||||
* <code>
|
* Note that `$example` is passed to the callback, (maybe) modified, then returned:
|
||||||
* function example_callback( $example ) {
|
*
|
||||||
* // Maybe modify $example in some way
|
* function example_callback( $example ) {
|
||||||
* return $example;
|
* // Maybe modify $example in some way.
|
||||||
* }
|
* return $example;
|
||||||
* add_filter( 'example_filter', 'example_callback' );
|
* }
|
||||||
* </code>
|
* add_filter( 'example_filter', 'example_callback' );
|
||||||
*
|
*
|
||||||
* Since WordPress 1.5.1, bound callbacks can take as many arguments as are
|
* Since WordPress 1.5.1, bound callbacks can take as many arguments as are
|
||||||
* passed as parameters in the corresponding apply_filters() call. The $accepted_args
|
* passed as parameters in the corresponding apply_filters() call. The `$accepted_args`
|
||||||
* parameter allows for calling functions only when the number of args match.
|
* parameter allows for calling functions only when the number of args match.
|
||||||
*
|
*
|
||||||
* <strong>Note:</strong> the function will return true whether or not the callback
|
* *Note:* the function will return true whether or not the callback is valid.
|
||||||
* is valid. It is up to you to take care. This is done for optimization purposes,
|
* It is up to you to take care. This is done for optimization purposes,
|
||||||
* so everything is as quick as possible.
|
* so everything is as quick as possible.
|
||||||
*
|
*
|
||||||
* @since 0.71
|
* @since 0.71
|
||||||
|
@ -148,21 +147,21 @@ function has_filter($tag, $function_to_check = false) {
|
||||||
* the $tag parameter.
|
* the $tag parameter.
|
||||||
*
|
*
|
||||||
* The function allows for additional arguments to be added and passed to hooks.
|
* The function allows for additional arguments to be added and passed to hooks.
|
||||||
* <code>
|
|
||||||
* // Our filter callback function
|
|
||||||
* function example_callback( $string, $arg1, $arg2 ) {
|
|
||||||
* // (maybe) modify $string
|
|
||||||
* return $string;
|
|
||||||
* }
|
|
||||||
* add_filter( 'example_filter', 'example_callback', 10, 3 );
|
|
||||||
*
|
*
|
||||||
* // Apply the filters by calling the 'example_callback' function we
|
* // Our filter callback function
|
||||||
* // "hooked" to 'example_filter' using the add_filter() function above.
|
* function example_callback( $string, $arg1, $arg2 ) {
|
||||||
* // - 'example_filter' is the filter hook $tag
|
* // (maybe) modify $string
|
||||||
* // - 'filter me' is the value being filtered
|
* return $string;
|
||||||
* // - $arg1 and $arg2 are the additional arguments passed to the callback.
|
* }
|
||||||
* $value = apply_filters( 'example_filter', 'filter me', $arg1, $arg2 );
|
* add_filter( 'example_filter', 'example_callback', 10, 3 );
|
||||||
* </code>
|
*
|
||||||
|
* /*
|
||||||
|
* * Apply the filters by calling the 'example_callback' function we
|
||||||
|
* * "hooked" to 'example_filter' using the add_filter() function above.
|
||||||
|
* * - 'example_filter' is the filter hook $tag
|
||||||
|
* * - 'filter me' is the value being filtered
|
||||||
|
* * - $arg1 and $arg2 are the additional arguments passed to the callback.
|
||||||
|
* $value = apply_filters( 'example_filter', 'filter me', $arg1, $arg2 );
|
||||||
*
|
*
|
||||||
* @since 0.71
|
* @since 0.71
|
||||||
*
|
*
|
||||||
|
@ -171,8 +170,8 @@ function has_filter($tag, $function_to_check = false) {
|
||||||
* @global array $wp_current_filter Stores the list of current filters with the current one last.
|
* @global array $wp_current_filter Stores the list of current filters with the current one last.
|
||||||
*
|
*
|
||||||
* @param string $tag The name of the filter hook.
|
* @param string $tag The name of the filter hook.
|
||||||
* @param mixed $value The value on which the filters hooked to <tt>$tag</tt> are applied on.
|
* @param mixed $value The value on which the filters hooked to `$tag` are applied on.
|
||||||
* @param mixed $var Additional variables passed to the functions hooked to <tt>$tag</tt>.
|
* @param mixed $var Additional variables passed to the functions hooked to `$tag`.
|
||||||
* @return mixed The filtered value after all hooked functions are applied to it.
|
* @return mixed The filtered value after all hooked functions are applied to it.
|
||||||
*/
|
*/
|
||||||
function apply_filters( $tag, $value ) {
|
function apply_filters( $tag, $value ) {
|
||||||
|
@ -224,10 +223,10 @@ function apply_filters( $tag, $value ) {
|
||||||
/**
|
/**
|
||||||
* Execute functions hooked on a specific filter hook, specifying arguments in an array.
|
* Execute functions hooked on a specific filter hook, specifying arguments in an array.
|
||||||
*
|
*
|
||||||
* @see apply_filters() This function is identical, but the arguments passed to the
|
* @see 3.0.0
|
||||||
* functions hooked to <tt>$tag</tt> are supplied using an array.
|
|
||||||
*
|
*
|
||||||
* @since 3.0.0
|
* @see apply_filters() This function is identical, but the arguments passed to the
|
||||||
|
* functions hooked to `$tag` are supplied using an array.
|
||||||
*
|
*
|
||||||
* @global array $wp_filter Stores all of the filters
|
* @global array $wp_filter Stores all of the filters
|
||||||
* @global array $merged_filters Merges the filter hooks using this function.
|
* @global array $merged_filters Merges the filter hooks using this function.
|
||||||
|
@ -434,17 +433,15 @@ function add_action($tag, $function_to_add, $priority = 10, $accepted_args = 1)
|
||||||
/**
|
/**
|
||||||
* Execute functions hooked on a specific action hook.
|
* Execute functions hooked on a specific action hook.
|
||||||
*
|
*
|
||||||
* This function invokes all functions attached to action hook $tag. It is
|
* This function invokes all functions attached to action hook `$tag`. It is
|
||||||
* possible to create new action hooks by simply calling this function,
|
* possible to create new action hooks by simply calling this function,
|
||||||
* specifying the name of the new hook using the <tt>$tag</tt> parameter.
|
* specifying the name of the new hook using the `$tag` parameter.
|
||||||
*
|
*
|
||||||
* You can pass extra arguments to the hooks, much like you can with
|
* You can pass extra arguments to the hooks, much like you can with
|
||||||
* apply_filters().
|
* {@see apply_filters()}.
|
||||||
*
|
*
|
||||||
* @since 1.2.0
|
* @since 1.2.0
|
||||||
*
|
*
|
||||||
* @see apply_filters() This function works similar with the exception that nothing
|
|
||||||
* is returned and only the functions or methods are called.
|
|
||||||
* @global array $wp_filter Stores all of the filters
|
* @global array $wp_filter Stores all of the filters
|
||||||
* @global array $wp_actions Increments the amount of times action was triggered.
|
* @global array $wp_actions Increments the amount of times action was triggered.
|
||||||
*
|
*
|
||||||
|
@ -533,8 +530,8 @@ function did_action($tag) {
|
||||||
* @global array $wp_actions Increments the amount of times action was triggered.
|
* @global array $wp_actions Increments the amount of times action was triggered.
|
||||||
*
|
*
|
||||||
* @param string $tag The name of the action to be executed.
|
* @param string $tag The name of the action to be executed.
|
||||||
* @param array $args The arguments supplied to the functions hooked to <tt>$tag</tt>
|
* @param array $args The arguments supplied to the functions hooked to `$tag`.
|
||||||
* @return null Will return null if $tag does not exist in $wp_filter array
|
* @return null Will return null if `$tag` does not exist in `$wp_filter` array.
|
||||||
*/
|
*/
|
||||||
function do_action_ref_array($tag, $args) {
|
function do_action_ref_array($tag, $args) {
|
||||||
global $wp_filter, $wp_actions, $merged_filters, $wp_current_filter;
|
global $wp_filter, $wp_actions, $merged_filters, $wp_current_filter;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.1-beta2-30543';
|
$wp_version = '4.1-beta2-30544';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue