Docs: Docblock corrections and improvements, mostly related to various pre_* filters.
See #47110 Built from https://develop.svn.wordpress.org/trunk@46232 git-svn-id: http://core.svn.wordpress.org/trunk@46044 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -392,10 +392,10 @@ function wp_unschedule_event( $timestamp, $hook, $args = array() ) {
|
||||
* {@see 'pre_clear_scheduled_hook'} filter added to short-circuit the function.
|
||||
*
|
||||
* @param string $hook Action hook, the execution of which will be unscheduled.
|
||||
* @param array $args Optional. Arguments that were to be passed to the hook's callback function.
|
||||
* @return bool|int On success an integer indicating number of events unscheduled (0 indicates no
|
||||
* events were registered with the hook and arguments combination), false if
|
||||
* unscheduling one or more events fail.
|
||||
* @param array $args Optional. Arguments that were to be passed to the hook's callback function.
|
||||
* @return false|int On success an integer indicating number of events unscheduled (0 indicates no
|
||||
* events were registered with the hook and arguments combination), false if
|
||||
* unscheduling one or more events fail.
|
||||
*/
|
||||
function wp_clear_scheduled_hook( $hook, $args = array() ) {
|
||||
// Backward compatibility
|
||||
@@ -417,9 +417,9 @@ function wp_clear_scheduled_hook( $hook, $args = array() ) {
|
||||
*
|
||||
* @since 5.1.0
|
||||
*
|
||||
* @param null|array $pre Value to return instead. Default null to continue unscheduling the event.
|
||||
* @param string $hook Action hook, the execution of which will be unscheduled.
|
||||
* @param array $args Arguments to pass to the hook's callback function.
|
||||
* @param null|int|false $pre Value to return instead. Default null to continue unscheduling the event.
|
||||
* @param string $hook Action hook, the execution of which will be unscheduled.
|
||||
* @param array $args Arguments to pass to the hook's callback function.
|
||||
*/
|
||||
$pre = apply_filters( 'pre_clear_scheduled_hook', null, $hook, $args );
|
||||
if ( null !== $pre ) {
|
||||
@@ -461,8 +461,8 @@ function wp_clear_scheduled_hook( $hook, $args = array() ) {
|
||||
* @since 5.1.0 Return value added to indicate success or failure.
|
||||
*
|
||||
* @param string $hook Action hook, the execution of which will be unscheduled.
|
||||
* @return bool|int On success an integer indicating number of events unscheduled (0 indicates no
|
||||
* events were registered on the hook), false if unscheduling fails.
|
||||
* @return false|int On success an integer indicating number of events unscheduled (0 indicates no
|
||||
* events were registered on the hook), false if unscheduling fails.
|
||||
*/
|
||||
function wp_unschedule_hook( $hook ) {
|
||||
/**
|
||||
@@ -477,8 +477,8 @@ function wp_unschedule_hook( $hook ) {
|
||||
*
|
||||
* @since 5.1.0
|
||||
*
|
||||
* @param null|array $pre Value to return instead. Default null to continue unscheduling the hook.
|
||||
* @param string $hook Action hook, the execution of which will be unscheduled.
|
||||
* @param null|int|false $pre Value to return instead. Default null to continue unscheduling the hook.
|
||||
* @param string $hook Action hook, the execution of which will be unscheduled.
|
||||
*/
|
||||
$pre = apply_filters( 'pre_unschedule_hook', null, $hook );
|
||||
if ( null !== $pre ) {
|
||||
@@ -528,7 +528,7 @@ function wp_unschedule_hook( $hook ) {
|
||||
* Although not passed to a callback, these arguments are used to uniquely identify the
|
||||
* event, so they should be the same as those used when originally scheduling the event.
|
||||
* @param int|null $timestamp Optional. Unix timestamp (UTC) of the event. If not specified, the next scheduled event is returned.
|
||||
* @return bool|object The event object. False if the event does not exist.
|
||||
* @return false|object The event object. False if the event does not exist.
|
||||
*/
|
||||
function wp_get_scheduled_event( $hook, $args = array(), $timestamp = null ) {
|
||||
/**
|
||||
@@ -542,11 +542,11 @@ function wp_get_scheduled_event( $hook, $args = array(), $timestamp = null ) {
|
||||
*
|
||||
* @since 5.1.0
|
||||
*
|
||||
* @param null|bool $pre Value to return instead. Default null to continue retrieving the event.
|
||||
* @param string $hook Action hook of the event.
|
||||
* @param array $args Array containing each separate argument to pass to the hook's callback function.
|
||||
* Although not passed to a callback, these arguments are used to uniquely identify the
|
||||
* event.
|
||||
* @param null|false|object $pre Value to return instead. Default null to continue retrieving the event.
|
||||
* @param string $hook Action hook of the event.
|
||||
* @param array $args Array containing each separate argument to pass to the hook's callback function.
|
||||
* Although not passed to a callback, these arguments are used to uniquely identify
|
||||
* the event.
|
||||
* @param int|null $timestamp Unix timestamp (UTC) of the event. Null to retrieve next scheduled event.
|
||||
*/
|
||||
$pre = apply_filters( 'pre_get_scheduled_event', null, $hook, $args, $timestamp );
|
||||
|
||||
Reference in New Issue
Block a user