public function remove_subscriber( EventSubscriber $subscriber ) {

		foreach ( $subscriber->get_subscribed_events() as $event => $params ) {

			if ( is_string( $params ) ) {
				$this->add_listener( $event, $params );
			} elseif ( is_array( $params ) && isset( $params[0] ) ) {

				$method   = $params[0];
				$priority = isset( $params[1] ) ? $params[1] : self::PRIORITY;

				$this->remove_listener( $event, array( $subscriber, $method ), $priority );
			} else {
				throw new \InvalidArgumentException( 'Invalid return format from EventSubscriber.' );
			}
		}

		return $this;
	}