Created
November 15, 2012 20:14
-
-
Save Pleiades/4080970 to your computer and use it in GitHub Desktop.
Add a Flickr Badge
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[flickrbadge count="4" layout="h" display="latest" size="t" source="all_tag" tag="fish"]Here’s the latest fish[/flickrbadge] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function flickr_badge_shortcode($atts, $content=NULL) { | |
$query_atts = shortcode_atts(array('count' => '6', 'display' => 'latest', 'source' => 'user', 'size' => 't', 'user' => '', 'layout' => 'x', 'tag' => '', 'group' => '', 'set' => ''), $atts); | |
return sprintf('<div class="flickr_badge"><h3>%s</h3>%MINIFYHTML4aa6a36d65c23758386d54e4aa7cef3c10%</div>', $content, http_build_query($query_atts)); | |
} | |
add_shortcode('flickrbadge', 'flickr_badge_shortcode'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment