Docs: Further synchronize documentation for some Plugin API functions.

Follow-up to [50807].

See #50531.
Built from https://develop.svn.wordpress.org/trunk@50811


git-svn-id: http://core.svn.wordpress.org/trunk@50420 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2021-05-04 15:01:58 +00:00
parent 524030edfa
commit adae6bc86d
3 changed files with 10 additions and 8 deletions

View File

@ -50,7 +50,7 @@ final class WP_Hook implements Iterator, ArrayAccess {
private $nesting_level = 0;
/**
* Flag for if we're current doing an action, rather than a filter.
* Flag for if we're currently doing an action, rather than a filter.
*
* @since 4.7.0
* @var bool
@ -58,16 +58,16 @@ final class WP_Hook implements Iterator, ArrayAccess {
private $doing_action = false;
/**
* Adds a callback function to the specified filter hook.
* Adds a callback function to a filter hook.
*
* @since 4.7.0
*
* @param string $hook_name The name of the filter to add the callback to.
* @param callable $callback The callback to be run when the filter is applied.
* @param int $priority The order in which the functions associated with a particular action
* @param int $priority The order in which the functions associated with a particular filter
* 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.
* in which they were added to the filter.
* @param int $accepted_args The number of arguments the function accepts.
*/
public function add_filter( $hook_name, $callback, $priority, $accepted_args ) {
@ -164,7 +164,7 @@ final class WP_Hook implements Iterator, ArrayAccess {
}
/**
* Removes a callback function from the specified filter hook.
* Removes a callback function from a filter hook.
*
* @since 4.7.0
*

View File

@ -279,7 +279,8 @@ function has_filter( $hook_name, $callback = false ) {
*
* @param string $hook_name The filter hook to which the function to be removed is hooked.
* @param callable $callback 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 exact priority used when adding the original
* filter callback. Default 10.
* @return bool Whether the function existed before it was removed.
*/
function remove_filter( $hook_name, $callback, $priority = 10 ) {
@ -553,7 +554,8 @@ function has_action( $hook_name, $callback = false ) {
*
* @param string $hook_name The action hook to which the function to be removed is hooked.
* @param callable $callback 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 exact priority used when adding the original
* action callback. Default 10.
* @return bool Whether the function is removed.
*/
function remove_action( $hook_name, $callback, $priority = 10 ) {

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.8-alpha-50810';
$wp_version = '5.8-alpha-50811';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.