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 | |
/** | |
* Sets the status of Community Events to the default status after they have been edited | |
* | |
* When you set Community submitted events to a status like "Pending Review" and a | |
* user submits a new event, it will be marked Pending Review and will not be visible | |
* until an admin publishes it. However if a user edits this event after it has been | |
* published, it will stay published. With this code it will instead go to Pending Review | |
* and will again be removed from public view until an admin republishes the event. |
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 | |
/** | |
* Remove the Tribe Customier css <script> | |
*/ | |
function tribe_remove_customizer_css(){ | |
if ( class_exists( 'Tribe__Customizer' ) ) { | |
remove_action( 'wp_print_footer_scripts', array( Tribe__Customizer::instance(), 'print_css_template' ), 15 ); | |
} | |
} |
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 | |
// Checks the URL for the debug parameter | |
// example.com/event/event-name/?tribe_query_debug=true | |
function tribe_events_pre_get_posts_dumper ($query) { | |
$show_debug_info = isset($_GET['tribe_query_debug']) ? $_GET['tribe_query_debug'] : false; | |
if(($show_debug_info == "true" && $query->is_main_query() === true) || $show_debug_info == "full") { | |
echo "<h3><Tribe Events Query></h3>"; | |
tribe_spit_it_out($query); |
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 | |
/* | |
* Hide end time in list, map, photo, and single event view | |
* NOTE: This will only hide the end time for events that end on the same day | |
*/ | |
function tribe_remove_end_time_single( $formatting_details ) { | |
$formatting_details['show_end_time'] = 0; | |
return $formatting_details; |
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 | |
/* | |
* Prevents Next/Prev pages from being loaded via Ajax in List and Month views | |
*/ | |
function tribe_prevent_ajax_paging() { | |
echo " | |
<script> | |
jQuery(document).ready(function(){ |
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 | |
/* | |
* Possible solution for Single Event page 404 errors where the WP_Query has an attachment set | |
* IMPORTANT: Flush permalinks after pasting this code: http://tri.be/support/documentation/troubleshooting-404-errors/ | |
*/ | |
function tribe_attachment_404_fix () { | |
if (class_exists('TribeEvents')) { | |
remove_action( 'init', array( TribeEvents::instance(), 'init' ), 10 ); | |
add_action( 'init', array( TribeEvents::instance(), 'init' ), 1 ); |
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 | |
/** | |
* Customized version of the Time of Day filter that allows selecting by specific hour ranges in the afternoon | |
* New filter available in WP-Admin > Events > Settings > Filters | |
*/ | |
if ( class_exists( 'Tribe__Events__Filterbar__Filter' ) ) { | |
class Tribe__Events__Filterbar__Filters__Time_Of_Day_Custom extends Tribe__Events__Filterbar__Filter { | |
public $type = 'checkbox'; |
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 | |
/* | |
* Swaps the canonical URL for the /all/ page on recurring events | |
*/ | |
function tribe_recurring_canonical_adjuster() { | |
if ( ! tribe_is_recurring_event() ) return; | |
remove_action( 'wp_head', 'rel_canonical' ); | |
add_action( 'wp_head', 'tribe_rel_canonical' ); |
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
########## | |
# Win10 Initial Setup Script | |
# Author: Disassembler <disassembler@dasm.cz> | |
# Version: 1.7, 2016-08-15 | |
# dasm's script: https://github.com/Disassembler0/Win10-Initial-Setup-Script/ | |
# THIS IS A PERSONALIZED VERSION | |
# This script leaves more MS defaults on, including MS security features. | |
# Tweaked based on personal preferences for @alirobe 2016-11-16 - v1.7.1 |
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 | |
/* | |
* Prevents users from adding tickets to cart unless they have selected at least one ticket | |
*/ | |
function tribe_prevent_add_cart_empty() { | |
echo ' | |
<script type="text/javascript"> | |
jQuery( document ).ready(function(){ | |
jQuery( "form.cart" ).each(function(){ |