You appear to be a bot. Output may be restricted
Description
Expand an oik DIY shortcode – improved versionThe original function had some battles with other plugins and functions handling 'the_content' when all we wanted to do was expand the shortcodes. I changed it to use 'get_the_excerpt' which fixed the problems with Jetpack but then Add-To-Any started messing about. So now we call do_shortcode() directly. The question is… what will shortcodes do if they inspect the current_filter? Let's assume they're OK.
Usage
$string = diy_oik_do_shortcode_simplified( $atts, $hmm, $tag );
Parameters
- $atts
- ( array ) required – shortcode parameters
- $hmm
- ( string ) required – shortcode content – not expected
- $tag
- ( string ) required – shortcode tag
Returns
string the generated HTMLSource
File name: diy-oik/shortcodes/diy-oik.phpLines:
1 to 11 of 11
function diy_oik_do_shortcode_simplified( $atts=null, $hmm, $tag ) { $code = bw_array_get( $atts, 0, $tag ); $diy_code = bw_get_option( $code, "diy_codes" ); $content = bw_array_get( $diy_code, "content", "" ); $content = stripslashes( $content ); bw_push(); $content = do_shortcode( $content ); bw_pop(); return( $content ); }