Switch language

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




strip_shortcodes [ WordPress Function ]

strip_shortcodes ( $content )
Parameters:
  • (string) $content Content to remove shortcode tags.
Uses:
  • $shortcode_tags
Returns:
  • (string) Content without shortcode tags.
Defined at:



Remove all shortcode tags from the given content.

Source


<?php
function strip_shortcodes$content ) {
    global 
$shortcode_tags;

    if (empty(
$shortcode_tags) || !is_array($shortcode_tags))
        return 
$content;

    
$pattern get_shortcode_regex();

    return 
preg_replace_callback"/$pattern/s"'strip_shortcode_tag'$content );
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



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