Skip to content

Instantly share code, notes, and snippets.

@Apina
Apina / espresso_table_display_table_function.php
Created July 10, 2013 13:47 — forked from joshfeck/espresso_table_display_table_function.php
custom espresso_display_table function that makes it possible to order by time instead of ordering by date only. Replaces the function of the same name in the espresso_table.php template
/*
Shortcode Name: Espresso Table
Author: Seth Shoultes
Contact: [email protected]
Website: http://www.eventespresso.com
Description: Only show events in a CATEGORY within a certain number number of days into the future and a qty. The example below only shows events in a certain category that start within 30 days from the current date.
Usage Example: [ESPRESSO_TABLE max_days="30" qty="3" category_identifier="gracecard" order_by="state"]
Custom CSS for the table display
Notes: This file should be stored in your "/wp-content/uploads/espresso/templates/" folder and you should have the custom_includes.php files installed in your "/wp-content/uploads/espresso/" directory.
*/
@Apina
Apina / template.php
Last active December 18, 2015 22:49 — forked from jazzsequence/template.php
Please see https://gist.github.com/joshfeck/52ac749150322a2e4221 --- Event Espresso invoice template including surcharge/VAT support. This file should go in your /wp-content/uploads/espresso/gateways/invoice directory.
Please see https://gist.github.com/joshfeck/52ac749150322a2e4221
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'] );
// Set the users details