Created
May 27, 2013 22:07
-
-
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.
This file contains hidden or 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
| //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