Description
Implement [bw_blogs] shortcode to list the blogs on the multisite
Usage
$string = bw_blogs( $atts, $content, $tag );Parameters
- $atts
- ( array ) optional – expected to either contain "blogs" or uses the index 0 values
- $content
- ( string ) optional – content to expand for each blog
- $tag
- ( string ) optional – the shortcode used
Returns
string nothing is generated directly by this shortcodeSource
File name: oik-ms/shortcodes/oik-blogs.phpLines:
1 to 14 of 14
function bw_blogs( $atts=null, $content=null, $tag=null ) { if ( is_multisite() ) { $blogs = bw_array_get_from( $atts, "blogs,0", null ); if ( $blogs ) { $blogs = bw_as_array( $blogs ); } else { $blogs = bw_get_blog_list(); } bw_display_blogs( $blogs, $atts, $content ); } else { bw_trace2( "bw_blogs shortcode not effective in a non-multisite implementation" ); } return( bw_ret() ); }View on GitHub
Called by
Invoked by
Calls
1 to 5 of 5
- bw_as_array() – Split a string into an array if necessary
- bw_display_blogs() – Display information about each blog in the array of blogs
- bw_get_blog_list() – List blogs in a WordPress MultiSite environment
- bw_ret() – Use bw_ret() to return the contents of $bwecho, leaving the global value as NULL
- bw_trace2() – Trace $value to the trace log file if tracing is active
Call hooks
API Letters:
