public function tick( $input = null ) {

		global $wp_filter;

		/** @var string $filter_name */
		$filter_name     = current_filter();
		/**
		 * @var \WP_Hook|array $filter_instance
		 * @var array<string,\WP_hook|array> $wp_filter
		 */
		$filter_instance = $wp_filter[ $filter_name ];
		/** @var int $priority */
		$priority        = $filter_instance instanceof \WP_Hook ? $filter_instance->current_priority() : key( $filter_instance );

		// See https://core.trac.wordpress.org/ticket/41185 on broken priority, but more general sanity check.
		if ( empty( $this->events[ $filter_name ][ $priority ] ) ) {
			return $input;
		}

		$event = \wp_parse_args( $this->events[ $filter_name ][ $priority ], [
			'action'   => 'start',
			'category' => null,
		] );

		if ( 'start' === $event['action'] ) {
			$this->start( $event['event'], $event['category'] );
		} else {
			$this->stop( $event['event'] );
		}

		return $input;
	}
public function tick( $input = null ) {

		global $wp_filter;

		/** @var string $filter_name */
		$filter_name     = current_filter();
		/**
		 * @var \WP_Hook|array $filter_instance
		 * @var array<string,\WP_hook|array> $wp_filter
		 */
		$filter_instance = $wp_filter[ $filter_name ];
		/** @var int $priority */
		$priority        = $filter_instance instanceof \WP_Hook ? $filter_instance->current_priority() : key( $filter_instance );

		// See https://core.trac.wordpress.org/ticket/41185 on broken priority, but more general sanity check.
		if ( empty( $this->events[ $filter_name ][ $priority ] ) ) {
			return $input;
		}

		$event = \wp_parse_args( $this->events[ $filter_name ][ $priority ], [
			'action'   => 'start',
			'category' => null,
		] );

		if ( 'start' === $event['action'] ) {
			$this->start( $event['event'], $event['category'] );
		} else {
			$this->stop( $event['event'] );
		}

		return $input;
	}
public function tick ( $ input = null ) { global $ wp_filter ; /** @var string $filter_name */ $ filter_name = current_filter ( ) ; /**
		 * @var \WP_Hook|array $filter_instance
		 * @var array<string,\WP_hook|array> $wp_filter
		 */ $ filter_instance = $ wp_filter [ $ filter_name ] ; /** @var int $priority */ $ priority = $ filter_instance instanceof \ WP_Hook ? $ filter_instance -> current_priority ( ) : key ( $ filter_instance ) ; // See https://core.trac.wordpress.org/ticket/41185 on broken priority, but more general sanity check. if ( empty ( $ this -> events [ $ filter_name ] [ $ priority ] ) ) { return $ input ; } $ event = \ wp_parse_args ( $ this -> events [ $ filter_name ] [ $ priority ] , [ 'action' => 'start' , 'category' => null , ] ) ; if ( 'start' === $ event [ 'action' ] ) { $ this -> start ( $ event [ 'event' ] , $ event [ 'category' ] ) ; } else { $ this -> stop ( $ event [ 'event' ] ) ; } return $ input ; }
Mark action for the event on Stopwatch.

@deprecated 3.0:4.0 Deprecated in favor of the new format.
@codeCoverageIgnore

@param mixed $input Pass through if added to filter.

@return mixed
Mark action for the event on Stopwatch .