You appear to be a bot. Output may be restricted
Description
Implements the [bw_plug] shortcode
Notes:
- When the table parameter is set to true then the data is formatted in a table.
- A table header and footer is added.
Instead of coding: [bw_plug name='oik' table='y'][bw_plug name='wordpress-google-plus-one-button' table='y']
simplify it to [bw_plug name='oik,wordpress-google-plus-one-button' table='y']
In fact – you can omit the table= parameter since it's forced when there's more than one name.
Usage
$string = bw_plug( $atts, $content, $tag );
Parameters
- $atts
- ( array ) optional – shortcode parameters
- $content
- ( string ) optional – not expected
- $tag
- ( string ) optional – not expected
Returns
string generated HTML for the shortcode link or table of shortcodes
Source
File name: oik-bob-bing-wide/shortcodes/oik-plug.php
Lines:
1 to 58 of 58
function bw_plug( $atts=null, $content=null, $tag=null ) { $name = bw_array_get_from( $atts, 'name,0', 'oik' ); $link = bw_array_get( $atts, 'link', 'n' ); $table = bw_array_get( $atts, 'table', NULL ); $option = bw_array_get( $atts, 'option', NULL ); $banner = bw_array_get( $atts, 'banner', null ); bw_trace( $atts, __FUNCTION__, __LINE__, __FILE__, "atts" ); $table = bw_validate_torf( $table ); $link = bw_get_notes_page_url( $link ); //return( "bw_plug dummy" ); bw_trace( $table, __FUNCTION__, __LINE__, __FILE__, "table", BW_TRACE_DEBUG ); if ( !empty( $option ) ) { $names = bw_plug_list_plugins( $option ); } else { $name = wp_strip_all_tags( $name, TRUE ); $names = explode( ",", $name ); } // Force table format if there is more than one plugin name listed if ( count( $names) > 1 ) $table = true; bw_plug_table( $table ); foreach ( $names as $name ) { $name = bw_plugin_namify( $name ); $plugininfo = bw_get_plugin_info( $name, $table ); bw_trace( $plugininfo, __FUNCTION__, __LINE__, __FILE__, "plugininfo", BW_TRACE_INFO ); if ( is_array( $plugininfo ) ) { $plugininfo = (object) $plugininfo; } if ( is_wp_error( $plugininfo ) || !$plugininfo || !property_exists( $plugininfo, "name" ) ) { if ( $table ) { bw_format_plug_table( $name, $link, FALSE ); } else { bw_format_default( $name, $link ); } } else { $plugininfo->short_description = bw_get_property( $plugininfo, "short_description", null ); if ( $table ) { bw_format_plug_table( $name, $link, $plugininfo ); } else { bw_format_link( $name, $link, $plugininfo, $banner ); } } } bw_plug_etable( $table ); return( bw_ret()); }