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
curl --data "room_id=99999" --data "from=EEWebsiteBot" --data-urlencode "message=Event Espresso staging servers (beta and dev) have been deployed to" --data "message_format=text" --data "notify=1" --data "color=purple" https://api.hipchat.com/v1/rooms/message?auth_token=obsfucated_api_token | |
##So the room_id corresponds to what room you want the notifications go to and the auth token is the api key you generate via the group admin in HipChat (web). |
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
//currently there is | |
public function get_route($WP) { | |
$this->WP = WP | |
/**more original code below here**/ | |
} | |
//you want modify so you see this | |
public function get_route( $WP ) { | |
$this->WP = WP | |
if ( ! EE_Registry::instance()->REQ instanceof EE_Request_Handler ) |
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
/** | |
* in file /core/CPTs/EE_CPT_Strategy around line 155 you'll see | |
* public function pre_get_posts( $WP_Query ) { | |
* Right after that line on a new line add the following: | |
*/ | |
if ( ! $WP_Query instanceof WP_Query || empty( $WP_Query->query_vars ) ) | |
return; |
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
//below is an example of proper spacing | |
/** | |
* This is a summary | |
* This is a longer description etc. | |
* | |
* @abstract | |
* @param string $some_param A string | |
* @returns void | |
**/ | |
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 | |
//here's the example function | |
function get_ticket_css_class( EE_Ticket $ticket, $context = 'ticket-item' ) { | |
return apply_filters( 'FHEE__get_ticket_css_class', $context . '-' . sanitize_title( $ticket->get('TKT_name') ), $ticket, $context ); | |
} | |
//then in html template | |
?> | |
<tr class="<?php echo get_ticket_css_class($ticket, 'ticket-row'); ?>"> |
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 | |
function ee_inline_css_swap( $path_or_url, $type ) { | |
$upload_dir = wp_upload_dir(); | |
if ( $type == 'preview' ) { | |
$path_or_url = $upload_dir['baseurl'] . '/email-messenger-inline-preview-css.template.css'; | |
} elseif ( $type === FALSE ) { | |
$path_or_url = $upload_dir['basedir'] . '/email-messenger-inline-css.template.css'; | |
} | |
return $path_or_url; |
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 | |
function convert_zero_to_free( $amount, $return_raw ) { | |
// we don't want to mess with requests for unformated values because those may get used in calculations | |
return $return_raw || $amount >= 0 ? $amount : __('free', 'event_espresso'); | |
} | |
add_filter( 'FHEE__EEH_Template__format_currency__amount', 'convert_zero_to_free', 10, 2 ); |
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
class EEBumpDatesForward { | |
/** | |
* constant and properties related to wp cron schedules. | |
*/ | |
const bumpDatesScheduleInterval = 'daily'; | |
private $_scheduleIntervals; | |
public function __construct() { |
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'] ) ) ) ) ) { |
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 | |
add_filter('init', 'modify_series_link_context'); | |
function modify_series_link_context() { | |
add_filter('post_link', 'multi_series_link_mod', 10, 3); | |
add_filter('get_the_series', 'multi_series_get_mod'); | |
} | |
function multi_series_link_mod($permalink, $post, $leavename) { | |
//is the displayed page a series archive page? If so, then let's make sure we append a request variable to the post links for this series. |
OlderNewer