When using shortcodes in WordPress like so:
[shortcode]
Content goes here...
[/shortcode]
| #!/usr/bin/env python | |
| import sys, os | |
| import poppler | |
| import cairo | |
| if __name__ == '__main__': | |
| uri = 'file://%s' % os.path.abspath(sys.argv[1]) | |
| prefix = sys.argv[2] | |
| width = int(sys.argv[3]) |
| </php | |
| /** | |
| * Facebook Page Feed Parser | |
| * | |
| * @using cURL | |
| */ | |
| function fb_parse_feed( $page_id, $no = 5 ) { | |
| // URL to the Facebook page's RSS feed. |
| // We use embed.ly to help with oembeds that aren't very clean | |
| // Define our API KEY | |
| define('EMBEDLY_KEY','YOUR_KEY_HERE'); | |
| // remove default polldaddy provider because its broken | |
| // this can be removed when WP removes support for polldaddy | |
| // see http://core.trac.wordpress.org/ticket/24395 | |
| wp_oembed_remove_provider( '#https?://(.+\.)?polldaddy\.com/.*#i' ); | |
| <?php | |
| /** | |
| * Retrieves the thumbnail URL to use for a post | |
| * @param string $text The body of the post (get_content) | |
| * @param string $size The image size to retrieve | |
| * @return string The image URL to use | |
| */ | |
| function rw_get_thumb_url($text, $size){ | |
| global $post; |
| // General | |
| button_tile_map : true, | |
| editor_selector : 'lg_mceEditor', | |
| mode:'textareas', | |
| theme : 'advanced', | |
| // Cleanup/Output | |
| apply_source_formatting : true, | |
| convert_fonts_to_spans : true, | |
| convert_newlines_to_brs : false, |
| <h3>My Picture (1)</h3> | |
| <input type="text" id="my_media_1" name="my_media_1" value="" /> | |
| <a class="media-upload" href="JavaScript:void(0);" rel="my_media_1">Select File</a> | |
| <h3>My Picture (2)</h3> | |
| <input type="text" id="my_media_2" name="my_media_2" value="" /> | |
| <a class="media-upload" href="JavaScript:void(0);" rel="my_media_2">Select File</a> |
| <?php | |
| /** | |
| * start the customisation | |
| */ | |
| function custom_woo_before_shop_link() { | |
| add_filter('woocommerce_loop_add_to_cart_link', 'custom_woo_loop_add_to_cart_link', 10, 2); | |
| add_action('woocommerce_after_shop_loop', 'custom_woo_after_shop_loop'); | |
| } | |
| add_action('woocommerce_before_shop_loop', 'custom_woo_before_shop_link'); |
| <?php | |
| /** | |
| * Template Name: Google+ Feed | |
| */ | |
| /** | |
| * A WordPress page template for a Google+ feed. | |
| * | |
| * @author Dominik Schilling |