Skip to content

Instantly share code, notes, and snippets.

@Shelob9
Created May 27, 2013 22:07
Show Gist options
  • Save Shelob9/5659317 to your computer and use it in GitHub Desktop.
Save Shelob9/5659317 to your computer and use it in GitHub Desktop.
2 WordPress shortcodes for use with Foundation. One for tooltips and one for blockquotes. Check out https://github.com/drewsymo/Foundation/blob/master/inc/shortcodes.php for some good grid shortcodes.
//shortcode for tool-tip drop-down
// [tooltip dropdown="What goes in drop down"]content[/tooltip]
function jp_tooltip($atts, $content = null) {
extract(shortcode_atts(array(
'dropdown' => ' '
), $atts));
return '<span data-tool-tip class="has-tip" title="'.$dropdown.'">'.$content.'</span>';
}
add_shortcode("tooltip", "jp_tooltip");
//blockquote shortcode [blockquote source="attribution"]content[/blockquote]
function jp_blockquote($atts, $content = null) {
extract(shortcode_atts(array(
'source' => ' '
), $atts));
return '<blockquote><p>'.$content.'</p><cite>'.$source.'</cite></blockquote>';
}
add_shortcode("blockquote", "pp_blockquote");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment