You appear to be a bot. Output may be restricted
Description
Implement [bw_blog] shortcode to select the blog to be used in subsequent shortcodes
Usage
$string = bw_blog( $atts, $content, $tag );
Parameters
- $atts
- ( array ) optional – expected to either contain "blog" or uses the index 0 values
- $content
- ( string ) optional – not expected
- $tag
- ( string ) optional – the shortcode used
Returns
string nothing is generated directly by this shortcodeSource
File name: oik-ms/shortcodes/oik-blog.phpLines:
1 to 13 of 13
function bw_blog( $atts=null, $content=null, $tag=null ) { if ( is_multisite() ) { $blog = bw_array_get_from( $atts, "blog,0", null ); if ( $blog ) { switch_to_blog( $blog ); } else { restore_current_blog(); } } else { bw_trace2( "Shortcode not effective in a non-multisite implementation" ); } return( bw_ret() ); }View on GitHub