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
add_action('action_hook_espresso_save_attendee_data','espresso_create_wp_user', 10,1 ); | |
function espresso_create_wp_user($attendee_data) { | |
if( email_exists( $attendee_data['email'] ) == false ) { | |
global $org_options; | |
// Generate the password and create the user | |
$password = wp_generate_password( 12, false ); | |
$user_id = wp_create_user( $attendee_data['fname'] . $attendee_data['lname'], $password, $attendee_data['email'] ); | |
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 | |
// prints a per event attendee list right after the event details on a single event page | |
// you can change the action hook that's on the next line to display the list in another location | |
add_action( 'AHEE_event_details_after_the_content', 'ee_attendee_list' ); | |
function ee_attendee_list(){ | |
global $wpdb, $post; |
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 | |
/** | |
* @package Payment Settings Fixer | |
* @version 0.1 | |
*/ | |
/* | |
Plugin Name: Payment Settings Fixer | |
Plugin URI: https://github.com/joshfeck | |
Description: A little patch to fix a strange issue in some WPEngine sites' admin for the Event Espresso 3 Payment settings page | |
Author: Josh Feck |
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
function dr_validate() { | |
wp_register_script( 'drvalid', 'http://ajax.aspnetcdn.com/ajax/jquery.validate/1.13.0/jquery.validate.min.js', array('jquery'), '1.13.0', true ); | |
wp_register_script( 'drvalid2', 'http://ajax.aspnetcdn.com/ajax/jquery.validate/1.13.0/additional-methods.min.js', array('jquery'), '1.13.0', true ); | |
wp_enqueue_script( 'jquery' ); | |
wp_enqueue_script( 'drvalid' ); | |
wp_enqueue_script( 'drvalid2' ); | |
} | |
add_action('wp_enqueue_scripts','dr_validate'); |
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 | |
/** | |
* This template will display a single event - copy it to your theme folder | |
* | |
* @ package Event Espresso | |
* @ author Seth Shoultes | |
* @ copyright (c) 2008-2013 Event Espresso All Rights Reserved. | |
* @ license http://eventespresso.com/support/terms-conditions/ * see Plugin Licensing * | |
* @ link http://www.eventespresso.com | |
* @ version 4+ |
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 | |
// re-order the event category archives | |
add_filter('posts_orderby', 'edit_event_category_archive_orderby' ); | |
function edit_event_category_archive_orderby( $orderby ) { | |
global $wpdb; | |
if( is_tax( 'espresso_event_categories' )) { | |
$orderby = "{$wpdb->prefix}esp_datetime.DTT_EVT_start ASC"; | |
return $orderby; |
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 | |
remove_action ( 'genesis_loop', 'genesis_do_loop' ); // Remove the standard loop | |
add_action( 'genesis_loop', 'custom_espresso_events_single_loop' ); // Add custom loop | |
// Optional: Remove post info | |
remove_action( 'genesis_before_post_content', 'genesis_post_info' ); | |
remove_action( 'genesis_after_post_content', 'genesis_post_meta' ); | |
function custom_espresso_events_single_loop() { |
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
function display_custom_meta_in_ee4( $atts ){ | |
global $post; | |
extract( shortcode_atts( array( 'type' => '', 'name' => '' ), $atts ) ); | |
$post_meta = get_post_meta( $post->ID, $name, TRUE ); | |
return $post_meta; | |
} | |
add_shortcode( 'EE_META', 'display_custom_meta_in_ee4' ); |
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 | |
//remove r&P question group filter so any event editor has all the questions: | |
add_action( 'init', 'ee3_modify_permissions_questions' ); | |
function ee3_modify_permissions_questions() { | |
remove_filter('espresso_get_question_groups_for_event_where', 'espresso_rp_basic_get_question_groups_for_event_where', 10, 3); | |
} |
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 | |
/** | |
* This is an alternative filter for adding events to posts. | |
* | |
* 1. Adds events to ANY query for posts (including core wp functions like wp_recent_posts() that suppress filters ). | |
* 2. Ensures we don't accidentally add posts (and events) into custom queries for other post types. (eg sliders). | |
*/ | |
function add_espresso_events_to_posts( $WP_Query ) { | |
if ( $WP_Query instanceof WP_Query && ( $WP_Query->is_feed || $WP_Query->is_posts_page || ( $WP_Query->is_home && ! $WP_Query->is_page ) || ( isset( $WP_Query->query_vars['post_type'] ) && ( $WP_Query->query_vars['post_type'] == 'post' || is_array( $WP_Query->query_vars['post_type'] ) && in_array( 'post', $WP_Query->query_vars['post_type'] ) ) ) ) ) { |
OlderNewer