This file contains 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
/** | |
* Appends a list of bookees to the event description. | |
* If you are selling tickets by 'date', it shows the bookees for each date. | |
*/ | |
function my_display_attendees( $content ){ | |
if( 'event' != get_post_type() || !is_singular( 'event' ) ){ | |
return $content; | |
} | |
This file contains 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
/** | |
* @author Franz Josef Kaiser http://unserkaiser.com/ | |
* @link http://chat.stackexchange.com/transcript/message/19439060#19439060 | |
*/ | |
// Allows registering Backbone templates as scripts | |
// Add type="text/template" and id="{handle}" for Backbones .tmpl <script>s | |
add_filter( 'script_loader_tag', function( $html, $handle, $src ) | |
{ | |
$dom = new \DOMDocument; |
This file contains 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 | |
/** | |
* Excludes bookings for other organisers from Event Organiser's Pro bookings admin page | |
* Applies only to users who do not have permission to manage others' bookings | |
* (see Settings > Event Organiser > Permissions). | |
*/ | |
function sod_eo_pro_bookings_for_event_organiser( $clauses, $query ){ | |
global $wpdb; |
This file contains 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 | |
/** | |
* Examples of filters themes can use to easily style Event Organiser Pro's booking form | |
* The classes used in this example should ensure the booking form looks native to | |
* any bootstrap based theme. | |
* Of course, you can change those classes to whatever your theme uses. | |
**/ | |
This file contains 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 | |
/* | |
* Plugin Name: Event Organiser iCal feed work around | |
* Version: 1.0 | |
* License: GNU General Public License, v2 (or newer) | |
* License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html | |
* Description: Implements a work around for feeds with invalid DTSTART/DTEND properties. | |
*/ | |
/** |
This file contains 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
# A oneline script to create tracking branches for all remote branches | |
# @see http://stackoverflow.com/a/4754797/932391 | |
# | |
git branch -a | grep -v HEAD | perl -ne 'chomp($_); s|^\*?\s*||; if (m|(.+)/(.+)| && not $d{$2}) {print qq(git branch --track $2 $1/$2\n)} else {$d{$_}=1}' | csh -xfs; |
This file contains 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 | |
/** | |
* Using WP-Member to hide / show content depending on various conditions. | |
* | |
* This displaying content depending on: | |
* * Whether the member has **only** the guest level attached to them (this includes, but not restricted to logged out users) | |
* * Whether the member has the level 'Some Level' attached to theme | |
* * Otherwise if the user is logged in, displays a different message. | |
* | |
*/ |
This file contains 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 | |
/** | |
* Get membership level ID by Name / Slug | |
*/ | |
//Be careful - the name is not unique! | |
$level = wpmember_get_level_by( 'name', 'Basic Subscription' ); | |
if( $level ){ | |
$level_id = $level->term_id; | |
}else{ | |
//Not found! |
This file contains 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 | |
/** | |
* Adds upcoming events to the venue tooltip in Event Organiser. | |
* | |
* Uses the eventorganiser_venue_tooltip filter to append content to the venue tooltip. This tooltip appears when | |
* clicking a venue on a map (if tooltips are enabled). | |
* @uses eventorganiser_venue_tooltip. | |
* | |
* The filter passes 2 objects: the content of the toolip, the venue (term) ID | |
* |