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
## On you machine run: | |
docker exec -it devkinsta_fpm bash | |
## After you are logged change to /tmp | |
cd /tmp | |
## Install and configure composer | |
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | |
php -r "if (hash_file('sha384', 'composer-setup.php') === '756890a4488ce9024fc62c56153228907f1545c228516cbf63f885e036d37e9a59d27d63f46af1d4d07ee0f76181c7d3') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" | |
php composer-setup.php |
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 | |
/** | |
* View: Dropdown Component | |
* | |
* Override this template in your own theme by creating a file at: | |
* [your-theme]/tribe/events-filterbar/v2_1/components/dropdown.php | |
* | |
* See more documentation about our views templating system. | |
* | |
* @link http://evnt.is/1aiy |
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 | |
/** | |
* View: Month View - Day | |
* | |
* Override this template in your own theme by creating a file at: | |
* [your-theme]/tribe/events/v2/month/calendar-body/day.php | |
* | |
* See more documentation about our views templating system. | |
* | |
* @link http://evnt.is/1aiy |
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 | |
/** | |
* Detect Tribe Events page | |
* @link https://wordpress.stackexchange.com/questions/340515/writing-a-function-to-detect-an-event | |
*/ | |
function is_tribe_calendar() { | |
if (tribe_is_event() || tribe_is_event_category() || tribe_is_in_main_loop() || tribe_is_view() || 'tribe_events' == get_post_type() || is_singular( 'tribe_events' )) { | |
return true; | |
} | |
else { |
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 | |
/** | |
* If a search is conducted in month view but the relevant events | |
* are in a different month, switch to that month. | |
* | |
* Experimental! Especially during live ajax navigation, there are | |
* parts of this that don't work cleanly (pushstate/URL changes). | |
* Unsupported, use at own risk. | |
*/ | |
class Transmogrified_Month_View_Search { |
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 | |
function ecp_fix_tag_order( $sql, $query ) { | |
// Only modify the main query, if it is a tag archive query | |
if ( ! $query->is_main_query() || ! $query->is_tag() ) { | |
return $sql; | |
} | |
$has_event_start_date = (bool) strpos( $sql, 'AS EventStartDate' ); | |
$orders_by_post_date = (bool) strpos( $sql, 'ORDER BY post_date DESC' ); |
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 // only copy this line if needed | |
/** | |
* Function adds a BCC header to emails that match our array | |
* | |
* Plugins: WooCommerce | |
* Original Author: Jesse Pearson (https://gist.github.com/jessepearson) | |
* Modified by: Andras Guseo | |
* Last updated: March 5, 2018 | |
* |
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/ | |
* Updated to work with post 3.10 versions | |
*/ | |
function tribe_attachment_404_fix () { | |
if (class_exists('Tribe__Events__Main')) { | |
remove_action( 'init', array( Tribe__Events__Main::instance(), 'init' ), 10 ); |
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 | |
/** | |
* BCC multiple email addresses, including the site admin email address, on all Event Tickets' RSVP ticket emails so they get a copy of it too | |
* | |
* From https://gist.github.com/cliffordp/c4fb2ea8fb5ca44973ff06e6facc9742 | |
* A fork of https://gist.github.com/cliffordp/4f06f95dbff364242cf54a3b5271b182 | |
* For https://theeventscalendar.com/support/forums/topic/event-tickets-free-not-plus-rsvp-notifications/#post-1272819 | |
* | |
* @link https://developer.wordpress.org/reference/functions/wp_mail/#comment-349 | |
*/ |
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 | |
/** | |
* BCC site admin email on all Event Tickets' RSVP ticket emails so they get a copy of it too | |
* | |
* From https://gist.github.com/cliffordp/4f06f95dbff364242cf54a3b5271b182 | |
* | |
* Reference: https://developer.wordpress.org/reference/functions/wp_mail/#using-headers-to-set-from-cc-and-bcc-parameters | |
* | |
*/ | |
function cliff_et_rsvp_bcc_admin_ticket() { |
NewerOlder