Description
Implement [bw_instagram] shortcodeInstagram provides the inline CSS and HTML below from @link http://instagram.com/accounts/badges/ but [bw_instagram] just uses a simplified version of the image: instagram_48.png echo "<style>.ig-b- { display: inline-block; }"; echo ".ig-b- img { visibility: hidden; }"; echo ".ig-b-:hover { background-position: 0 -60px; } .ig-b-:active { background-position: 0 -120px; }"; echo ".ig-b-48 { width: 48px; height: 48px; background: url(//badges.instagram.com/static/images/ig-badge-sprite-48.png) no-repeat 0 0; }"; echo "@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min–moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2 / 1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) { "; echo ".ig-b-48 { background-image: url(//badges.instagram.com/static/images/ig-badge-sprite-48@2x.png); background-size: 60px 178px; } }</style>"; echo '<a href="http://instagram.com/bobbingwide?ref=badge" class="ig-b- ig-b-48"><img src="//badges.instagram.com/static/images/ig-badge-48.png" alt="Instagram" /></a>';
Usage
bw_instagram( $atts );Parameters
- $atts
- ( mixed ) optional –
Returns
voidSource
File name: oik/shortcodes/oik-follow.phpLines:
function bw_instagram( $atts=null ) { $atts['network'] = "Instagram"; return( bw_follow( $atts )); }View on GitHub View on Trac
