Description
Create a plugin banner linkThe link used to be to s-plugins.wordpress.org, then changed to ps.w.org sometime in 2016
Usage
$string = bw_link_plugin_banner( $name, $plugininfo, $banner );Parameters
- $name
- ( string ) required – the plugin name
- $plugininfo
- ( array ) required –
- $banner
- ( string ) required –
Returns
string a link to the plugin via the banner imageSource
File name: oik-bob-bing-wide/shortcodes/oik-plug.phpLines:
1 to 36 of 36
function bw_link_plugin_banner( $name, $plugininfo, $banner ) { if ( $banner ) { switch ( strtolower( substr( $banner, 0, 1) ) ) { case 'y': $file = bw_get_banner_file_URL( $name, $plugininfo ); if ( $file ) { $image = retimage( "bw_banner", $file, $name ); //alink( "bw_banner", $plugininfo->oik_server, $image, $file ); // 2014/03/01 - trying homepage again. alink( "bw_banner", $plugininfo->homepage, $image, $file ); } else { bw_trace2( "Cannot determine banner file URL" ); } break; case 'p': // Deliver a .png style banner image from WordPress.org $banner_type = ".png"; // $file = "https://ps.w.org/$name/assets/banner-772x250$banner_type"; $image = retimage( "bw_banner", $file, $name ); alink( "bw_banner", "https://wordpress.org/plugins/$name", $image, $file ); break; case 'j': default: // Deliver a .jpg banner image from WordPress.org $banner_type = ".jpg"; $file = "https://ps.w.org/$name/assets/banner-772x250$banner_type"; $image = retimage( "bw_banner", $file, $name ); alink( "bw_banner", "https://wordpress.org/plugins/$name", $image, $file ); break; } } }View on GitHub
Invoked by
Calls
1 to 4 of 4
Call hooks
API Letters:
