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 // Please do not add the opening PHP tag if you already have one | |
add_filter('default_content', 'tw_ee_default_post_content', 2, 10); | |
function tw_ee_default_post_content($post_content, $post){ | |
if(get_post_type($post) == 'espresso_events'){ | |
$post_content = 'Add your default EE post content here'; | |
} | |
return $post_content; | |
} |
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 //Please do not include the opening PHP tag if you already have one | |
function ee_add_target_blank_to_thank_you_page_links() { | |
wp_add_inline_script( | |
'thank_you_page', | |
'jQuery( document ).ready(function($) { | |
$("#espresso-thank-you-page-overview-dv .ee-attention a").each(function() { | |
$(this).attr("target","_blank"); | |
}); | |
});' |
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 | |
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file | |
add_filter( | |
'gettext_with_context', | |
'mycustom_filter_gettext_with_context', | |
10, | |
4 | |
); | |
function mycustom_filter_gettext_with_context( |
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 | |
/** | |
* @param $title | |
* @return array | |
*/ | |
function archive_titles($title): array | |
{ | |
global $post; | |
if ( ! isset($post->post_type)) { |
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 //Please do not include the opening PHP tag if you already have one | |
function tw_remove_promo_input( $before_payment_options) { | |
//If the promotions add-on is not active we don't need any of this to run. | |
if( class_exists('EEM_Promotion') ) { | |
$checkout = EE_Registry::instance()->SSN->checkout(); | |
if ( $checkout instanceof EE_Checkout ) { | |
$transaction = $checkout->transaction; | |
if ( $transaction instanceof EE_Transaction ) { | |
//Create an array to hold the event ID's. |
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 //Please do not include the opening PHP tag if you already have one | |
function tw_ee_copy_primary_email_to_all() { | |
wp_add_inline_style( | |
'single_page_checkout', | |
'.spco-attendee-panel-dv:not(:first-of-type) .ee-reg-qstn-email-input-dv, .spco-attendee-panel-dv:not(:first-of-type) .ee-reg-qstn-email { | |
display: none; | |
}' | |
); | |
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 //Do not include the opneing PHP tag if you already have one. | |
//This functions can be used to remove scripts loaded by other plugins (or the sites theme) on EE Event/Venue pages. | |
function tw_ee_remove_scripts_from_event_editor( $hook_suffux ){ | |
$page = isset( $_GET['page'] ) ? $_GET['page'] : ''; | |
$action = isset( $_GET['action'] ) ? $_GET['action'] : ''; | |
if ( ( $hook_suffux == 'post.php' || $hook_suffux == 'post-new.php' ) && ( $page == 'espresso_events' || $page == 'espresso_venues' ) && ( $action == 'edit' || $action == 'create_new' ) ) { |
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 //Please do not add the opening PHP tag if you already have one | |
// add category slug to registration checkout and thank you page's body class | |
add_filter( 'body_class', 'jf_ee_return_event_tax_term_on_spco' ); | |
function jf_ee_return_event_tax_term_on_spco( $classes ){ | |
// get out if this isn't the reg checkout page | |
if (! is_page( 'thank-you' ) && ! is_page( 'registration-checkout' ) ){ | |
return $classes; | |
} |
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 | |
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file | |
function ee_display_download_tickets( $transaction ) { | |
if ( $transaction instanceof EE_Transaction ) { | |
$primary_reg = $transaction->primary_registration(); | |
if ( $primary_reg->is_approved() ) { |
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: EE Event Roles Plugin | |
Description: Creates the 'Event Organiser' and 'Events Maneger' roles for use within Event Espresso. | |
Description: Used by millions, Akismet is quite possibly the best way in the world to <strong>protect your blog from comment and trackback spam</strong>. It keeps your site protected from spam even while you sleep. To get started: 1) Click the "Activate" link to the left of this description, 2) <a href="http://akismet.com/get/">Sign up for an Akismet API key</a>, and 3) Go to your Akismet configuration page, and save your API key. | |
Version: 1.0.0 | |
*/ | |
function add_roles_on_plugin_activation() { |
NewerOlder