You appear to be a bot. Output may be restricted
Description
Displays a default Follow me link using oik icons- Now supports two sets: new and old
- The original solution ( from 2011 to Sep 2017) used .png files of 48×48 pixels called $lc_social_48.png
- These original files are now copied to $lc_social_old.png
- To use the original files pass the class name of "old" in the class= parameter.
- To use the new files don't use class name of old.
$class | suffix used | class used |
---|---|---|
contains “old” | old | as passed |
null | 48 | bw_follow_new |
other | 48 | other with ” bw_follow_new” appended |
Usage
bw_follow_link_( $social, $lc_social, $social_network, $me, $class );
Parameters
- $social
- ( string ) required – The social network URL
- $lc_social
- ( string ) required – lower case social network
- $social_network
- ( string ) required – untranslated social network
- $me
- ( string ) required – whoever me has resolved to be
- $class
- ( string ) required – CSS classes for styling
Returns
voidSource
File name: oik/shortcodes/oik-follow.phpLines:
1 to 13 of 13
function bw_follow_link_( $social, $lc_social, $social_network, $me, $class ) { $suffix = "48"; if ( null !== $class && false !== strpos( $class, "old" ) ) { $suffix = "old"; } else { $class .= " bw_follow_new"; } $imagefile = oik_url( 'images/'. $lc_social . '_' . $suffix . '.png' ); $follow_me_tooltip = sprintf( __( 'Follow %1$s on %2$s', "oik" ), $me, $social_network ); $image = retimage( "bw_follow ", $imagefile, $follow_me_tooltip ); $image .= bw_follow_hash_at( $me ); BW_::alink( $class , $social, $image, $follow_me_tooltip ); }View on GitHub View on Trac