Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




wp_kses_split [ WordPress Function ]

wp_kses_split ( $string, $allowed_html, $allowed_protocols )
Parameters:
  • (string) $string Content to filter
  • (array) $allowed_html Allowed HTML elements
  • (array) $allowed_protocols Allowed protocols to keep
Returns:
  • (string) Content with fixed HTML tags
Defined at:



Searches for HTML tags, no matter how malformed.

It also matches stray ">" characters.

Source


<?php
function wp_kses_split($string$allowed_html$allowed_protocols) {
    global 
$pass_allowed_html$pass_allowed_protocols;
    
$pass_allowed_html $allowed_html;
    
$pass_allowed_protocols $allowed_protocols;
    return 
preg_replace_callback'%(<!--.*?(-->|$))|(<[^>]*(>|$)|>)%''_wp_kses_split_callback'$string );
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics