wp_kses_allowed_html

wp_kses_allowed_html

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('wp_kses_allowed_html') is found 7 times:

  • /wp-includes/kses.php line 869
    865
    866
    867
    868
    869
    870
    871
    872
    873
    874
    875
         *
         * @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 );
  • /wp-includes/kses.php line 875
    872
    873
    874
    875
    876
    877
    878
    879
    880
    881
    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(
  • /wp-includes/kses.php line 892
    888
    889
    890
    891
    892
    893
    894
    895
    896
    897
    898
                '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':
  • /wp-includes/kses.php line 902
    898
    899
    900
    901
    902
    903
    904
    905
    906
    907
    908
    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':
  • /wp-includes/kses.php line 906
    902
    903
    904
    905
    906
    907
    908
    909
    910
    911
    912
        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':
  • /wp-includes/kses.php line 910
    906
    907
    908
    909
    910
    911
    912
    913
    914
    915
    916
            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 );
    }
  • /wp-includes/kses.php line 915
    912
    913
    914
    915
    916
    917
    918
    919
    920
    921
            case 'data':
            default:
                /** This filter is documented in wp-includes/kses.php */
                return apply_filters( 'wp_kses_allowed_html', $allowedtags, $context );
        }
    }
     
    /**
     * You add any KSES hooks here.
     *

See this hook used in plugins: