helpful/kses/allowed_tags

With this filter, you can define the allowed HTML tags and their attributes. You can also find here the allowed HTML tags.

/**
 * Enables the use of input HTML tags.
 *
 * @param array $tags
 *
 * @return array
 */
add_filter('helpful/kses/allowed_tags', function( $tags ) {

    $tags['input'] = [
        'type' => '',
        'value' => '',
        'placeholder' => '',
        'class' => '',
    ];

    return $tags;
});

These HTML tags are allowed by default:

  • a
    • class
    • href
    • title
  • br
    • class
  • em
    • class
  • strong
    • class
  • hr
    • class
  • p
    • class
  • div
    • class

Was this post helpful?

Top