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
| if ( version_compare( PARENT_THEME_VERSION, '1.7.9', '>' ) ) { | |
| include_once( CHILD_DIR . '/lib/admin/admin.php' ); | |
| include_once( CHILD_DIR . '/lib/admin/front.php' ); | |
| include_once( CHILD_DIR . '/lib/widgets/radio-latest-news-widget.php' ); | |
| } |
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
| <form method="post" class="wl_add_item"> | |
| <input type="hidden" name="wl_add_quantity" value="1" /> | |
| <input type="hidden" name="wl_add_post_id" value="107" /> | |
| <input type="image" title="Increase quantity" src="http://npp-dev.se/hagabergs/wp-content/plugins/wishlist/add.png" value="submit" /> | |
| </form> | |
| <form method="post" class="wl_remove_item"> | |
| <input type="hidden" name="wl_remove_quantity" value="1" /> | |
| <input type="hidden" name="wl_remove_post_id" value="107" /> | |
| <input type="image" title="Decrease quantity" src="http://npp-dev.se/hagabergs/wp-content/plugins/wishlist/remove.png" value="submit" /> |
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
| <?php | |
| add_action( 'wp_ajax_myajax-submit', 'tgm_process_ajax' ); | |
| add_action( 'wp_ajax_nopriv_myajax-submit', 'tgm_process_ajax' ); | |
| function tgm_process_ajax() { | |
| $data = array( | |
| 'quantity' => $_POST['wl_quantity'], | |
| 'post_id' => $_POST['wl_post_id'] | |
| ); | |
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
| <?php | |
| add_action( 'wp_ajax_myajax-submit', 'tgm_process_ajax' ); | |
| add_action( 'wp_ajax_nopriv_myajax-submit', 'tgm_process_ajax' ); | |
| function tgm_process_ajax() { | |
| $data = array( | |
| 'quantity' => $_POST['wl_quantity'], | |
| 'post_id' => $_POST['wl_post_id'] | |
| ); | |
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
| jQuery(document).ready(function($) { | |
| $('.wl_add_item, .wl_remove_item').submit(function(e) { | |
| e.preventDefault(); | |
| /** Determine if we are adding or removing items and build variables from there */ | |
| var current_object = $(this); // Get the current object - we will use it when appending stuff | |
| var action_type = $(this).attr('class'); | |
| if ( 'wl_add_item' == action_type ) { | |
| var process_this = 'add'; | |
| var quantity = $(this).find('input[name="wl_add_quantity"]').val(); |
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
| $terms = wp_get_object_terms( $post->ID, 'sermon-series' ); | |
| $args = array( | |
| 'post_type' => 'sermons', | |
| 'posts_per_page' => 2, | |
| 'tax_query' => array( | |
| array( | |
| 'taxonomy' => 'sermon-series', | |
| 'field' => 'id', | |
| 'terms' => $terms[0]->term_id | |
| ) |
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
| social_tools: '<div class="pp_social"><div class="twitter"><a href="http://twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div></div>', |
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
| <?php | |
| global $current_screen; | |
| if ( 'YOUR POST TYPE HERE' == $current_screen->post_type && 'post' == $current_screen->base ) | |
| // Do something here |
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
| $('.theme-hover .thumb').on({ | |
| mouseenter: function() { | |
| $(this).parent().parent().find('.preview-image').show(); | |
| }, | |
| mouseleave: function () { | |
| $(this).parent().parent().find('.preview-image').hide(); | |
| } | |
| }); |
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
| <?php | |
| /** Store oEmbed results in a transient */ | |
| if ( false === ( $tweets = get_site_transient( 'tgm_get_tweets' ) ) { | |
| $tweets = wp_oembed_get( $url, $args ); | |
| if ( ! $tweets ) // wp_oembed_get returns false on failure | |
| $tweets = *get your old tweets from here*; | |
| set_site_transient( 'tgm_get_tweets', $tweets, 60*60*24 ); | |
| } |