The `mesh_allowed_html` filter is used to sanitize content within mesh sections. If you have the need to override the base set of html you can easily filter the content accordingly. `mesh_allowed_html` builds on top of `wp_kses_allowed_html( ‘post’ );`
$mesh_allowed = apply_filters( 'mesh_default_allowed_html', array( 'iframe' => array( 'src' => true, 'style' => true, 'id' => true, 'class' => true, 'name' => true, 'allowfullscreen' => true, 'msallowfullscreen' => true, 'mozallowfullscreen' => true, 'webkitallowfullscreen' => true, 'oallowfullscreen' => true, 'allowtransparency' => true, 'frameborder' => true, 'scrolling' => true, 'width' => true, 'height' => true, ), 'script' => array( 'src' => true, ), 'div' => array( 'data-equalizer' => true, 'data-equalizer-watch' => true, 'data-interchange' => true, 'data-lp-equal' => true, 'data-lp-equal-items' => true, 'data-lp-equal-children' => true, ), 'span' => array( 'class' => true, 'style' => true, 'id' => true, 'data-equalizer' => true, 'data-equalizer-watch' => true, 'data-interchange' => true, 'data-lp-equal' => true, 'data-lp-equal-items' => true, 'data-lp-equal-children' => true, ), ) ); $post_allowed = wp_kses_allowed_html( 'post' ); return apply_filters( 'mesh_allowed_html', array_merge_recursive( $post_allowed, $mesh_allowed ) );
Allow an anchor tag to have a custom attribute.
function rebar_allowed_html( $allowed_html ) { $allowed_html['a']['custom-attribute'] = true; return $allowed_html; } add_filter( 'mesh_allowed_html', rebar_allowed_html, 10, 1 );