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
add_action( 'wp_enqueue_scripts', 'sd_frontend_script_and_style', 100, 0 ); | |
function sd_frontend_script_and_style() { | |
if(tribe_is_month()) { | |
wp_dequeue_script( 'tribe-events-calendar' ); | |
} | |
} |
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
add_action( 'wp_footer', 'community_add_javascript' ); | |
function community_add_javascript() { | |
if (tribe_is_community_edit_event_page()) { | |
?> | |
<script type="text/javascript"> | |
//Hide country dropdown | |
jQuery('tr.venue:eq(2)').hide(); | |
//Hide state dropdown |
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
add_action( 'wp_head', 'community_add_css' ); | |
function community_add_css() { | |
if (tribe_is_community_edit_event_page() || tribe_is_community_my_events_page()) { | |
?> | |
<style> | |
#event_image_uploader {display:none !important;} | |
</style> | |
<?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
add_action( 'wp_head', 'community_restrict_access' ); | |
function community_restrict_access() { | |
if (tribe_is_community_edit_event_page() || tribe_is_community_my_events_page()) { | |
if(current_user_can('subscriber') || current_user_can('custom_role_name')) { | |
wp_redirect( get_bloginfo('home') . "/error/" ); exit; | |
} | |
} | |
} |
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
add_action( 'wp_footer', 'community_add_javascript' ); | |
function community_add_javascript() { | |
if (tribe_is_community_edit_event_page()) { | |
?> | |
<script type="text/javascript"> | |
//Hide organizer dropdown | |
jQuery('#event_organizer tr:eq(1)').hide(); | |
//Hide venue dropdown |
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
add_filter( 'init', 'enforce_ssl_ecp', 5 ); | |
function enforce_ssl_ecp() { | |
if ( ! is_ssl() || ! class_exists( 'TribeEventsPro' ) ) return; | |
$pro = TribeEventsPRO::instance(); | |
$pro->pluginUrl = str_replace( 'http://', 'https://', $pro->pluginUrl ); | |
} |
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
add_filter('tribe_events_community_before_the_categories','my_category_descriptions'); | |
function my_category_descriptions() { | |
echo "<p><strong>Category Descriptions:</strong></p><ul><li>Category 1 - Description Here</li><li>Category 2 - Description Here</li></ul>"; | |
} |
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
add_action('tribe_events_before_html','customize_html'); | |
function customize_html($code) { | |
//If viewing a single event page, then don't display anything | |
if(tribe_is_event() && is_single()) { | |
return ''; | |
} else { | |
return $code; | |
} | |
} |
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
//Get all categories for a given events | |
$event_cats = get_terms('tribe_events_cat'); | |
if(!empty($event_cats)) { | |
//Loop through Event Categories and display description | |
foreach($event_cats as $event_cat) { | |
echo term_description( $event_cat->term_id, 'tribe_events_cat' ); | |
} | |
} |
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
add_filter('tribe_events_community_before_the_categories','my_category_descriptions'); | |
function my_category_descriptions() { | |
echo '<div class="tribe-events-community-details eventForm bubble tribe-events-community-category-descriptions">'; | |
//Get all categories | |
$event_cats = get_terms('tribe_events_cat'); | |
if(!empty($event_cats)) { | |
remove_filter('term_description','wpautop'); | |
//Loop through Event Categories and display description | |
echo '<ul>'; |
OlderNewer