private function wrap_current_filter_callbacks( $current_filter ) {

		$callbacks = self::get_filter_callbacks( $current_filter );
		if ( false === $callbacks ) {
			return;
		}
		$this->previous_filter           = $current_filter;
		$this->previous_filter_callbacks = $callbacks;

		foreach ( $callbacks as $priority => $priority_callbacks ) {
			foreach ( $priority_callbacks as $i => $the_ ) {
				$callbacks[ $priority ][ $i ] = array(
					'function'      => function() use ( $the_, $i ) {
						if ( ! isset( $this->loggers[ $i ] ) ) {
							$this->loggers[ $i ] = new Logger(
								array(
									'callback' => $the_['function'],
								)
							);
						}
						$this->loggers[ $i ]->start();
						$value = call_user_func_array( $the_['function'], func_get_args() );
						$this->loggers[ $i ]->stop();
						return $value;
					},
					'accepted_args' => $the_['accepted_args'],
				);
			}
		}
		self::set_filter_callbacks( $current_filter, $callbacks );
	}
private function wrap_current_filter_callbacks( $current_filter ) {

		$callbacks = self::get_filter_callbacks( $current_filter );
		if ( false === $callbacks ) {
			return;
		}
		$this->previous_filter           = $current_filter;
		$this->previous_filter_callbacks = $callbacks;

		foreach ( $callbacks as $priority => $priority_callbacks ) {
			foreach ( $priority_callbacks as $i => $the_ ) {
				$callbacks[ $priority ][ $i ] = array(
					'function'      => function() use ( $the_, $i ) {
						if ( ! isset( $this->loggers[ $i ] ) ) {
							$this->loggers[ $i ] = new Logger(
								array(
									'callback' => $the_['function'],
								)
							);
						}
						$this->loggers[ $i ]->start();
						$value = call_user_func_array( $the_['function'], func_get_args() );
						$this->loggers[ $i ]->stop();
						return $value;
					},
					'accepted_args' => $the_['accepted_args'],
				);
			}
		}
		self::set_filter_callbacks( $current_filter, $callbacks );
	}
private function wrap_current_filter_callbacks ( $ current_filter ) { $ callbacks = self :: get_filter_callbacks ( $ current_filter ) ; if ( false === $ callbacks ) { return ; } $ this -> previous_filter = $ current_filter ; $ this -> previous_filter_callbacks = $ callbacks ; foreach ( $ callbacks as $ priority => $ priority_callbacks ) { foreach ( $ priority_callbacks as $ i => $ the_ ) { $ callbacks [ $ priority ] [ $ i ] = array ( 'function' => function ( ) use ( $ the_ , $ i ) { if ( ! isset ( $ this -> loggers [ $ i ] ) ) { $ this -> loggers [ $ i ] = new Logger ( array ( 'callback' => $ the_ [ 'function' ] , ) ) ; } $ this -> loggers [ $ i ] -> start ( ) ; $ value = call_user_func_array ( $ the_ [ 'function' ] , func_get_args ( ) ) ; $ this -> loggers [ $ i ] -> stop ( ) ; return $ value ; } , 'accepted_args' => $ the_ [ 'accepted_args' ] , ) ; } } self :: set_filter_callbacks ( $ current_filter , $ callbacks ) ; }
Wrap current filter callbacks with a timer
Wrap current filter callbacks with a timer