You appear to be a bot. Output may be restricted
Description
Implement [bw_dash] shortcode
If there's any content then this is also displayed. The styling may be a little wonky. Originally the code created a div, now it creates a span This makes it easier to use dashicons inline.
Usage
$string = bw_dash( $atts, $content, $tag );
Parameters
- $atts
- ( array ) optional – shortcode parameters
- $content
- ( string ) optional – not (really) expected
- $tag
- ( string ) optional – shortcode tag
Returns
string generated HTML for the dash form
Source
File name: oik-bob-bing-wide/shortcodes/oik-dash.php
Lines:
1 to 34 of 34
function bw_dash( $atts=null, $content=null, $tag=null ) { //bw_trace2(); $icons = bw_array_get_from( $atts, "icon,0", "menu" ); $icons = bw_as_array( $icons ); $class = bw_array_get_from( $atts, "class,1", null ); $icon = bw_array_get( $icons, 0, null ); oik_require( "shortcodes/oik-dash-svg-list.php", "oik-bob-bing-wide" ); $svgicons = bw_dash_list_svg_icons(); $font_class = bw_dash_enqueue_font( $icon, $atts ); if ( $font_class === "svg" ) { foreach ( $icons as $icon ) { $dpath = bw_array_get( $svgicons, $icon, null ); bw_dash_svg_icon( $icon, $font_class, $class, $dpath ); } } else { foreach ( $icons as $icon ) { if ( !$font_class ) { $content = $icon . $content; $font_class = "texticons"; $icon = "unknown"; } //span( $class ); - temporarily added to test class=hide span( "$font_class ${font_class}-$icon $class" ); if ( $content ) { e( bw_do_shortcode( $content ) ); } //epan(); epan(); } } return( bw_ret() ); }