You appear to be a bot. Output may be restricted
Description
Implement a link to a (set of) shortcodes[codes codes=shortcode] [codes func=shortcode] – not yet implemented! alternatively [codes bbboing_sc fiddle] will return the values in $atts[0] and $atts[1] so we can get the API names from there! How about? [codes "bbboing_sc fiddle" ]
Usage
$string = oikai_codeslink( $atts, $content, $tag );
Parameters
- $atts
- ( array ) required – shortcode parameters
- $content
- ( string ) required – shortcode content – not expected
- $tag
- ( string ) required – shortcode name
Returns
string generated HTMLSource
File name: oik-shortcodes/shortcodes/oik-codeslink.phpLines:
1 to 26 of 26
function oikai_codeslink( $atts, $content, $tag ) { $shortcode = bw_array_get( $atts, "codes", null ); $shortcodes = bw_as_array( $shortcode ); $unkeyed = bw_array_get_unkeyed( $atts ); $shortcodes = array_merge( $shortcodes, $unkeyed ); bw_trace2( $shortcodes, "shortcodes", true, BW_TRACE_DEBUG ); if ( count( $shortcodes) ) { oik_require( "admin/oik-shortcodes.php", "oik-shortcodes" ); $posts = oiksc_get_shortcodes_bycode( $shortcodes ); if ( $posts ) { $class = bw_array_get( $atts, "class", "bw_codes" ); sul( $class ); foreach ( $posts as $post ) { bw_format_list( $post, $atts ); } eul(); } else { p( "Cannot find shortcode(s):" . implode( ",", $shortcodes) ); } } else { oikai_listcodes( $atts ); } return( bw_ret()); }View on GitHub