You appear to be a bot. Output may be restricted
Description
Expand the shortcodeReturns the cached version if available Note: The cached version may have been created for a different locale In tests we might need to reset it by calling bw_expand_shortcode with null
Usage
$string = bw_expand_shortcode( $example );
Parameters
- $example
- ( string|null ) optional – shortcode to be expanded
Returns
string the generated HTMLSource
File name: oik/libs/oik-sc-help.phpLines:
1 to 19 of 19
function bw_expand_shortcode( $example=null ) { static $previous_example = null; static $previous_expanded = null; static $previous_locale = null; $locale = get_locale(); if ( ( $previous_example == $example ) && ( $previous_locale == $locale ) ) { $expanded = $previous_expanded; } else { bw_save_scripts(); bw_push(); $expanded = apply_filters( 'the_content', $example ); bw_pop(); bw_save_scripts(); $previous_example = $example; $previous_expanded = $expanded; $previous_locale = $locale; } return $expanded; }View on GitHub View on Trac