Switch language

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




do_shortcode [ WordPress Function ]

do_shortcode ( $content )
Parameters:
  • (string) $content Content to search for shortcodes
Uses:
Returns:
  • (string) Content with shortcodes filtered out.
Defined at:



Search content for shortcodes and filter shortcodes through their hooks.

If there are no shortcode tags defined, then the content will be returned without any filtering. This might cause issues when plugins are disabled but the shortcode will still show up in the post or content.

Source


<?php
function do_shortcode($content) {
    global 
$shortcode_tags;

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

    
$pattern get_shortcode_regex();
    return 
preg_replace_callback"/$pattern/s"'do_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