Для хука after_setup_theme

@param callable $callback      Функция срабатывающая в момент события
@param int      $priority      Приоритет выполнения функции
@param int      $accepted_args Число аргументов которые принимает функция
336368
public static function afterSetupTheme( $callback, $priority = null, $accepted_args = null ) {
		self::action( 'after_setup_theme', $callback, $priority, $accepted_args );
	}
47576
public static function callArgs($callback, array $args = [])
    {
        try {
            $callback = static::evaluateCallback($callback);

            return \call_user_func_array($callback, $args);
        } catch (\Exception $e) {
            $message = $e->getMessage();
        }

        if (\is_array($callback) && \is_object($callback[0])) {
            $callback[0] = \get_class($callback[0]);
        }

        throw new DcGeneralRuntimeException(
            \sprintf(
                'Execute callback %s failed - Exception message: %s',
                (\is_array($callback)
                    ? \implode('::', $callback)
                    : (\is_string($callback)
                        ? $callback
                        : \get_class(
                            $callback
                        ))),
                $message
            ),
            0,
            $e
        );
    }
699113
public function on($event, callable $callback, int $priority = 0): EventInterface
    {
        //deal with multiple events
        if (is_array($event)) {
            foreach ($event as $item) {
                $this->on($item, $callback, $priority);
            }

            return $this;
        }

        //set up the observer
        $observer = $this->resolve(EventObserver::class, $callback);

        //is there a regexp ?
        if (strpos($event, '#') === 0 && strrpos($event, '#') !== 0) {
            $this->regex[] = $event;
        //is there a sprintf ?
        //because sscanf will match Render Home Page
        //and Render Home Body with Render %s Page
        //so this needs to be pseudo
        } else if (preg_match('#%[sducoxXbgGeEfF]#s', $event)) {
            //transform that into a regex
            $event = preg_quote($event, '#');
            $event = preg_replace('#%[sducoxXbgGeEfF]#s', '(.+)', $event);
            $event = '#' . $event . '#s';

            $this->regex[] = $event;
        }

        $this->observers[$event][] = [
            'priority' => $priority,
            'observer' => $observer
        ];

        return $this;
    }
1270799
public function onReservationKeyReady(callable $callback = null)
    {
        if ($callback === null || is_callable($callback)) {
            $this->on_reservation_key_ready = $callback;
        } else {
            throw new InvalidArgumentException('Callable or NULL expected');
        }
    }
283629
private function _addCallback($cls, $callback, $func) 
    {
        self::_initiateCallbacks($cls);
        array_push(self::$_callbacks[$cls][$callback], $func);
    }
553262
public function attach(string $event, callable $callback, int $priority = 0){
        if(!isset($this->listeners[$event])){
            $this->listeners[$event] = new Performer();
        }
        $this->listeners[$event]->add($callback, $priority);
    }
849223
public function addFilter( $filter, $callback, $priority = 10 )
    {
        if ( !isset( $this->filters[ $filter ] ) )
        {
            $this->filters[ $filter ] = array();
        }

        $this->filters[ $filter ][] = array(
            'priority' => $priority,
            'callback' => $callback,
        );

        if ( 1 < count( $this->filters[ $filter ] ) )
        {
            usort( $this->filters[ $filter ], array( $this, '_sortByPriority' ) );
        }

        if ( $this->debug )
        {
            echo PHP_EOL . '+FILTER: ' . $filter . ' -> '
                    . $this->_serializeCallback( $callback )
                    . ' + Priority: ' . $priority . PHP_EOL;
        }
    }
818438
public static function uploadMines( $callback, $priority = null, $accepted_args = null ) {
		self::action( 'upload_mines', $callback, $priority, $accepted_args );
	}
1146579
public function call($callback, $arguments = [])
    {
        $dependencies = $this->getMethodDependencies($callback, $arguments);

        return call_user_func_array($callback, $dependencies);
    }
22831
protected function add( $hooks, $hook, $service, $method, $priority, $accepted_args ) {
		$hooks[] = array(
			'hook'     => $hook,
			'service'  => $service,
			'method'   => $method,
			'priority' => $priority,
			'args'     => $accepted_args,
		);

		return $hooks;
	}
46282
private function finish_callback(
		callable $callback, array $args
	) {
		$this->request_handled = true;
		$this->wrap_callback($callback, $args);
		return $this;
	}
717564
public function on($key,$func,$priority=10,$options=array()) {
		$call = $options ? array($func,$options) : $func;
		if ($e = &$this->f3->ref($this->ekey.$key))
			$e[$priority][] = $call;
		else
			$e = array($priority=>array($call));
		krsort($e);
	}
373101
public static function Listen($signal_type, $callback, $priority = 10)
    {
        if(!isset(self::$listeners[$signal_type]))
            self::$listeners[$signal_type] = array();

        self::$listeners[$signal_type][] = array(
            'callback' => $callback,
            'priority' => $priority
        );

        self::$listeners[$signal_type] = self::Sort(
            self::$listeners[$signal_type], 'priority'
        );
    }
403447
public function listen($events, $listener, $priority = 0, $acceptedArgs = 1)
    {
        foreach ((array)$events as $event)
        {
            $this->listeners[$event][$priority][] = $this->makeListener($listener);

            unset($this->sorted[$event]);

            if ( ! isset($this->registeredWpActions[$event]))
            {
                $this->registeredWpActions[$event] = true;

                add_action(
                    $event,
                    function () use ($event)
                    {
                        return $this->fire($event, func_get_args());
                    },
                    $priority,
                    $acceptedArgs
                );
            }
        }
    }
175388
private function triggerCallback($callback, $arguments)
    {
        if (is_array($callback)) {
            $this->import($callback[0]);
            return call_user_func_array(array($this->{$callback[0]}, $callback[1]), $arguments);
        } elseif (is_callable($callback)) {
            return call_user_func_array($callback, $arguments);
        }

        return null;
    }
40781
function add_filter($tag, $function_to_add, $priority = 10, $accepted_args = 1)
	{
		if( is_callable($function_to_add) )
		{
			add_filter($tag, $function_to_add, $priority, $accepted_args);
		}
	}
688393
public static function wpFooter( $callback, $priority = null, $accepted_args = null ) {
		self::action( 'wp_footer', $callback, $priority, $accepted_args );
	}