More tweaks to @param docs in wp-includes/plugin.php.

see #28516.
Built from https://develop.svn.wordpress.org/trunk@28888


git-svn-id: http://core.svn.wordpress.org/trunk@28687 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2014-06-29 08:42:16 +00:00
parent ff109ddc5a
commit 7bb7693dd1
2 changed files with 37 additions and 31 deletions

View File

@ -70,10 +70,12 @@ if ( ! isset( $wp_current_filter ) )
* *
* @param string $tag The name of the filter to hook the $function_to_add callback to. * @param string $tag The name of the filter to hook the $function_to_add callback to.
* @param callback $function_to_add The callback to be run when the filter is applied. * @param callback $function_to_add The callback to be run when the filter is applied.
* @param int $priority (optional) The order in which the functions associated with a particular action are executed. Lower numbers correspond with earlier execution, and functions with the same priority are executed in the order in which they were added to the action. * @param int $priority Optional. Used to specify the order in which the functions
* Default 10. * associated with a particular action are executed. Default 10.
* @param int $accepted_args (optional) The number of arguments the function accepts. * Lower numbers correspond with earlier execution,
* Default 1. * and functions with the same priority are executed
* in the order in which they were added to the action.
* @param int $accepted_args Optional. The number of arguments the function accepts. Default 1.
* @return boolean true * @return boolean true
*/ */
function add_filter( $tag, $function_to_add, $priority = 10, $accepted_args = 1 ) { function add_filter( $tag, $function_to_add, $priority = 10, $accepted_args = 1 ) {
@ -93,7 +95,7 @@ function add_filter( $tag, $function_to_add, $priority = 10, $accepted_args = 1
* @global array $wp_filter Stores all of the filters * @global array $wp_filter Stores all of the filters
* *
* @param string $tag The name of the filter hook. * @param string $tag The name of the filter hook.
* @param bool|callback $function_to_check optional. * @param bool|callback $function_to_check Optional. The callback to check for. Default false.
* @return mixed If $function_to_check is omitted, returns boolean for whether the hook has anything registered. * @return mixed If $function_to_check is omitted, returns boolean for whether the hook has anything registered.
* When checking a specific function, the priority of that hook is returned, or false if the function is not attached. * When checking a specific function, the priority of that hook is returned, or false if the function is not attached.
* When using the $function_to_check argument, this function may return a non-boolean value that evaluates to false * When using the $function_to_check argument, this function may return a non-boolean value that evaluates to false
@ -142,9 +144,9 @@ function has_filter($tag, $function_to_check = false) {
* $value = apply_filters( 'example_filter', 'filter me', $arg1, $arg2 ); * $value = apply_filters( 'example_filter', 'filter me', $arg1, $arg2 );
* </code> * </code>
* *
* @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.
* @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.
* *
* @since 0.71 * @since 0.71
* *
@ -211,7 +213,7 @@ function apply_filters( $tag, $value ) {
* @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 array $args The arguments supplied to the functions hooked to <tt>$tag</tt> * @param array $args The arguments supplied to the functions hooked to <tt>$tag</tt>.
* @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_ref_array($tag, $args) { function apply_filters_ref_array($tag, $args) {
@ -268,7 +270,7 @@ function apply_filters_ref_array($tag, $args) {
* *
* @param string $tag The filter hook to which the function to be removed is hooked. * @param string $tag The filter hook to which the function to be removed is hooked.
* @param callback $function_to_remove The name of the function which should be removed. * @param callback $function_to_remove The name of the function which should be removed.
* @param int $priority optional. The priority of the function (default: 10). * @param int $priority Optional. The priority of the function. Default 10.
* @return boolean Whether the function existed before it was removed. * @return boolean Whether the function existed before it was removed.
*/ */
function remove_filter( $tag, $function_to_remove, $priority = 10 ) { function remove_filter( $tag, $function_to_remove, $priority = 10 ) {
@ -296,7 +298,7 @@ function remove_filter( $tag, $function_to_remove, $priority = 10 ) {
* @since 2.7.0 * @since 2.7.0
* *
* @param string $tag The filter to remove hooks from. * @param string $tag The filter to remove hooks from.
* @param bool|int $priority The priority number to remove. * @param bool|int $priority Optional. The priority number to remove. Default false.
* @return bool True when finished. * @return bool True when finished.
*/ */
function remove_all_filters( $tag, $priority = false ) { function remove_all_filters( $tag, $priority = false ) {
@ -400,8 +402,12 @@ function doing_action( $action = null ) {
* *
* @param string $tag The name of the action to which the $function_to_add is hooked. * @param string $tag The name of the action to which the $function_to_add is hooked.
* @param callback $function_to_add The name of the function you wish to be called. * @param callback $function_to_add The name of the function you wish to be called.
* @param int $priority optional. Used to specify the order in which the functions associated with a particular action are executed (default: 10). Lower numbers correspond with earlier execution, and functions with the same priority are executed in the order in which they were added to the action. * @param int $priority Optional. Used to specify the order in which the functions
* @param int $accepted_args optional. The number of arguments the function accept (default 1). * associated with a particular action are executed. Default 10.
* Lower numbers correspond with earlier execution,
* and functions with the same priority are executed
* in the order in which they were added to the action.
* @param int $accepted_args Optional. The number of arguments the function accept. Default 1.
* @return bool Will always return true. * @return bool Will always return true.
*/ */
function add_action($tag, $function_to_add, $priority = 10, $accepted_args = 1) { function add_action($tag, $function_to_add, $priority = 10, $accepted_args = 1) {
@ -427,7 +433,7 @@ function add_action($tag, $function_to_add, $priority = 10, $accepted_args = 1)
* @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 mixed $arg,... Optional additional arguments which are passed on to the functions hooked to the action. * @param mixed $arg, ... Optional. Additional arguments which are passed on to the functions hooked to the action.
* @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($tag, $arg = '') { function do_action($tag, $arg = '') {
@ -564,7 +570,7 @@ function do_action_ref_array($tag, $args) {
* @see has_filter() has_action() is an alias of has_filter(). * @see has_filter() has_action() is an alias of has_filter().
* *
* @param string $tag The name of the action hook. * @param string $tag The name of the action hook.
* @param bool|callback $function_to_check optional. * @param bool|callback $function_to_check Optional. The callback to check for. Default false.
* @return mixed If $function_to_check is omitted, returns boolean for whether the hook has anything registered. * @return mixed If $function_to_check is omitted, returns boolean for whether the hook has anything registered.
* When checking a specific function, the priority of that hook is returned, or false if the function is not attached. * When checking a specific function, the priority of that hook is returned, or false if the function is not attached.
* When using the $function_to_check argument, this function may return a non-boolean value that evaluates to false * When using the $function_to_check argument, this function may return a non-boolean value that evaluates to false
@ -585,7 +591,7 @@ function has_action($tag, $function_to_check = false) {
* *
* @param string $tag The action hook to which the function to be removed is hooked. * @param string $tag The action hook to which the function to be removed is hooked.
* @param callback $function_to_remove The name of the function which should be removed. * @param callback $function_to_remove The name of the function which should be removed.
* @param int $priority optional The priority of the function (default: 10). * @param int $priority Optional. The priority of the function. Default 10.
* @return boolean Whether the function is removed. * @return boolean Whether the function is removed.
*/ */
function remove_action( $tag, $function_to_remove, $priority = 10 ) { function remove_action( $tag, $function_to_remove, $priority = 10 ) {
@ -598,7 +604,7 @@ function remove_action( $tag, $function_to_remove, $priority = 10 ) {
* @since 2.7.0 * @since 2.7.0
* *
* @param string $tag The action to remove hooks from. * @param string $tag The action to remove hooks from.
* @param bool|int $priority The priority number to remove them from. * @param bool|int $priority The priority number to remove them from. Default false.
* @return bool True when finished. * @return bool True when finished.
*/ */
function remove_all_actions($tag, $priority = false) { function remove_all_actions($tag, $priority = false) {

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.0-alpha-20140628'; $wp_version = '4.0-alpha-20140629';
/** /**
* 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.