Skip to content

Instantly share code, notes, and snippets.

Barry Hughes barryhughes

Block or report user

Report or block barryhughes

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:6223742
/**
* Tries to force the minicalendar widget to show the month of the next upcoming event by default, rather
* than simply showing the current month (which might be empty).
*/
class Tribe_Advance_Minical
{
protected $target_date = false;
/**
View gist:6455186
Products
========
"Advanced Ruby" (downloadable product)
"Matz' Examples" (downloadable addon for the above)
Purchases
=========
@barryhughes
barryhughes / WP 3.7 Shopp 1.2.9 Compatibility Fix.php
Last active Dec 26, 2015
Fix for WP 3.7 / Shopp 1.2.9 storefront compatibility issue. The opening <?php tag is purely for nice Gist formatting, it won't generally be needed if this is dropped into an existing functions.php file
View WP 3.7 Shopp 1.2.9 Compatibility Fix.php
<?php
add_action('shopp_storefront_init', 'shopp_storefront_wp37_compat');
function shopp_storefront_wp37_compat() {
add_filter('archive_template', array(ShoppStorefront(), 'pages'));
}
@barryhughes
barryhughes / gist:7435216
Created Nov 12, 2013
find_wpload() issue
View gist:7435216
public_html
|
+-------------+-------+-------+-------------+
| | | |
wordpress1 wordpress2 wordpress3 wordpress4
^ ^
find_wpload() but we really
may hit on this want this one
installation first
View gist:7693185
add_filter( 'tribe-events-bar-filters', 'setup_my_field_in_bar', 1, 1 );
function setup_my_field_in_bar( $filters ) {
$filters['tribe-bar-my-field'] = array(
'name' => 'tribe-bar-my-field',
'caption' => 'My Field',
'html' => '<input type="text" name="tribe-bar-my-field" id="tribe-bar-my-field">'
);
return $filters;
View gist:7693226
add_filter( 'tribe_events_pre_get_posts', 'setup_my_bar_field_in_query', 10, 1 );
function setup_my_bar_field_in_query( $query ){
if ( !empty( $_REQUEST['tribe-bar-my-field'] ) ) {
$query->query_vars['my_var'] = $_REQUEST['tribe-bar-my-field'];
}
return $query;
}
View gist:7693244
add_filter( 'tribe-events-bar-views', 'my_setup_view_for_bar', 10);
function my_setup_view_for_bar( $views ) {
$tec = TribeEvents::instance();
$views[] = array('displaying' => 'myview', 'anchor' => 'My view', 'url' => $tec->getOption( 'eventsSlug', 'events' ) . '/my_view_slug' );
return $views;
}
View gist:7693253
add_filter( 'tribe-events-bar-views', 'setup_listview_in_bar', 1, 1 );
add_filter( 'tribe-events-bar-views', 'setup_gridview_in_bar', 5, 1 );
function setup_listview_in_bar( $views ) {
$views[] = array( 'displaying' => 'upcoming', 'anchor' => 'List View', 'url' => tribe_get_listview_link() );
return $views;
}
function setup_gridview_in_bar( $views ) {
$views[] = array( 'displaying' => 'month', 'anchor' => 'Calendar', 'url' => tribe_get_gridview_link() );
View gist:7919788
<?php
// If there's a taxonomy
if ( is_tax() ) {
$term = get_queried_object();
if ( $term ) {
$tax = get_taxonomy( $term->taxonomy );
$title = single_term_title( $tax->labels->name . $t_sep, false );
}
}
View gist:9746674

Team 8 Concession Duty

No volunteers yet!

We have been asked to cover 12.10pm - 1.20pm on March 29 (so the times have since changed, originally we were to provide volunteers later in the afternoon).

Contact me by email / add a comment if you are available to help out.

You can’t perform that action at this time.