This file contains hidden or 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( 'plugin_action_links_' . plugin_basename(__FILE__), 'plugin_action_links' ); | |
function plugin_action_links( $links ) { | |
$links[] = '<a href="' . admin_url( 'admin.php?page=my-plugin-settings' ) . '">' . __( 'Settings', 'text-domain' ) . '</a>'; | |
return $links; | |
} |
This file contains hidden or 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 | |
add_action( 'tribe_events_update_meta', 'rt_mt_make_featured_event', 10, 3 ); | |
function rt_mt_make_featured_event( $event_id, $data, $event ) { | |
//if venue is Dhaka, mark as featured | |
if ( $data['Venue']['City'][0] == 'Dhaka' ) { | |
tribe( 'tec.featured_events' )->feature( $event_id ); | |
//if you want to unfeature use this instead |
This file contains hidden or 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 | |
add_filter( 'tribe_events_template_data_array', 'rt_mt_month_view_default_image', 10, 3 ); | |
function rt_mt_month_view_default_image( $json, $event, $additional ) { | |
// if featured images is empty | |
if ( empty( $json['imageTooltipSrc'] ) ) { | |
$json['imageTooltipSrc'] = "YOUR_IMAGE_LINK"; | |
} |
This file contains hidden or 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 | |
add_filter( 'tribe_tickets_buy_button', 'rt_mt_buy_now_rename', 10, 4 ); | |
function rt_mt_buy_now_rename( $html, $parts, $types, $event_id) { | |
$find = 'Buy Now!'; | |
$replace = 'Register'; | |
$html['button'] = str_replace( $find, $replace, $html['button'] ); |
This file contains hidden or 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 | |
/** | |
* Month Single Event | |
* This file contains one event in the month view | |
* | |
* Override this template in your own theme by creating a file at [your-theme]/tribe-events/month/single-event.php | |
* | |
* @package TribeEventsCalendar | |
* @version 4.6.21 | |
* |
This file contains hidden or 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 | |
add_filter( 'gettext_with_context', 'rt_mt_change_ticket_label', 99, 3 ); | |
add_filter( 'gettext', 'rt_mt_change_ticket_label', 99, 3 ); | |
function rt_mt_change_ticket_label( $translated_text, $untranslated_text, $domain ) { | |
$replace_pairs = array( | |
'Tickets' => 'Entries', | |
'Ticket' => 'Entry', | |
'Ticketed' => 'Entered', |
This file contains hidden or 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> | |
.recurrence-row {display:none !important;} | |
</style> | |
<?php | |
} | |
} |
This file contains hidden or 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 | |
/** | |
* @param string $type | |
* | |
* @return bool | |
*/ | |
function debug_ep_is_debug( $type = 'normal' ) { | |
if ( ! empty( $_GET['epdebug'] ) || ( defined( 'WP_CLI' ) && WP_CLI ) ) { |
This file contains hidden or 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 | |
/** | |
* Description: Sync Event Tickets tag and category with WooCommerce product category and tag - depends on the slug | |
* Usage: Copy the snippet into your child theme's functions.php file. | |
* Change delimiter as per your needs. | |
* Make sure that the slug is same for both tag or both category to sync properly | |
* | |
* Plugins: Event Tickets |
This file contains hidden or 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 | |
/** | |
* WooCommerce alter Shop redirect from cart to Events Calendar | |
* | |
* @author Rafsun Chowdhury | |
* | |
* @link https://gist.github.com/rafsuntaskin/2e88444a507e7301615c568d5504f828 | |
* |