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
| name: Create Release | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: 'Release Tag' | |
| required: true | |
| jobs: |
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
| /** | |
| * Hook into WordPress to check user capabilities before accessing wp-admin | |
| * | |
| * @return void | |
| */ | |
| function restrict_wp_admin() { | |
| // Check if the current user is an administrator. | |
| if ( ! current_user_can('administrator') && is_admin() && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) { | |
| // Redirect non-administrator users to the /my-account page. | |
| wp_redirect( home_url( '/my-account' ) ); |
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 // <-- don't add this part, copy everything below this line | |
| function change_shipping_text() { ?> | |
| <script> | |
| const checkout_text_contact = document.querySelector(".orderable-checkout-section--contact h3:first-of-type"); | |
| checkout_text_contact.innerHTML = "Kunde info"; | |
| const checkout_text_shipping = document.querySelector(".orderable-checkout-section--shipping h3:first-of-type"); | |
| checkout_text_shipping.innerHTML = "Leverings adresse"; | |
| </script> | |
| <?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
| // change 'no upcoming events' message. filter found in /src/Tribe/Views/V2/Messages.php | |
| add_filter( 'tribe_events_views_v2_messages_map', 'change_map_key', 10, 1); | |
| function change_map_key( $map ) { | |
| $map['no_upcoming_events'] = 'No events Bruh.'; | |
| return $map; | |
| } |
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( 'event_tickets_after_save_ticket', 'rt_disable_tax_for_event_tickets', 10, 4 ); | |
| function rt_disable_tax_for_event_tickets( $post_id, $ticket, $raw_data, $class_name ) { | |
| //hardcoded for WooCommerce only | |
| if ( 'Tribe__Tickets_Plus__Commerce__WooCommerce__Main' != $class_name ) { | |
| return; | |
| } | |
| $product = wc_get_product( $ticket->ID ); |
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
| // | |
| // limit customers to one overall ticket for an event | |
| // | |
| function limit_customers_to_one_ticket_total() | |
| { | |
| // bail if not on a Single Event page | |
| if (!function_exists('tribe_is_event') || !tribe_is_event()) { | |
| return false; | |
| } | |
| ?> |
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
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>The HTML5 Herald</title> | |
| <meta name="description" content="The HTML5 Herald"> | |
| <meta name="author" content="SitePoint"> |