Skip to content

Instantly share code, notes, and snippets.

@elimn
elimn / functions.php
Last active March 16, 2017 17:26
MT | TEC | Always show Next/Prev links in Month View
<?php
/**
* Allows visitors to page forward/backwards in any direction within month view
* an "infinite" number of times (ie, outwith the populated range of months).
*/
class ContinualMonthViewPagination {
public function __construct() {
add_filter( 'tribe_events_the_next_month_link', array( $this, 'next_month' ) );
add_filter( 'tribe_events_the_previous_month_link', array( $this, 'previous_month' ) );
@bekarice
bekarice / wc-coa-conditional-addons.php
Created December 23, 2014 02:23
WooCommerce Checkout Add-ons conditional display
/**
* Conditionally show gift add-ons if shipping address differs from billing
**/
function wc_checkout_add_ons_conditionally_show_gift_add_on() {
wc_enqueue_js( "
$( 'input[name=ship_to_different_address]' ).change( function () {
if ( $( this ).is( ':checked' ) ) {
@jesseeproductions
jesseeproductions / ecp-hide-jet-rel
Created January 22, 2015 00:55
Hide JetPack Related Events on the Events Calendar Posts
function jetpackme_no_related_posts( $options ) {
if ( is_singular( 'tribe_events' ) ) {
$options['enabled'] = false;
}
return $options;
}
add_filter( 'jetpack_relatedposts_filter_options', 'jetpackme_no_related_posts' );