wp_kses_allowed_html

The timeline below displays how wordpress function wp_kses_allowed_html has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.1

/**
 * Returns an array of allowed HTML tags and attributes for a given context.
 *
 * @since 3.5.0
 * @since 5.0.1 `form` removed as allowable HTML tag.
 *
 * @global array $allowedposttags
 * @global array $allowedtags
 * @global array $allowedentitynames
 *
 * @param string|array $context The context for which to retrieve tags. Allowed values are 'post',
 *                              'strip', 'data', 'entities', or the name of a field filter such as
 *                              'pre_user_description', or an array of allowed HTML elements and attributes.
 * @return array Array of allowed HTML tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        // When `$context` is an array it's actually an array of allowed HTML elements and attributes.
        $html = $context;
        $context = 'explicit';
        /**
         * Filters the HTML tags that are allowed for a given context.
         *
         * HTML tags and attribute names are case-insensitive in HTML but must be
         * added to the KSES allow list in lowercase. An item added to the allow list
         * in upper or mixed case will not recognized as permitted by KSES.
         *
         * @since 3.5.0
         *
         * @param array[] $html    Allowed HTML tags.
         * @param string  $context Context name.
         */
        return apply_filters('wp_kses_allowed_html', $html, $context);
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            $tags = apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
            // 5.0.1 removed the `<form>` tag, allow it if a filter is allowing it's sub-elements `<input>` or `<select>`.
            if (!CUSTOM_TAGS && !isset($tags['form']) && (isset($tags['input']) || isset($tags['select']))) {
                $tags = $allowedposttags;
                $tags['form'] = array('action' => true, 'accept' => true, 'accept-charset' => true, 'enctype' => true, 'method' => true, 'name' => true, 'target' => true);
                /** This filter is documented in wp-includes/kses.php */
                $tags = apply_filters('wp_kses_allowed_html', $tags, $context);
            }
            return $tags;
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: 5.9

/**
 * Returns an array of allowed HTML tags and attributes for a given context.
 *
 * @since 3.5.0
 * @since 5.0.1 `form` removed as allowable HTML tag.
 *
 * @global array $allowedposttags
 * @global array $allowedtags
 * @global array $allowedentitynames
 *
 * @param string|array $context The context for which to retrieve tags. Allowed values are 'post',
 *                              'strip', 'data', 'entities', or the name of a field filter such as
 *                              'pre_user_description', or an array of allowed HTML elements and attributes.
 * @return array Array of allowed HTML tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        // When `$context` is an array it's actually an array of allowed HTML elements and attributes.
        $html = $context;
        $context = 'explicit';
        /**
         * Filters the HTML tags that are allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param array[] $html    Allowed HTML tags.
         * @param string  $context Context name.
         */
        return apply_filters('wp_kses_allowed_html', $html, $context);
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            $tags = apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
            // 5.0.1 removed the `<form>` tag, allow it if a filter is allowing it's sub-elements `<input>` or `<select>`.
            if (!CUSTOM_TAGS && !isset($tags['form']) && (isset($tags['input']) || isset($tags['select']))) {
                $tags = $allowedposttags;
                $tags['form'] = array('action' => true, 'accept' => true, 'accept-charset' => true, 'enctype' => true, 'method' => true, 'name' => true, 'target' => true);
                /** This filter is documented in wp-includes/kses.php */
                $tags = apply_filters('wp_kses_allowed_html', $tags, $context);
            }
            return $tags;
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: 5.1

/**
 * Returns an array of allowed HTML tags and attributes for a given context.
 *
 * @since 3.5.0
 * @since 5.0.1 `form` removed as allowable HTML tag.
 *
 * @global array $allowedposttags
 * @global array $allowedtags
 * @global array $allowedentitynames
 *
 * @param string|array $context The context for which to retrieve tags. Allowed values are 'post',
 *                              'strip', 'data', 'entities', or the name of a field filter such as
 *                              'pre_user_description'.
 * @return array Array of allowed HTML tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filters the HTML that is allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param array[]|string $context      Context to judge allowed tags by.
         * @param string         $context_type Context name.
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            $tags = apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
            // 5.0.1 removed the `<form>` tag, allow it if a filter is allowing it's sub-elements `<input>` or `<select>`.
            if (!CUSTOM_TAGS && !isset($tags['form']) && (isset($tags['input']) || isset($tags['select']))) {
                $tags = $allowedposttags;
                $tags['form'] = array('action' => true, 'accept' => true, 'accept-charset' => true, 'enctype' => true, 'method' => true, 'name' => true, 'target' => true);
                /** This filter is documented in wp-includes/kses.php */
                $tags = apply_filters('wp_kses_allowed_html', $tags, $context);
            }
            return $tags;
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: 0.1

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 * @since 5.0.1 `form` removed as allowable HTML tag.
 *
 * @global array $allowedposttags
 * @global array $allowedtags
 * @global array $allowedentitynames
 *
 * @param string|array $context The context for which to retrieve tags.
 *                              Allowed values are post, strip, data, entities, or
 *                              the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filters HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param array  $context      Context to judge allowed tags by.
         * @param string $context_type Context type (explicit).
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            $tags = apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
            // 5.0.1 removed the `<form>` tag, allow it if a filter is allowing it's sub-elements `<input>` or `<select>`.
            if (!CUSTOM_TAGS && !isset($tags['form']) && (isset($tags['input']) || isset($tags['select']))) {
                $tags = $allowedposttags;
                $tags['form'] = array('action' => true, 'accept' => true, 'accept-charset' => true, 'enctype' => true, 'method' => true, 'name' => true, 'target' => true);
                /** This filter is documented in wp-includes/kses.php */
                $tags = apply_filters('wp_kses_allowed_html', $tags, $context);
            }
            return $tags;
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: 5.0

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 *
 * @global array $allowedposttags
 * @global array $allowedtags
 * @global array $allowedentitynames
 *
 * @param string|array $context The context for which to retrieve tags.
 *                              Allowed values are post, strip, data, entities, or
 *                              the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filters HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param array  $context      Context to judge allowed tags by.
         * @param string $context_type Context type (explicit).
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: 9.9

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 * @since 5.0.1 `form` removed as allowable HTML tag.
 *
 * @global array $allowedposttags
 * @global array $allowedtags
 * @global array $allowedentitynames
 *
 * @param string|array $context The context for which to retrieve tags.
 *                              Allowed values are post, strip, data, entities, or
 *                              the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filters HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param array  $context      Context to judge allowed tags by.
         * @param string $context_type Context type (explicit).
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            $tags = apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
            // 5.0.1 removed the `<form>` tag, allow it if a filter is allowing it's sub-elements `<input>` or `<select>`.
            if (!CUSTOM_TAGS && !isset($tags['form']) && (isset($tags['input']) || isset($tags['select']))) {
                $tags = $allowedposttags;
                $tags['form'] = array('action' => true, 'accept' => true, 'accept-charset' => true, 'enctype' => true, 'method' => true, 'name' => true, 'target' => true);
                /** This filter is documented in wp-includes/kses.php */
                $tags = apply_filters('wp_kses_allowed_html', $tags, $context);
            }
            return $tags;
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: 9.3

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 *
 * @global array $allowedposttags
 * @global array $allowedtags
 * @global array $allowedentitynames
 *
 * @param string|array $context The context for which to retrieve tags.
 *                              Allowed values are post, strip, data, entities, or
 *                              the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filters HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param array  $context      Context to judge allowed tags by.
         * @param string $context_type Context type (explicit).
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: .20

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 * @since 5.0.1 `form` removed as allowable HTML tag.
 *
 * @global array $allowedposttags
 * @global array $allowedtags
 * @global array $allowedentitynames
 *
 * @param string|array $context The context for which to retrieve tags.
 *                              Allowed values are post, strip, data, entities, or
 *                              the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filters HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param array  $context      Context to judge allowed tags by.
         * @param string $context_type Context type (explicit).
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            $tags = apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
            // 5.0.1 removed the `<form>` tag, allow it if a filter is allowing it's sub-elements `<input>` or `<select>`.
            if (!CUSTOM_TAGS && !isset($tags['form']) && (isset($tags['input']) || isset($tags['select']))) {
                $tags = $allowedposttags;
                $tags['form'] = array('action' => true, 'accept' => true, 'accept-charset' => true, 'enctype' => true, 'method' => true, 'name' => true, 'target' => true);
                /** This filter is documented in wp-includes/kses.php */
                $tags = apply_filters('wp_kses_allowed_html', $tags, $context);
            }
            return $tags;
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: 9.2

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 *
 * @global array $allowedposttags
 * @global array $allowedtags
 * @global array $allowedentitynames
 *
 * @param string|array $context The context for which to retrieve tags.
 *                              Allowed values are post, strip, data, entities, or
 *                              the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filters HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param array  $context      Context to judge allowed tags by.
         * @param string $context_type Context type (explicit).
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: .10

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 * @since 5.0.1 `form` removed as allowable HTML tag.
 *
 * @global array $allowedposttags
 * @global array $allowedtags
 * @global array $allowedentitynames
 *
 * @param string|array $context The context for which to retrieve tags.
 *                              Allowed values are post, strip, data, entities, or
 *                              the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filters HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param array  $context      Context to judge allowed tags by.
         * @param string $context_type Context type (explicit).
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            $tags = apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
            // 5.0.1 removed the `<form>` tag, allow it if a filter is allowing it's sub-elements `<input>` or `<select>`.
            if (!CUSTOM_TAGS && !isset($tags['form']) && (isset($tags['input']) || isset($tags['select']))) {
                $tags = $allowedposttags;
                $tags['form'] = array('action' => true, 'accept' => true, 'accept-charset' => true, 'enctype' => true, 'method' => true, 'name' => true, 'target' => true);
                /** This filter is documented in wp-includes/kses.php */
                $tags = apply_filters('wp_kses_allowed_html', $tags, $context);
            }
            return $tags;
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: 4.9

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 *
 * @global array $allowedposttags
 * @global array $allowedtags
 * @global array $allowedentitynames
 *
 * @param string|array $context The context for which to retrieve tags.
 *                              Allowed values are post, strip, data, entities, or
 *                              the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filters HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param array  $context      Context to judge allowed tags by.
         * @param string $context_type Context type (explicit).
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: 8.8

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 * @since 5.0.1 `form` removed as allowable HTML tag.
 *
 * @global array $allowedposttags
 * @global array $allowedtags
 * @global array $allowedentitynames
 *
 * @param string $context The context for which to retrieve tags.
 *                        Allowed values are post, strip, data,entities, or
 *                        the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filters HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param string $tags    Allowed tags, attributes, and/or entities.
         * @param string $context Context to judge allowed tags by. Allowed values are 'post',
         *                        'data', 'strip', 'entities', 'explicit', or the name of a filter.
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            $tags = apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
            // 5.0.1 removed the `<form>` tag, allow it if a filter is allowing it's sub-elements `<input>` or `<select>`.
            if (!CUSTOM_TAGS && !isset($tags['form']) && (isset($tags['input']) || isset($tags['select']))) {
                $tags = $allowedposttags;
                $tags['form'] = array('action' => true, 'accept' => true, 'accept-charset' => true, 'enctype' => true, 'method' => true, 'name' => true, 'target' => true);
                /** This filter is documented in wp-includes/kses.php */
                $tags = apply_filters('wp_kses_allowed_html', $tags, $context);
            }
            return $tags;
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: 8.2

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 *
 * @global array $allowedposttags
 * @global array $allowedtags
 * @global array $allowedentitynames
 *
 * @param string $context The context for which to retrieve tags.
 *                        Allowed values are post, strip, data,entities, or
 *                        the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filters HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param string $tags    Allowed tags, attributes, and/or entities.
         * @param string $context Context to judge allowed tags by. Allowed values are 'post',
         *                        'data', 'strip', 'entities', 'explicit', or the name of a filter.
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: .10

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 * @since 5.0.1 `form` removed as allowable HTML tag.
 *
 * @global array $allowedposttags
 * @global array $allowedtags
 * @global array $allowedentitynames
 *
 * @param string $context The context for which to retrieve tags.
 *                        Allowed values are post, strip, data,entities, or
 *                        the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filters HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param string $tags    Allowed tags, attributes, and/or entities.
         * @param string $context Context to judge allowed tags by. Allowed values are 'post',
         *                        'data', 'strip', 'entities', 'explicit', or the name of a filter.
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            $tags = apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
            // 5.0.1 removed the `<form>` tag, allow it if a filter is allowing it's sub-elements `<input>` or `<select>`.
            if (!CUSTOM_TAGS && !isset($tags['form']) && (isset($tags['input']) || isset($tags['select']))) {
                $tags = $allowedposttags;
                $tags['form'] = array('action' => true, 'accept' => true, 'accept-charset' => true, 'enctype' => true, 'method' => true, 'name' => true, 'target' => true);
                /** This filter is documented in wp-includes/kses.php */
                $tags = apply_filters('wp_kses_allowed_html', $tags, $context);
            }
            return $tags;
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: 6.3

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 *
 * @global array $allowedposttags
 * @global array $allowedtags
 * @global array $allowedentitynames
 *
 * @param string $context The context for which to retrieve tags.
 *                        Allowed values are post, strip, data,entities, or
 *                        the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filters HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param string $tags    Allowed tags, attributes, and/or entities.
         * @param string $context Context to judge allowed tags by. Allowed values are 'post',
         *                        'data', 'strip', 'entities', 'explicit', or the name of a filter.
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: .20

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 * @since 5.0.1 `form` removed as allowable HTML tag.
 *
 * @global array $allowedposttags
 * @global array $allowedtags
 * @global array $allowedentitynames
 *
 * @param string $context The context for which to retrieve tags.
 *                        Allowed values are post, strip, data,entities, or
 *                        the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filters HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param string $tags    Allowed tags, attributes, and/or entities.
         * @param string $context Context to judge allowed tags by. Allowed values are 'post',
         *                        'data', 'strip', 'entities', 'explicit', or the name of a filter.
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            $tags = apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
            // 5.0.1 removed the `<form>` tag, allow it if a filter is allowing it's sub-elements `<input>` or `<select>`.
            if (!CUSTOM_TAGS && !isset($tags['form']) && (isset($tags['input']) || isset($tags['select']))) {
                $tags = $allowedposttags;
                $tags['form'] = array('action' => true, 'accept' => true, 'accept-charset' => true, 'enctype' => true, 'method' => true, 'name' => true, 'target' => true);
                /** This filter is documented in wp-includes/kses.php */
                $tags = apply_filters('wp_kses_allowed_html', $tags, $context);
            }
            return $tags;
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: 6.2

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 *
 * @global array $allowedposttags
 * @global array $allowedtags
 * @global array $allowedentitynames
 *
 * @param string $context The context for which to retrieve tags.
 *                        Allowed values are post, strip, data,entities, or
 *                        the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filters HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param string $tags    Allowed tags, attributes, and/or entities.
         * @param string $context Context to judge allowed tags by. Allowed values are 'post',
         *                        'data', 'strip', 'entities', 'explicit', or the name of a filter.
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: .13

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 * @since 5.0.1 `form` removed as allowable HTML tag.
 *
 * @global array $allowedposttags
 * @global array $allowedtags
 * @global array $allowedentitynames
 *
 * @param string $context The context for which to retrieve tags.
 *                        Allowed values are post, strip, data,entities, or
 *                        the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filters HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param string $tags    Allowed tags, attributes, and/or entities.
         * @param string $context Context to judge allowed tags by. Allowed values are 'post',
         *                        'data', 'strip', 'entities', 'explicit', or the name of a filter.
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            $tags = apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
            // 5.0.1 removed the `<form>` tag, allow it if a filter is allowing it's sub-elements `<input>` or `<select>`.
            if (!CUSTOM_TAGS && !isset($tags['form']) && (isset($tags['input']) || isset($tags['select']))) {
                $tags = $allowedposttags;
                $tags['form'] = array('action' => true, 'accept' => true, 'accept-charset' => true, 'enctype' => true, 'method' => true, 'name' => true, 'target' => true);
                /** This filter is documented in wp-includes/kses.php */
                $tags = apply_filters('wp_kses_allowed_html', $tags, $context);
            }
            return $tags;
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: 4.6

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 *
 * @global array $allowedposttags
 * @global array $allowedtags
 * @global array $allowedentitynames
 *
 * @param string $context The context for which to retrieve tags.
 *                        Allowed values are post, strip, data,entities, or
 *                        the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filters HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param string $tags    Allowed tags, attributes, and/or entities.
         * @param string $context Context to judge allowed tags by. Allowed values are 'post',
         *                        'data', 'strip', 'entities', 'explicit', or the name of a filter.
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: 5.4

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 *
 * @global array $allowedposttags
 * @global array $allowedtags
 * @global array $allowedentitynames
 *
 * @param string $context The context for which to retrieve tags.
 *                        Allowed values are post, strip, data,entities, or
 *                        the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filter HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param string $tags    Allowed tags, attributes, and/or entities.
         * @param string $context Context to judge allowed tags by. Allowed values are 'post',
         *                        'data', 'strip', 'entities', 'explicit', or the name of a filter.
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: .30

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 * @since 5.0.1 `form` removed as allowable HTML tag.
 *
 * @global array $allowedposttags
 * @global array $allowedtags
 * @global array $allowedentitynames
 *
 * @param string $context The context for which to retrieve tags.
 *                        Allowed values are post, strip, data,entities, or
 *                        the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filter HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param string $tags    Allowed tags, attributes, and/or entities.
         * @param string $context Context to judge allowed tags by. Allowed values are 'post',
         *                        'data', 'strip', 'entities', 'explicit', or the name of a filter.
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            $tags = apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
            // 5.0.1 removed the `<form>` tag, allow it if a filter is allowing it's sub-elements `<input>` or `<select>`.
            if (!CUSTOM_TAGS && !isset($tags['form']) && (isset($tags['input']) || isset($tags['select']))) {
                $tags = $allowedposttags;
                $tags['form'] = array('action' => true, 'accept' => true, 'accept-charset' => true, 'enctype' => true, 'method' => true, 'name' => true, 'target' => true);
                /** This filter is documented in wp-includes/kses.php */
                $tags = apply_filters('wp_kses_allowed_html', $tags, $context);
            }
            return $tags;
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: 5.3

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 *
 * @global array $allowedposttags
 * @global array $allowedtags
 * @global array $allowedentitynames
 *
 * @param string $context The context for which to retrieve tags.
 *                        Allowed values are post, strip, data,entities, or
 *                        the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filter HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param string $tags    Allowed tags, attributes, and/or entities.
         * @param string $context Context to judge allowed tags by. Allowed values are 'post',
         *                        'data', 'strip', 'entities', 'explicit', or the name of a filter.
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: .20

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 * @since 5.0.1 `form` removed as allowable HTML tag.
 *
 * @global array $allowedposttags
 * @global array $allowedtags
 * @global array $allowedentitynames
 *
 * @param string $context The context for which to retrieve tags.
 *                        Allowed values are post, strip, data,entities, or
 *                        the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filter HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param string $tags    Allowed tags, attributes, and/or entities.
         * @param string $context Context to judge allowed tags by. Allowed values are 'post',
         *                        'data', 'strip', 'entities', 'explicit', or the name of a filter.
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            $tags = apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
            // 5.0.1 removed the `<form>` tag, allow it if a filter is allowing it's sub-elements `<input>` or `<select>`.
            if (!CUSTOM_TAGS && !isset($tags['form']) && (isset($tags['input']) || isset($tags['select']))) {
                $tags = $allowedposttags;
                $tags['form'] = array('action' => true, 'accept' => true, 'accept-charset' => true, 'enctype' => true, 'method' => true, 'name' => true, 'target' => true);
                /** This filter is documented in wp-includes/kses.php */
                $tags = apply_filters('wp_kses_allowed_html', $tags, $context);
            }
            return $tags;
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: 5.2

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 *
 * @global array $allowedposttags
 * @global array $allowedtags
 * @global array $allowedentitynames
 *
 * @param string $context The context for which to retrieve tags.
 *                        Allowed values are post, strip, data,entities, or
 *                        the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filter HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param string $tags    Allowed tags, attributes, and/or entities.
         * @param string $context Context to judge allowed tags by. Allowed values are 'post',
         *                        'data', 'strip', 'entities', 'explicit', or the name of a filter.
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: .16

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 * @since 5.0.1 `form` removed as allowable HTML tag.
 *
 * @global array $allowedposttags
 * @global array $allowedtags
 * @global array $allowedentitynames
 *
 * @param string $context The context for which to retrieve tags.
 *                        Allowed values are post, strip, data,entities, or
 *                        the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filter HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param string $tags    Allowed tags, attributes, and/or entities.
         * @param string $context Context to judge allowed tags by. Allowed values are 'post',
         *                        'data', 'strip', 'entities', 'explicit', or the name of a filter.
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            $tags = apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
            // 5.0.1 removed the `<form>` tag, allow it if a filter is allowing it's sub-elements `<input>` or `<select>`.
            if (!CUSTOM_TAGS && !isset($tags['form']) && (isset($tags['input']) || isset($tags['select']))) {
                $tags = $allowedposttags;
                $tags['form'] = array('action' => true, 'accept' => true, 'accept-charset' => true, 'enctype' => true, 'method' => true, 'name' => true, 'target' => true);
                /** This filter is documented in wp-includes/kses.php */
                $tags = apply_filters('wp_kses_allowed_html', $tags, $context);
            }
            return $tags;
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: 4.4

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 *
 * @global array $allowedposttags
 * @global array $allowedtags
 * @global array $allowedentitynames
 *
 * @param string $context The context for which to retrieve tags.
 *                        Allowed values are post, strip, data,entities, or
 *                        the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filter HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param string $tags    Allowed tags, attributes, and/or entities.
         * @param string $context Context to judge allowed tags by. Allowed values are 'post',
         *                        'data', 'strip', 'entities', 'explicit', or the name of a filter.
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: .30

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 * @since 5.0.1 `form` removed as allowable HTML tag.
 *
 * @global array $allowedposttags
 * @global array $allowedtags
 * @global array $allowedentitynames
 *
 * @param string $context The context for which to retrieve tags.
 *                        Allowed values are post, strip, data,entities, or
 *                        the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filter HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param string $tags    Allowed tags, attributes, and/or entities.
         * @param string $context Context to judge allowed tags by. Allowed values are 'post',
         *                        'data', 'strip', 'entities', 'explicit', or the name of a filter.
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            $tags = apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
            // 5.0.1 removed the `<form>` tag, allow it if a filter is allowing it's sub-elements `<input>` or `<select>`.
            if (!CUSTOM_TAGS && !isset($tags['form']) && (isset($tags['input']) || isset($tags['select']))) {
                $tags = $allowedposttags;
                $tags['form'] = array('action' => true, 'accept' => true, 'accept-charset' => true, 'enctype' => true, 'method' => true, 'name' => true, 'target' => true);
                /** This filter is documented in wp-includes/kses.php */
                $tags = apply_filters('wp_kses_allowed_html', $tags, $context);
            }
            return $tags;
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: 4.3

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 *
 * @global array $allowedposttags
 * @global array $allowedtags
 * @global array $allowedentitynames
 *
 * @param string $context The context for which to retrieve tags.
 *                        Allowed values are post, strip, data,entities, or
 *                        the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filter HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param string $tags    Allowed tags, attributes, and/or entities.
         * @param string $context Context to judge allowed tags by. Allowed values are 'post',
         *                        'data', 'strip', 'entities', 'explicit', or the name of a filter.
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: .20

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 * @since 5.0.1 `form` removed as allowable HTML tag.
 *
 * @global array $allowedposttags
 * @global array $allowedtags
 * @global array $allowedentitynames
 *
 * @param string $context The context for which to retrieve tags.
 *                        Allowed values are post, strip, data,entities, or
 *                        the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filter HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param string $tags    Allowed tags, attributes, and/or entities.
         * @param string $context Context to judge allowed tags by. Allowed values are 'post',
         *                        'data', 'strip', 'entities', 'explicit', or the name of a filter.
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            $tags = apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
            // 5.0.1 removed the `<form>` tag, allow it if a filter is allowing it's sub-elements `<input>` or `<select>`.
            if (!CUSTOM_TAGS && !isset($tags['form']) && (isset($tags['input']) || isset($tags['select']))) {
                $tags = $allowedposttags;
                $tags['form'] = array('action' => true, 'accept' => true, 'accept-charset' => true, 'enctype' => true, 'method' => true, 'name' => true, 'target' => true);
                /** This filter is documented in wp-includes/kses.php */
                $tags = apply_filters('wp_kses_allowed_html', $tags, $context);
            }
            return $tags;
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: 4.2

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 *
 * @global array $allowedposttags
 * @global array $allowedtags
 * @global array $allowedentitynames
 *
 * @param string $context The context for which to retrieve tags.
 *                        Allowed values are post, strip, data,entities, or
 *                        the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filter HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param string $tags    Allowed tags, attributes, and/or entities.
         * @param string $context Context to judge allowed tags by. Allowed values are 'post',
         *                        'data', 'strip', 'entities', 'explicit', or the name of a filter.
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: .17

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 * @since 5.0.1 `form` removed as allowable HTML tag.
 *
 * @global array $allowedposttags
 * @global array $allowedtags
 * @global array $allowedentitynames
 *
 * @param string $context The context for which to retrieve tags.
 *                        Allowed values are post, strip, data,entities, or
 *                        the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filter HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param string $tags    Allowed tags, attributes, and/or entities.
         * @param string $context Context to judge allowed tags by. Allowed values are 'post',
         *                        'data', 'strip', 'entities', 'explicit', or the name of a filter.
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            $tags = apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
            // 5.0.1 removed the `<form>` tag, allow it if a filter is allowing it's sub-elements `<input>` or `<select>`.
            if (!CUSTOM_TAGS && !isset($tags['form']) && (isset($tags['input']) || isset($tags['select']))) {
                $tags = $allowedposttags;
                $tags['form'] = array('action' => true, 'accept' => true, 'accept-charset' => true, 'enctype' => true, 'method' => true, 'name' => true, 'target' => true);
                /** This filter is documented in wp-includes/kses.php */
                $tags = apply_filters('wp_kses_allowed_html', $tags, $context);
            }
            return $tags;
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: 3.4

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 *
 * @global array $allowedposttags
 * @global array $allowedtags
 * @global array $allowedentitynames
 *
 * @param string $context The context for which to retrieve tags.
 *                        Allowed values are post, strip, data,entities, or
 *                        the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filter HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param string $tags    Allowed tags, attributes, and/or entities.
         * @param string $context Context to judge allowed tags by. Allowed values are 'post',
         *                        'data', 'strip', 'entities', 'explicit', or the name of a filter.
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: .30

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 * @since 5.0.1 `form` removed as allowable HTML tag.
 *
 * @global array $allowedposttags
 * @global array $allowedtags
 * @global array $allowedentitynames
 *
 * @param string $context The context for which to retrieve tags.
 *                        Allowed values are post, strip, data,entities, or
 *                        the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filter HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param string $tags    Allowed tags, attributes, and/or entities.
         * @param string $context Context to judge allowed tags by. Allowed values are 'post',
         *                        'data', 'strip', 'entities', 'explicit', or the name of a filter.
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            $tags = apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
            // 5.0.1 removed the `<form>` tag, allow it if a filter is allowing it's sub-elements `<input>` or `<select>`.
            if (!CUSTOM_TAGS && !isset($tags['form']) && (isset($tags['input']) || isset($tags['select']))) {
                $tags = $allowedposttags;
                $tags['form'] = array('action' => true, 'accept' => true, 'accept-charset' => true, 'enctype' => true, 'method' => true, 'name' => true, 'target' => true);
                /** This filter is documented in wp-includes/kses.php */
                $tags = apply_filters('wp_kses_allowed_html', $tags, $context);
            }
            return $tags;
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: 3.3

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 *
 * @global array $allowedposttags
 * @global array $allowedtags
 * @global array $allowedentitynames
 *
 * @param string $context The context for which to retrieve tags.
 *                        Allowed values are post, strip, data,entities, or
 *                        the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filter HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param string $tags    Allowed tags, attributes, and/or entities.
         * @param string $context Context to judge allowed tags by. Allowed values are 'post',
         *                        'data', 'strip', 'entities', 'explicit', or the name of a filter.
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: .20

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 * @since 5.0.1 `form` removed as allowable HTML tag.
 *
 * @global array $allowedposttags
 * @global array $allowedtags
 * @global array $allowedentitynames
 *
 * @param string $context The context for which to retrieve tags.
 *                        Allowed values are post, strip, data,entities, or
 *                        the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filter HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param string $tags    Allowed tags, attributes, and/or entities.
         * @param string $context Context to judge allowed tags by. Allowed values are 'post',
         *                        'data', 'strip', 'entities', 'explicit', or the name of a filter.
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            $tags = apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
            // 5.0.1 removed the `<form>` tag, allow it if a filter is allowing it's sub-elements `<input>` or `<select>`.
            if (!CUSTOM_TAGS && !isset($tags['form']) && (isset($tags['input']) || isset($tags['select']))) {
                $tags = $allowedposttags;
                $tags['form'] = array('action' => true, 'accept' => true, 'accept-charset' => true, 'enctype' => true, 'method' => true, 'name' => true, 'target' => true);
                /** This filter is documented in wp-includes/kses.php */
                $tags = apply_filters('wp_kses_allowed_html', $tags, $context);
            }
            return $tags;
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: 3.2

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 *
 * @global array $allowedposttags
 * @global array $allowedtags
 * @global array $allowedentitynames
 *
 * @param string $context The context for which to retrieve tags.
 *                        Allowed values are post, strip, data,entities, or
 *                        the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filter HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param string $tags    Allowed tags, attributes, and/or entities.
         * @param string $context Context to judge allowed tags by. Allowed values are 'post',
         *                        'data', 'strip', 'entities', 'explicit', or the name of a filter.
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: .18

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 * @since 5.0.1 `form` removed as allowable HTML tag.
 *
 * @global array $allowedposttags
 * @global array $allowedtags
 * @global array $allowedentitynames
 *
 * @param string $context The context for which to retrieve tags.
 *                        Allowed values are post, strip, data,entities, or
 *                        the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filter HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param string $tags    Allowed tags, attributes, and/or entities.
         * @param string $context Context to judge allowed tags by. Allowed values are 'post',
         *                        'data', 'strip', 'entities', 'explicit', or the name of a filter.
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            $tags = apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
            // 5.0.1 removed the `<form>` tag, allow it if a filter is allowing it's sub-elements `<input>` or `<select>`.
            if (!CUSTOM_TAGS && !isset($tags['form']) && (isset($tags['input']) || isset($tags['select']))) {
                $tags = $allowedposttags;
                $tags['form'] = array('action' => true, 'accept' => true, 'accept-charset' => true, 'enctype' => true, 'method' => true, 'name' => true, 'target' => true);
                /** This filter is documented in wp-includes/kses.php */
                $tags = apply_filters('wp_kses_allowed_html', $tags, $context);
            }
            return $tags;
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: 4.3

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 *
 * @global array $allowedposttags
 * @global array $allowedtags
 * @global array $allowedentitynames
 *
 * @param string $context The context for which to retrieve tags.
 *                        Allowed values are post, strip, data,entities, or
 *                        the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filter HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param string $tags    Allowed tags, attributes, and/or entities.
         * @param string $context Context to judge allowed tags by. Allowed values are 'post',
         *                        'data', 'strip', 'entities', 'explicit', or the name of a filter.
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: 2.4

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 *
 * @param string $context The context for which to retrieve tags. Allowed values are
 *  post | strip | data | entities or the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filter HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param string $tags    Allowed tags, attributes, and/or entities.
         * @param string $context Context to judge allowed tags by. Allowed values are 'post',
         *                        'data', 'strip', 'entities', 'explicit', or the name of a filter.
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: .30

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 * @since 5.0.1 `form` removed as allowable HTML tag.
 *
 * @param string $context The context for which to retrieve tags. Allowed values are
 *  post | strip | data | entities or the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filter HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param string $tags    Allowed tags, attributes, and/or entities.
         * @param string $context Context to judge allowed tags by. Allowed values are 'post',
         *                        'data', 'strip', 'entities', 'explicit', or the name of a filter.
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            $tags = apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
            // 5.0.1 removed the `<form>` tag, allow it if a filter is allowing it's sub-elements `<input>` or `<select>`.
            if (!CUSTOM_TAGS && !isset($tags['form']) && (isset($tags['input']) || isset($tags['select']))) {
                $tags = $allowedposttags;
                $tags['form'] = array('action' => true, 'accept' => true, 'accept-charset' => true, 'enctype' => true, 'method' => true, 'name' => true, 'target' => true);
                /** This filter is documented in wp-includes/kses.php */
                $tags = apply_filters('wp_kses_allowed_html', $tags, $context);
            }
            return $tags;
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: 2.3

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 *
 * @param string $context The context for which to retrieve tags. Allowed values are
 *  post | strip | data | entities or the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filter HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param string $tags    Allowed tags, attributes, and/or entities.
         * @param string $context Context to judge allowed tags by. Allowed values are 'post',
         *                        'data', 'strip', 'entities', 'explicit', or the name of a filter.
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: .22

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 * @since 5.0.1 `form` removed as allowable HTML tag.
 *
 * @param string $context The context for which to retrieve tags. Allowed values are
 *  post | strip | data | entities or the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filter HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param string $tags    Allowed tags, attributes, and/or entities.
         * @param string $context Context to judge allowed tags by. Allowed values are 'post',
         *                        'data', 'strip', 'entities', 'explicit', or the name of a filter.
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            $tags = apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
            // 5.0.1 removed the `<form>` tag, allow it if a filter is allowing it's sub-elements `<input>` or `<select>`.
            if (!CUSTOM_TAGS && !isset($tags['form']) && (isset($tags['input']) || isset($tags['select']))) {
                $tags = $allowedposttags;
                $tags['form'] = array('action' => true, 'accept' => true, 'accept-charset' => true, 'enctype' => true, 'method' => true, 'name' => true, 'target' => true);
                /** This filter is documented in wp-includes/kses.php */
                $tags = apply_filters('wp_kses_allowed_html', $tags, $context);
            }
            return $tags;
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: 4.2

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 *
 * @param string $context The context for which to retrieve tags. Allowed values are
 *  post | strip | data | entities or the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filter HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param string $tags    Allowed tags, attributes, and/or entities.
         * @param string $context Context to judge allowed tags by. Allowed values are 'post',
         *                        'data', 'strip', 'entities', 'explicit', or the name of a filter.
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: 1.5

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 *
 * @param string $context The context for which to retrieve tags. Allowed values are
 *  post | strip | data | entities or the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filter HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param string $tags    Allowed tags, attributes, and/or entities.
         * @param string $context Context to judge allowed tags by. Allowed values are 'post',
         *                        'data', 'strip', 'entities', 'explicit', or the name of a filter.
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
            break;
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
            break;
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
            break;
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
            break;
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: .40

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 * @since 5.0.1 `form` removed as allowable HTML tag.
 *
 * @param string $context The context for which to retrieve tags. Allowed values are
 *  post | strip | data | entities or the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filter HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param string $tags    Allowed tags, attributes, and/or entities.
         * @param string $context Context to judge allowed tags by. Allowed values are 'post',
         *                        'data', 'strip', 'entities', 'explicit', or the name of a filter.
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            $tags = apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
            // 5.0.1 removed the `<form>` tag, allow it if a filter is allowing it's sub-elements `<input>` or `<select>`.
            if (!CUSTOM_TAGS && !isset($tags['form']) && (isset($tags['input']) || isset($tags['select']))) {
                $tags = $allowedposttags;
                $tags['form'] = array('action' => true, 'accept' => true, 'accept-charset' => true, 'enctype' => true, 'method' => true, 'name' => true, 'target' => true);
                /** This filter is documented in wp-includes/kses.php */
                $tags = apply_filters('wp_kses_allowed_html', $tags, $context);
            }
            return $tags;
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
            break;
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
            break;
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
            break;
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: 1.4

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 *
 * @param string $context The context for which to retrieve tags. Allowed values are
 *  post | strip | data | entities or the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filter HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param string $tags    Allowed tags, attributes, and/or entities.
         * @param string $context Context to judge allowed tags by. Allowed values are 'post',
         *                        'data', 'strip', 'entities', 'explicit', or the name of a filter.
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
            break;
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
            break;
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
            break;
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
            break;
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: .30

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 * @since 5.0.1 `form` removed as allowable HTML tag.
 *
 * @param string $context The context for which to retrieve tags. Allowed values are
 *  post | strip | data | entities or the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filter HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param string $tags    Allowed tags, attributes, and/or entities.
         * @param string $context Context to judge allowed tags by. Allowed values are 'post',
         *                        'data', 'strip', 'entities', 'explicit', or the name of a filter.
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            $tags = apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
            // 5.0.1 removed the `<form>` tag, allow it if a filter is allowing it's sub-elements `<input>` or `<select>`.
            if (!CUSTOM_TAGS && !isset($tags['form']) && (isset($tags['input']) || isset($tags['select']))) {
                $tags = $allowedposttags;
                $tags['form'] = array('action' => true, 'accept' => true, 'accept-charset' => true, 'enctype' => true, 'method' => true, 'name' => true, 'target' => true);
                /** This filter is documented in wp-includes/kses.php */
                $tags = apply_filters('wp_kses_allowed_html', $tags, $context);
            }
            return $tags;
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
            break;
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
            break;
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
            break;
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: 1.3

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 *
 * @param string $context The context for which to retrieve tags. Allowed values are
 *  post | strip | data | entities or the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filter HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param string $tags    Allowed tags, attributes, and/or entities.
         * @param string $context Context to judge allowed tags by. Allowed values are 'post',
         *                        'data', 'strip', 'entities', 'explicit', or the name of a filter.
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
            break;
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
            break;
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
            break;
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
            break;
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: .25

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 * @since 5.0.1 `form` removed as allowable HTML tag.
 *
 * @param string $context The context for which to retrieve tags. Allowed values are
 *  post | strip | data | entities or the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filter HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param string $tags    Allowed tags, attributes, and/or entities.
         * @param string $context Context to judge allowed tags by. Allowed values are 'post',
         *                        'data', 'strip', 'entities', 'explicit', or the name of a filter.
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            $tags = apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
            // 5.0.1 removed the `<form>` tag, allow it if a filter is allowing it's sub-elements `<input>` or `<select>`.
            if (!CUSTOM_TAGS && !isset($tags['form']) && (isset($tags['input']) || isset($tags['select']))) {
                $tags = $allowedposttags;
                $tags['form'] = array('action' => true, 'accept' => true, 'accept-charset' => true, 'enctype' => true, 'method' => true, 'name' => true, 'target' => true);
                /** This filter is documented in wp-includes/kses.php */
                $tags = apply_filters('wp_kses_allowed_html', $tags, $context);
            }
            return $tags;
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
            break;
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
            break;
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
            break;
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: 0.4

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 *
 * @param string $context The context for which to retrieve tags. Allowed values are
 *  post | strip | data | entities or the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filter HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param string $tags    Allowed tags, attributes, and/or entities.
         * @param string $context Context to judge allowed tags by. Allowed values are 'post',
         *                        'data', 'strip', 'entities', 'explicit', or the name of a filter.
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
            break;
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
            break;
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
            break;
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
            break;
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: .30

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 * @since 5.0.1 `form` removed as allowable HTML tag.
 *
 * @param string $context The context for which to retrieve tags. Allowed values are
 *  post | strip | data | entities or the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filter HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param string $tags    Allowed tags, attributes, and/or entities.
         * @param string $context Context to judge allowed tags by. Allowed values are 'post',
         *                        'data', 'strip', 'entities', 'explicit', or the name of a filter.
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            $tags = apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
            // 5.0.1 removed the `<form>` tag, allow it if a filter is allowing it's sub-elements `<input>` or `<select>`.
            if (!CUSTOM_TAGS && !isset($tags['form']) && (isset($tags['input']) || isset($tags['select']))) {
                $tags = $allowedposttags;
                $tags['form'] = array('action' => true, 'accept' => true, 'accept-charset' => true, 'enctype' => true, 'method' => true, 'name' => true, 'target' => true);
                /** This filter is documented in wp-includes/kses.php */
                $tags = apply_filters('wp_kses_allowed_html', $tags, $context);
            }
            return $tags;
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
            break;
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
            break;
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
            break;
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: 0.3

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 *
 * @param string $context The context for which to retrieve tags. Allowed values are
 *  post | strip | data | entities or the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filter HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param string $tags    Allowed tags, attributes, and/or entities.
         * @param string $context Context to judge allowed tags by. Allowed values are 'post',
         *                        'data', 'strip', 'entities', 'explicit', or the name of a filter.
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
            break;
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
            break;
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
            break;
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
            break;
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: .25

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 * @since 5.0.1 `form` removed as allowable HTML tag.
 *
 * @param string $context The context for which to retrieve tags. Allowed values are
 *  post | strip | data | entities or the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filter HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param string $tags    Allowed tags, attributes, and/or entities.
         * @param string $context Context to judge allowed tags by. Allowed values are 'post',
         *                        'data', 'strip', 'entities', 'explicit', or the name of a filter.
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            $tags = apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
            // 5.0.1 removed the `<form>` tag, allow it if a filter is allowing it's sub-elements `<input>` or `<select>`.
            if (!CUSTOM_TAGS && !isset($tags['form']) && (isset($tags['input']) || isset($tags['select']))) {
                $tags = $allowedposttags;
                $tags['form'] = array('action' => true, 'accept' => true, 'accept-charset' => true, 'enctype' => true, 'method' => true, 'name' => true, 'target' => true);
                /** This filter is documented in wp-includes/kses.php */
                $tags = apply_filters('wp_kses_allowed_html', $tags, $context);
            }
            return $tags;
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
            break;
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
            break;
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
            break;
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: 3.9

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 *
 * @param string $context The context for which to retrieve tags. Allowed values are
 *  post | strip | data | entities or the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        /**
         * Filter HTML elements allowed for a given context.
         *
         * @since 3.5.0
         *
         * @param string $tags    Allowed tags, attributes, and/or entities.
         * @param string $context Context to judge allowed tags by. Allowed values are 'post',
         *                        'data', 'strip', 'entities', 'explicit', or the name of a filter.
         */
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
            break;
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $tags, $context);
            break;
        case 'strip':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', array(), $context);
            break;
        case 'entities':
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
            break;
        case 'data':
        default:
            /** This filter is documented in wp-includes/kses.php */
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: 8.4

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 *
 * @param string $context The context for which to retrieve tags. Allowed values are
 *  post | strip | data | entities or the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            return apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
            break;
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            return apply_filters('wp_kses_allowed_html', $tags, $context);
            break;
        case 'strip':
            return apply_filters('wp_kses_allowed_html', array(), $context);
            break;
        case 'entities':
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
            break;
        case 'data':
        default:
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: .30

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 * @since 5.0.1 `form` removed as allowable HTML tag.
 *
 * @param string $context The context for which to retrieve tags. Allowed values are
 *  post | strip | data | entities or the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            $tags = apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
            // 5.0.1 removed the `<form>` tag, allow it if a filter is allowing it's sub-elements `<input>` or `<select>`.
            if (!CUSTOM_TAGS && !isset($tags['form']) && (isset($tags['input']) || isset($tags['select']))) {
                $tags = $allowedposttags;
                $tags['form'] = array('action' => true, 'accept' => true, 'accept-charset' => true, 'enctype' => true, 'method' => true, 'name' => true, 'target' => true);
                /** This filter is documented in wp-includes/kses.php */
                $tags = apply_filters('wp_kses_allowed_html', $tags, $context);
            }
            return $tags;
            break;
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            return apply_filters('wp_kses_allowed_html', $tags, $context);
            break;
        case 'strip':
            return apply_filters('wp_kses_allowed_html', array(), $context);
            break;
        case 'entities':
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
            break;
        case 'data':
        default:
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: 8.3

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 *
 * @param string $context The context for which to retrieve tags. Allowed values are
 *  post | strip | data | entities or the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            return apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
            break;
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            return apply_filters('wp_kses_allowed_html', $tags, $context);
            break;
        case 'strip':
            return apply_filters('wp_kses_allowed_html', array(), $context);
            break;
        case 'entities':
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
            break;
        case 'data':
        default:
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: .28

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 * @since 5.0.1 `form` removed as allowable HTML tag.
 *
 * @param string $context The context for which to retrieve tags. Allowed values are
 *  post | strip | data | entities or the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            $tags = apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
            // 5.0.1 removed the `<form>` tag, allow it if a filter is allowing it's sub-elements `<input>` or `<select>`.
            if (!CUSTOM_TAGS && !isset($tags['form']) && (isset($tags['input']) || isset($tags['select']))) {
                $tags = $allowedposttags;
                $tags['form'] = array('action' => true, 'accept' => true, 'accept-charset' => true, 'enctype' => true, 'method' => true, 'name' => true, 'target' => true);
                /** This filter is documented in wp-includes/kses.php */
                $tags = apply_filters('wp_kses_allowed_html', $tags, $context);
            }
            return $tags;
            break;
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            return apply_filters('wp_kses_allowed_html', $tags, $context);
            break;
        case 'strip':
            return apply_filters('wp_kses_allowed_html', array(), $context);
            break;
        case 'entities':
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
            break;
        case 'data':
        default:
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: 7.5

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 *
 * @param string $context The context for which to retrieve tags. Allowed values are
 *  post | strip | data | entities or the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            return apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
            break;
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            return apply_filters('wp_kses_allowed_html', $tags, $context);
            break;
        case 'strip':
            return apply_filters('wp_kses_allowed_html', array(), $context);
            break;
        case 'entities':
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
            break;
        case 'data':
        default:
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: .40

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 * @since 5.0.1 `form` removed as allowable HTML tag.
 *
 * @param string $context The context for which to retrieve tags. Allowed values are
 *  post | strip | data | entities or the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            $tags = apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
            // 5.0.1 removed the `<form>` tag, allow it if a filter is allowing it's sub-elements `<input>` or `<select>`.
            if (!CUSTOM_TAGS && !isset($tags['form']) && (isset($tags['input']) || isset($tags['select']))) {
                $tags = $allowedposttags;
                $tags['form'] = array('action' => true, 'accept' => true, 'accept-charset' => true, 'enctype' => true, 'method' => true, 'name' => true, 'target' => true);
                /** This filter is documented in wp-includes/kses.php */
                $tags = apply_filters('wp_kses_allowed_html', $tags, $context);
            }
            return $tags;
            break;
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            return apply_filters('wp_kses_allowed_html', $tags, $context);
            break;
        case 'strip':
            return apply_filters('wp_kses_allowed_html', array(), $context);
            break;
        case 'entities':
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
            break;
        case 'data':
        default:
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: 7.4

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 *
 * @param string $context The context for which to retrieve tags. Allowed values are
 *  post | strip | data | entities or the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            return apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
            break;
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            return apply_filters('wp_kses_allowed_html', $tags, $context);
            break;
        case 'strip':
            return apply_filters('wp_kses_allowed_html', array(), $context);
            break;
        case 'entities':
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
            break;
        case 'data':
        default:
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: .30

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 * @since 5.0.1 `form` removed as allowable HTML tag.
 *
 * @param string $context The context for which to retrieve tags. Allowed values are
 *  post | strip | data | entities or the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            $tags = apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
            // 5.0.1 removed the `<form>` tag, allow it if a filter is allowing it's sub-elements `<input>` or `<select>`.
            if (!CUSTOM_TAGS && !isset($tags['form']) && (isset($tags['input']) || isset($tags['select']))) {
                $tags = $allowedposttags;
                $tags['form'] = array('action' => true, 'accept' => true, 'accept-charset' => true, 'enctype' => true, 'method' => true, 'name' => true, 'target' => true);
                /** This filter is documented in wp-includes/kses.php */
                $tags = apply_filters('wp_kses_allowed_html', $tags, $context);
            }
            return $tags;
            break;
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            return apply_filters('wp_kses_allowed_html', $tags, $context);
            break;
        case 'strip':
            return apply_filters('wp_kses_allowed_html', array(), $context);
            break;
        case 'entities':
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
            break;
        case 'data':
        default:
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: 7.3

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 *
 * @param string $context The context for which to retrieve tags. Allowed values are
 *  post | strip | data | entities or the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            return apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
            break;
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            return apply_filters('wp_kses_allowed_html', $tags, $context);
            break;
        case 'strip':
            return apply_filters('wp_kses_allowed_html', array(), $context);
            break;
        case 'entities':
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
            break;
        case 'data':
        default:
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: .28

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 * @since 5.0.1 `form` removed as allowable HTML tag.
 *
 * @param string $context The context for which to retrieve tags. Allowed values are
 *  post | strip | data | entities or the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            $tags = apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
            // 5.0.1 removed the `<form>` tag, allow it if a filter is allowing it's sub-elements `<input>` or `<select>`.
            if (!CUSTOM_TAGS && !isset($tags['form']) && (isset($tags['input']) || isset($tags['select']))) {
                $tags = $allowedposttags;
                $tags['form'] = array('action' => true, 'accept' => true, 'accept-charset' => true, 'enctype' => true, 'method' => true, 'name' => true, 'target' => true);
                /** This filter is documented in wp-includes/kses.php */
                $tags = apply_filters('wp_kses_allowed_html', $tags, $context);
            }
            return $tags;
            break;
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            return apply_filters('wp_kses_allowed_html', $tags, $context);
            break;
        case 'strip':
            return apply_filters('wp_kses_allowed_html', array(), $context);
            break;
        case 'entities':
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
            break;
        case 'data':
        default:
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}

WordPress Version: 3.7

/**
 * Return a list of allowed tags and attributes for a given context.
 *
 * @since 3.5.0
 *
 * @param string $context The context for which to retrieve tags. Allowed values are
 *  post | strip | data | entities or the name of a field filter such as pre_user_description.
 * @return array List of allowed tags and their allowed attributes.
 */
function wp_kses_allowed_html($context = '')
{
    global $allowedposttags, $allowedtags, $allowedentitynames;
    if (is_array($context)) {
        return apply_filters('wp_kses_allowed_html', $context, 'explicit');
    }
    switch ($context) {
        case 'post':
            return apply_filters('wp_kses_allowed_html', $allowedposttags, $context);
            break;
        case 'user_description':
        case 'pre_user_description':
            $tags = $allowedtags;
            $tags['a']['rel'] = true;
            return apply_filters('wp_kses_allowed_html', $tags, $context);
            break;
        case 'strip':
            return apply_filters('wp_kses_allowed_html', array(), $context);
            break;
        case 'entities':
            return apply_filters('wp_kses_allowed_html', $allowedentitynames, $context);
            break;
        case 'data':
        default:
            return apply_filters('wp_kses_allowed_html', $allowedtags, $context);
    }
}