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 | |
/** | |
* Adding a custom filter | |
* A simple copy and paste of the existing Category filter | |
* Find this new filter in: WP Admin > Events > Settings > Filterbar | |
* Docs for TribeEventsFilter: http://docs.tri.be/Filter-Bar/class-TribeEventsFilter.html | |
*/ | |
class TribeEventsFilter_CustomClubs extends TribeEventsFilter { | |
public $type = 'select'; |
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: Dev Plugins | |
*/ | |
add_action( 'muplugins_loaded', function() { | |
// Plugins to activate automatically. | |
$auto_activate = [ | |
'debug-bar/debug-bar.php', | |
'debug-bar-extender/debug-bar-extender.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
<div class="small-12 medium-6 large-4 columns"> | |
<?php | |
$events = tribe_get_events( | |
array( | |
'posts_per_page' => 1, | |
'orderby' => 'meta_value', | |
'order' => 'DESC', | |
) ); | |
foreach ( $events as $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 | |
/** | |
* Removes the word "Free" when cost is 0 or event is RSVP | |
* | |
* Event Tickets Plus | |
* @author Trisha Salas | |
* | |
* @param $cost | |
* | |
* @return string |
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
function tribe_custom_loop() { | |
$events = tribe_get_events ( | |
array ( | |
'posts_per_page' => 5, | |
'start_date' => date( 'Y-m-d H:i:s' ) | |
) ); | |
foreach ( $events as $event ) { | |
$sdate = tribe_get_start_date( $event, false, 'M j' ); | |
//$elink = tribe_get_event_link( $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
function tribe_upcoming_events() { | |
$front_page_sidebar = get_post_meta( get_the_ID(), 'tribe_events', true ); | |
if ( ! is_active_sidebar( $front_page_sidebar ) ) { | |
return; | |
} | |
add_action( 'tribe_events_list_widget_after_the_event_title', 'tribe_event_start_date' ); | |
echo '<div class="events"><div class="events-content">'; | |
add_action( 'tribe_events_list_widget_before_the_event_title', 'tribe_get_events_featured_image' ); | |
add_action( 'tribe_events_list_widget_after_the_meta', 'tribe_get_venue_details' ); | |
dynamic_sidebar( $front_page_sidebar ); |
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 | |
/** | |
* Gets the post object for the next event when called from 'single-event.php' | |
* | |
*/ | |
$start_date = get_post_meta( get_the_ID(), '_EventStartDate', true ); | |
$args = array( | |
'post__not_in' => array( get_the_ID() ), |
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 | |
/*-----------------------------------------------------------------------------------*/ | |
/* Conditional Logic to Detect Various Event Related Views/Pages | |
/*-----------------------------------------------------------------------------------*/ | |
if( tribe_is_month() && !is_tax() ) { // Month View Page | |
echo 'were on the month view page'; | |
} elseif( tribe_is_month() && is_tax() ) { // Month View Category Page |
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
.screen-reader-text { | |
border: 0; | |
clip: rect(1px, 1px, 1px, 1px); | |
clip-path: inset(50%); | |
height: 1px; | |
margin: -1px; | |
padding: 0; | |
overflow: hidden; | |
position: absolute !important; | |
width: 1px; |
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 | |
define( 'PLUGIN_BASENAME', plugin_basename( __FILE__ ) ); | |
function my_plugin_row_meta( $plugin_meta, $plugin_file, $plugin_data, $status ) { | |
if ( PLUGIN_BASENAME == $plugin_file ) | |
$plugin_meta[] = '<a href="#">Test: plugin_row_meta</a>'; | |
return $plugin_meta; | |
} | |
add_filter( 'plugin_row_meta', 'my_plugin_row_meta', 10, 4 ); |
NewerOlder