Skip to content

Instantly share code, notes, and snippets.

Seth sethshoultes

Block or report user

Report or block sethshoultes

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ee4-restore-paypal-standard.php
<?php
/*
Plugin Name: Event Espresso - Restore PayPal Standard
Description: This plugin allows you to use PayPal Standard on your website. By allowing your customers to use PayPal Standard, you may face inconsistencies with payments.
*/
add_filter( 'FHEE__EE_PMT_Paypal_Express__register_payment_methods__hide_paypal_standard', '__return_false' );
@sethshoultes
sethshoultes / ee_display_download_tickets.php
Created Feb 12, 2016 — forked from Pebblo/ee_display_download_tickets.php
Add a 'Download your tickets' button to the EE4 thank you page. The hook in use adds the button above the overview, just under the confirmation order section. You will likely need to apply your own styles, possibly a container div and apply styles to that depending on how you want this to be displayed.
View ee_display_download_tickets.php
<?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() ) {
@sethshoultes
sethshoultes / ee_password_post_filter.php
Created May 15, 2015
Exclude password protected events and posts from the WordPress loop. Adapted from Stackoverflow: http://stackoverflow.com/questions/7538959/how-to-exclude-password-protected-posts-in-wordpress-loop
View ee_password_post_filter.php
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
// Create a new filtering function that will add our where clause to the query
function ee_password_post_filter( $where = '' ) {
// Make sure this only applies to loops / feeds on the frontend
if (!is_single() && !is_admin()) {
// exclude password protected
$where .= " AND post_password = ''";
}
@sethshoultes
sethshoultes / HelpScout Docs Customization
Last active Aug 29, 2015 — forked from seedprod/gist:7de2027ad32e1a5ee8d9
Adds new buttons to HelpScout Docs
View HelpScout Docs Customization
<!-- Replace default Contact Us url in HelpScout Docs with custom url and add a My Account link to the top menu -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script>
$(function() {
$("#contact a,#sbContact,#sbContactMobile, #contactMobile a").attr("href", "https://app.sellwp.co/seedprod/ticket").text('Open a Ticket');
$( "#mainNav .nav" ).append( "<li><a href='http://www.seedprod.com/members'>My Account</a></li>" );
});
</script>
<!-- SeedProd.com custom styles -->
@sethshoultes
sethshoultes / template-parts.md
Last active Nov 18, 2015 — forked from Pebblo/functions.md
This moves the ticket selector from before the event content to after the event content. Requires Event Espresso 4.8.24.p or greater.
View template-parts.md
View widget-pending-view
case 'PENDING':
if (current_user_can('administrator') || function_exists('espresso_member_data') && espresso_can_view_event($event_id) == true) {
?>
<li class="pending_event"><a href="<?php echo $registration_url; ?>"><?php echo stripslashes_deep($event->event_name) ?> - <span class="widget-event-date"><?php echo event_date_display($event->start_date) ?></span></a>
<?php
}
break;
@sethshoultes
sethshoultes / 0_reuse_code.js
Created Apr 2, 2014
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View filter_gettext.php
function mycustom_filter_gettext( $translated, $original, $domain ) {
// This is an array of original strings
// and what they should be replaced with
$strings = array(
'Register' => 'Sign up',
'Confirm and go to payment page' => 'Complete registration',
// Add some more strings here
);
@sethshoultes
sethshoultes / espresso_create_wp_user.php
Last active Feb 16, 2016
This action creates a WordPress user when someone registers for your an event. It uses the email address of the registrant to create the user name and the password is randomly generated. Add this function and action to your theme/functions.php file. More info in the comments below.
View espresso_create_wp_user.php
<?php
add_action('action_hook_espresso_save_attendee_data','espresso_create_wp_user', 10, 1);
function espresso_create_wp_user($attendee_data) {
if( username_exists( $attendee_data['email'] ) == NULL ) {
global $org_options;
// Generate the password and create the user
$password = wp_generate_password( 12, false );
$user_id = wp_create_user( $attendee_data['email'], $password, $attendee_data['email'] );
@sethshoultes
sethshoultes / event_list.php
Created Feb 4, 2013
When we added the feature to use multiple categories in the EVENT_LIST short code, we lost/broke existing categories because they are stored in a different table. With the added support for multiple categories, we started storing a comma separated list of category ids in the events_detail table. So I am adding support for the legacy and new cate…
View event_list.php
<?php
//This is a template file for displaying a list of events on a page. These functions are used with the [ESPRESSO_EVENTS] shortcode.
//This is an group of functions for querying all of the events in your databse.
//This file should be stored in your "/wp-content/uploads/espresso/templates/" directory.
//Note: All of these functions can be overridden using the "Custom Files" addon. The custom files addon also contains sample code to display ongoing events
if (!function_exists('display_all_events')) {
function display_all_events() {
event_espresso_get_event_details(array());
You can’t perform that action at this time.