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: Estimated Read Time | |
Plugin URI: http://www.apinapress.com/ | |
Description: Adds an estimated read time to posts (just above post content) | |
Version: 0.0.1 | |
Author: Dean Robinson | |
Author URI: http://www.apinapress.com | |
License: GPL3 | |
*/ |
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('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 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 if (!defined('EVENT_ESPRESSO_VERSION')) { exit('No direct script access allowed'); } | |
do_action('action_hook_espresso_log', __FILE__, 'FILE LOADED', ''); | |
//As of version 3.0.17 | |
//This is a logic file for displaying a registration form for an event on a page. This file will do all of the backend data retrieval functions. | |
//There should be a copy of this file in your wp-content/uploads/espresso/ folder. | |
//Note: This entire function can be overridden using the "Custom Files" addon | |
if (!function_exists('register_attendees')) { | |
function register_attendees($single_event_id = NULL, $event_id_sc =0, $reg_form_only = false) { | |
//Declare the $data object |
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 - Calendar | |
Plugin URI: http://www.eventespresso.com | |
Description: A full calendar addon for Event Espresso. Includes month, week, and day views. | |
Version: 2.1.p | |
Author: Event Espresso | |
Author URI: http://www.eventespresso.com | |
Copyright 2013 Event Espresso (email : [email protected]) |
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
function event_espresso_send_email($params) { | |
global $org_options; | |
do_action('action_hook_espresso_log', __FILE__, __FUNCTION__, ''); | |
extract($params); | |
//Define email headers | |
$headers = ""; | |
if ($org_options['email_fancy_headers']=='Y') { | |
$headers .= "From: " . $org_options['organization'] . " <" . $org_options['contact_email'] . ">\r\n"; | |
$headers .= "Reply-To: " . $org_options['organization'] . " <" . $org_options['contact_email'] . ">\r\n"; | |
} else { |
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 | |
//This is the registration form. | |
//This is a template file for displaying a registration form for an event on a page. | |
//There should be a copy of this file in your wp-content/uploads/espresso/ folder. | |
?> | |
<div id="espresso-event-id-<?php echo $event_id; ?>"> | |
<div id="event_espresso_registration_form" class="event-display-boxes ui-widget"> | |
<?php | |
$ui_corner = 'ui-corner-all'; | |
//This tells the system to hide the event title if we only need to display the registration form. |
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 | |
//Search | |
//Shortcode to create an autocomplete search tool. | |
function ee_create_autocomplete_search2($atts){ | |
$a = shortcode_atts( array( | |
'show_expired' => 'false' | |
), $atts ); | |
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
function change_ticket_count($attendee_data) { | |
if($attendee_data['event_id'] != '166') { return false;} | |
global $wpdb; | |
$wpdb->update( EVENTS_ATTENDEE_TABLE, array("quantity" => "5"), array("id" => $attendee_data['attendee_id']), array("%d"), array("%d") ); | |
return; | |
} | |
add_action('action_hook_espresso_save_attendee_data', 'change_ticket_count'); |
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
function htrappfae_remove_check_from_event($payment_data) { | |
extract( $payment_data ); | |
if ( $event_id==8) { //check to see if this is the event with the ID of #8 | |
//echo "Event Espresso ID: $event_id"; | |
remove_action('action_hook_espresso_display_offline_payment_gateway_2','espresso_display_check' ); | |
remove_action('action_hook_espresso_display_offline_payment_gateway_2', 'espresso_display_purchase_order'); | |
} | |
} | |
add_action ( 'action_hook_espresso_display_offline_payment_gateway', 'htrappfae_remove_check_from_event',9 ); |
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
//this is just showing you where the code needs to go | |
if( ee_parentHeight < ee_newHeight ) { | |
ee_newHeight = ee_newHeight + 30; | |
dayCnt.parents('tr').height( ee_newHeight ).css({ 'height' : ee_newHeight + 'px' }); | |
} | |
} | |
}); |