Remove a registered action or filter.

@param string          $hook
@param \Closure|string $callback
@param int             $priority

@return mixed The Hook instance or false.
543449
public function remove($hook, $callback = null, $priority = 10)
    {
        // If $callback is null, it means we have chained the methods to
        // the action/filter instance. If the instance has no callback, return false.
        if (is_null($callback)) {
            if (! $callback = $this->getCallback($hook)) {
                return false;
            }

            list($callback, $priority, $accepted_args) = $callback;

            // Unset the hook.
            unset($this->hooks[$hook]);
        }

        $this->removeAction($hook, $callback, $priority);

        return $this;
    }
437526
public static function hasAction($hook = '', callable $callback = null, $priority = null)
    {
        return static::hasHook('action', $hook, $callback, $priority);
    }
1239682
public function finish($callback, $priority = 0)
    {
        //        $app = $this;
        $container = $this->container;
        $this->on(KernelEvents::TERMINATE, function (PostResponseEvent $event) use ($callback, $container) {
            call_user_func($this->container['callback_resolver']->resolveCallback($callback), $event->getRequest(), $event->getResponse(), $container);
        }, $priority);
    }
594327
public function attach($event, $callback, $priority = 0)
    {
        if (!isset($this->eventListeners[$event])) {
            $this->clearListeners($event);
        }

        $this->eventListeners[$event]->insert($callback, $priority);

        return true;
    }
482264
function remove(handle) {
          return !(
              handle.callback === callback
            && (!context ? true : handle.context === context)
          );
        }
1258705
protected function addEventListener($name, $callback, $priority, $accepted_args)
    {
        $this->hooks[$name] = [$callback, $priority, $accepted_args];
        $this->addAction($name, $callback, $priority, $accepted_args);
    }
503041
public function addFilter(string $hook, callable $callable, ...$args)
    {
        return add_filter($this->App->Config->©brand['©var'].'_'.$hook, $callable, ...$args);
    }
403310
protected function add_filter( $hook, $method, $priority = 10, $arg_count = 1 ) {
		return add_filter(
			$hook,
			$this->map_filter( $this->get_wp_filter_id( $hook, $method, $priority ), $method, $arg_count ),
			$priority,
			$arg_count
		);
	}
907550
def remove_hook(self, name, func):
        '''  '''
        if name in self._hooks and func in self._hooks[name]:
            self._hooks[name].remove(func)
            return True
826584
public function once(string $eventName, callable $callBack, int $priority = 100)
    {
        $wrapper = null;
        $wrapper = function () use ($eventName, $callBack, &$wrapper) {
            $this->removeListener($eventName, $wrapper);

            return \call_user_func_array($callBack, \func_get_args());
        };

        $this->on($eventName, $wrapper, $priority);
    }
484362
public function on($event_name, $callback, $priority = 100) {
	    	if(!is_callable($callback)){
	    		throw new \InvalidArgumentException("Argument 'callback' is not callable.");
	    	}

	        if (!isset($this->listeners[$event_name])) {
	            $this->listeners[$event_name] = array(
	                true,  // If there's only one item, it's sorted
	                array($priority),
	                array($callback)
	            );
	        } else {
	            $this->listeners[$event_name][0] = false; // marked as unsorted
	            $this->listeners[$event_name][1][] = $priority;
	            $this->listeners[$event_name][2][] = $callback;
	        }
	    }
1249979
public function removeListener(string $eventName, callable $listener, $priority = 0): MediatorInterface
    {
        $this->checkEventName($eventName);
        if (!\array_key_exists($eventName, $this->listeners)) {
            return $this;
        }
        /**
         * @var array      $priorities
         * @var int        $atPriority
         * @var callable[] $listeners
         */
        if ('last' !== $priority) {
            $priorities = $this->listeners[$eventName];
        } else {
            $priorities = \array_reverse($this->listeners[$eventName], \true);
            $priority = 'first';
        }
        $isIntPriority = \is_int($priority);
        foreach ($priorities as $atPriority => $listeners) {
            if ($isIntPriority && $priority !== $atPriority) {
                continue;
            }
            $key = \array_search($listener, $listeners, \true);
            if (\false !== $key) {
                $this->bubbleUpUnsetListener($eventName, $atPriority, $key);
                if ('first' === $priority) {
                    break;
                }
            }
        }
        return $this;
    }
1360880
public function remove($hookName, $functionToRemove, $priority = 10) : bool
    {
        $hookName = $this->sanitizeKeyName($hookName);
        if (!$hookName) {
            return false;
        }

        $functionToRemove = $this->uniqueId($functionToRemove);
        $r = $this->filters[$hookName][$priority];
        $r = $r ? $r->has($functionToRemove) : false;
        if ($r === true) {
            $this->filters[$hookName][$priority]->remove($functionToRemove);
            if ($this->filters[$hookName][$priority]->isEmpty()) {
                unset($this->filters[$hookName][$priority]);
            }
            if (empty($this->filters[$hookName])) {
                $this->filters[$hookName]= [];
            }
            unset($this->merged[$hookName]);
        }

        return $r;
    }
60449
public function hook($event, callable $callback, $priority = 10)
    {
        $this->app->hook($event, $callback, $priority);
    }
886221
protected function removeFromQueue(
        PriorityQueueInterface $queue,
        $callabOrClassname
    ) {
        if (is_object($callabOrClassname)) {
            $queue->remove($callabOrClassname);
        } else {
            foreach ($queue as $data) {
                if (is_a($data['data'], $callabOrClassname)) {
                    $queue->remove($data['data']);
                }
            }
        }
    }
190247
public function get(string $path, callable $callback, int $priority = 0)
    {
        return $this->route('get', $path, $callback, $priority);
    }
348782
public function remove($entry, $priority = false)
    {
        $unsetAnything = false;
        foreach ($this->entries as $i => $entryData) {
            if ($entry === $entryData['data'] && ($priority === false || $entryData['priority'] == $priority)) {
                unset($this->entries[$i]);
                $unsetAnything = true;
            }
        }
        if ($unsetAnything) {
            $this->sorted = false;
        }
        return $this;
    }