Description
Implement links to a list of classes[classes classes=class-name] alternatively [classes WC_Widget] will return the values in $atts[0] and $atts[1] so we can get the API names from there! How about? [classes "bbboing_sc fiddle" ]
Usage
oikai_classlink( $atts, $content, $tag );Parameters
- $atts
- ( mixed ) required –
- $content
- ( mixed ) required –
- $tag
- ( mixed ) required –
Returns
voidSource
File name: oik-shortcodes/shortcodes/oik-classlink.phpLines:
1 to 15 of 15
function oikai_classlink( $atts, $content, $tag ) { $class = bw_array_get( $atts, "classes", null ); $classes = bw_as_array( $class ); $unkeyed = bw_array_get_unkeyed( $atts ); $classes = array_merge( $classes, $unkeyed ); bw_trace2( $classes, "classes" ); if ( count( $classes) ) { oikai_list_classes_byname( $classes, $atts ); } else { oikai_listclasses( $atts ); } return( bw_ret()); }View on GitHub
Called by
Invoked by
Calls
1 to 6 of 6
- bw_array_get() – Return the array[index] or array->index (for an object) or a default value if not set
- bw_as_array() – Split a string into an array if necessary
- 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
- oikai_listclasses() – Automagically determine the class list
- oikai_list_classes_byname() – Produce a list of classes as links
