Make WordPress Core


Ignore:
Timestamp:
08/01/2022 11:13:13 AM (3 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve description for doing_filter() and doing_action().

This corrects a note about did_action() return type, and brings more consistency between the two DocBlocks.

Follow-up to [27294], [53803].

See #55646.

File:
1 edited

Legend:

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

    r53803 r53809  
    371371 * Returns whether or not a filter hook is currently being processed.
    372372 *
    373  * The function current_filter() only returns the most recent filter or action
    374  * being executed. did_action() returns true once the action is initially
    375  * processed.
     373 * The function current_filter() only returns the most recent filter being executed.
     374 * did_filter() returns the number of times a filter has been applied during
     375 * the current request.
    376376 *
    377377 * This function allows detection for any filter currently being executed
     
    382382 *
    383383 * @see current_filter()
    384  * @see did_action()
     384 * @see did_filter()
    385385 * @global string[] $wp_current_filter Current filter.
    386386 *
     
    642642 * Returns whether or not an action hook is currently being processed.
    643643 *
     644 * The function current_action() only returns the most recent action being executed.
     645 * did_action() returns the number of times an action has been fired during
     646 * the current request.
     647 *
     648 * This function allows detection for any action currently being executed
     649 * (regardless of whether it's the most recent action to fire, in the case of
     650 * hooks called from hook callbacks) to be verified.
     651 *
    644652 * @since 3.9.0
     653 *
     654 * @see current_action()
     655 * @see did_action()
    645656 *
    646657 * @param string|null $hook_name Optional. Action hook to check. Defaults to null,
Note: See TracChangeset for help on using the changeset viewer.