Description
Implement [bw_css] shortcode
Usage
$string = oik_css( $atts, $content, $tag );Parameters
- $atts
- ( array ) optional – array of shortcode parameters
- $content
- ( string ) optional – the CSS to be put into the page
- $tag
- ( string ) optional – the shortcode tag – not expected
Returns
string any text to be put onto the pageSource
File name: oik-css/shortcodes/oik-css.phpLines:
1 to 20 of 20
function oik_css( $atts=null, $content=null, $tag=null ) { if ( !$content ) { oik_require_lib( 'class-oik-attachment-contents'); if ( class_exists( 'Oik_attachment_contents') ) { $oik_attachment_contents=new Oik_attachment_contents(); $content=$oik_attachment_contents->get_content( $atts, $content ); } else { e( "Oik_attachment_contents not loaded"); } } if ( $content ) { sdiv(); $dec = bw_remove_unwanted_tags( $content ); $dec = bw_detexturize( $dec ); bw_enqueue_style( $atts, $dec ); bw_format_style( $atts, $dec ); ediv(); } return( bw_ret() ); }View on GitHub View on Trac
Invoked by
Calls
1 to 5 of 5
- bw_detexturize() – Detexturize content
- bw_enqueue_style() – Enqueue the internal CSS styling
- bw_format_style() – Format the CSS as part of the content, if required
- bw_remove_unwanted_tags() – Remove unwanted tags introduced by other filters
- bw_ret() – Use bw_ret() to return the contents of $bwecho, leaving the global value as NULL
