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 | |
| /* | |
| Plugin Name: EE Site Specific Plugin | |
| Description: Add custom functions for Event Espresso 4 here. | |
| */ | |
| /* Begin Adding Functions Below This Line; Do not include an opening PHP tag as this sample code already includes one! */ | |
| //You can pass the status to the shortcode using [NEXT_UPCOMING_DATETIME_REG_VALUE status="{status}"] | |
| //For example [NEXT_UPCOMING_DATETIME_REG_VALUE status="RPP"] for Pending Payment registrations. |
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 | |
| /* | |
| Plugin Name: EE Custom Messages Shortcode - Site Specific Plugin | |
| Description: Add custom messages shortcodes for Event Espresso 4 here. | |
| */ | |
| /* Begin Adding Functions Below This Line; Do not include an opening PHP tag as this sample code already includes one! */ | |
| function register_new_tony_shortcodes( $shortcodes, EE_Shortcodes $lib ) { | |
| //Add a shortcode to be used with the EE Datetimes within messages | |
| if ( $lib instanceof EE_Datetime_Shortcodes ) { |
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 | |
| // Function to remove 'Protected: ' from EE Event titles. | |
| function tw_ee_protected_title_format($protected_title_title, $post) { | |
| if ($post->post_type == 'espresso_events') { | |
| return '%s'; | |
| } | |
| return $protected_title_title; | |
| } |
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
| /* Hide all but the details section */ | |
| .tckt-slctr-tkt-details-sctn section { | |
| display: none; | |
| } | |
| /* Remove additionl spacing from the br tags left behind */ | |
| .tckt-slctr-tkt-details-sctn > br { | |
| display: none; | |
| } |
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 | |
| /* | |
| Plugin Name: Custom EE Upcoming Events Widget | |
| Description: Add a custom Upcoming Events widger with a 'sort' field and 'Show Only Expired' option. | |
| Author: Tony Warwick | |
| Version: 1.1 | |
| */ | |
| /* Begin Adding Functions Below This Line; Do not include an opening PHP tag as this sample code already includes one! */ | |
| class Custom_Upcoming_Events extends WP_Widget { |
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 | |
| //* Please do NOT include the opening php tag, except of course if you're starting with a blank file | |
| //Output details just after the ticket selector, the function has the Event ID ($EVT_ID) | |
| //and EE_Event object $event available for use. | |
| function tw_output_details_after_the_ts( $EVT_ID, $event ) { | |
| echo "<h1>TESTING TESTING</h1>"; | |
| } |
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 | |
| //* Please do NOT include the opening php tag, except of course if you're starting with a blank file | |
| //Output details just before the ticket selector, the function has the EE_Event object ($event) available for use. | |
| function tw_output_details_before_the_ts( $event ) { | |
| echo "<h1>TESTING TESTING</h1>"; | |
| } | |
| add_action( 'AHEE__ticket_selector_chart__template__before_ticket_selector', 'tw_output_details_before_the_ts' ); |
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 | |
| //* Please do NOT include the opening php tag, except of course if you're starting with a blank file | |
| if ( class_exists( 'EE_Registry' ) ) { | |
| $exclude_query[0] = array( 'Datetime.DTT_EVT_end' => array( '>', EEM_Datetime::instance()->current_time_for_query( 'DTT_EVT_end' ) ) ); | |
| //first get all events that have datetimes where its not expired. | |
| $exclude_event_ids = EE_Registry::instance()->load_model( 'Event' )->get_all_wpdb_results( $exclude_query, OBJECT_K, 'Event_CPT.ID' ); | |
| $exclude_event_ids = array_keys( $exclude_event_ids ); | |
| //Grab all events where the Datetime end date is less than today (expired) excluding the events we pulled in above. |
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 | |
| /* | |
| Plugin Name: Event Espresso site specific functions | |
| Description: Add custom functions for Event Espresso to this plugin. | |
| /* Begin Adding Functions Below This Line; Do not include an opening PHP tag as this sample code already includes one! */ | |
| function tw_ee_output_admin_invoice_payment_method($payment_methods, $transaction, $scope) { | |
| //Check if the user is logged in, is not within the admin and has the correct capability | |
| if( is_user_logged_in() && current_user_can( 'manage_options' ) ) { |
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 | |
| /* | |
| Plugin Name: Event Espresso site specific functions | |
| Description: Add custom functions for Event Espresso to this plugin. | |
| /* Begin Adding Functions Below This Line; Do not include an opening PHP tag as this sample code already includes one! */ | |
| //Remove the Extensions & Services menu for all but admins with manage_options cap | |
| function tw_ee_remove_services_menu() { | |
| if( !current_user_can( 'manage_options' ) ) { | |
| remove_submenu_page( 'espresso_events', 'espresso_packages' ); |