Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: pre_get_scheduled_event

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
506       * @since 5.1.0
507       *
508       * @param null|bool $pre       Value to return instead. Default null to continue retrieving the event.
509       * @param string    $hook      Action hook of the event.
510       * @param array     $args      Array containing each separate argument to pass to the hook's callback function.
511       *                             Although not passed to a callback, these arguments are used to uniquely identify the
512       *                             event.
513       * @param int|null  $timestamp Unix timestamp (UTC) of the event. Null to retrieve next scheduled event.
514       */
515      $pre = apply_filters( 'pre_get_scheduled_event', null, $hook, $args, $timestamp );
516      if ( null !== $pre ) {
517           return $pre;
518      }
519
520      if ( null !== $timestamp && ! is_numeric( $timestamp ) ) {
521           return false;
522      }
523
524      $crons = _get_cron_array();