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 | |
/** | |
* After creating the necessary table, run with `wp eval-file plugin-stats.php` | |
*/ | |
use WP_CLI\Utils; | |
global $wpdb; | |
$original_request_url = 'https://wordpress.org/plugins/wp-json/plugins/v1/query-plugins?s=&posts_per_page=100'; |
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
'\'tis', | |
'\'twas', | |
'a', | |
'a\'s', | |
'able', | |
'about', | |
'above', | |
'according', | |
'accordingly', | |
'across', |
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 | |
// display the base price of the ticket in the ticket selector without Price Modifiers. | |
add_filter( 'FHEE__ticket_selector_chart_template__ticket_price', 'change_ee_ticket_selector_base_price_display', 10, 2 ); | |
function change_ee_ticket_selector_base_price_display( $ticket_price, $ticket ) { | |
$x = $ticket->base_price(); |
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 | |
function change_reg_code($new_reg_code, $registration) { | |
//create a new reg ID e.g. business-1598 | |
$new_reg_code = "business-" . rand(1000, 10000); | |
//send the new reg code back to be used. |
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 | |
/* | |
Plugin Name: Associated Events for EE4 | |
Plugin URI: | |
Description: Adds an Associated Events meta baox to EE4 venues, which lists which events the venue has been attached to. | |
Version: 0.0.1 | |
Author: Dean Robinson | |
Author URI: | |
*/ |
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 if ( get_post_type( $post ) == "espresso_events" || is_post_type_archive( "espresso_events" ) ) { | |
//do something | |
} else { | |
//do something else | |
} | |
?> |
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('AHEE__registration_page_attendee_information__start', 'dxxx', 10, 1 ); | |
function dxxx($event_queue) { | |
//var_dump($event_queue); | |
$my_registrations = $event_queue['items']; foreach($my_registrations as $a_reg) { echo $a_reg[event] -> ID(); } | |
} |
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
//Please note that this is a non supported code snippet. Event Espresso will not provide general support for it, nor may it be updated. | |
//Please only use as an example for your own code | |
function espresso_make_additional_relay_teammates_free ($ext_att_data_source) { | |
global $wpdb; | |
//As this function is called for each attendee, lets bail if it's the primary attendee. | |
if( $ext_att_data_source['is_primary'] == true ) { | |
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
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 | |
/* | |
Plugin Name: EE adds JavaScript to show the payment options automatically. | |
Description: EE adds JavaScript to show the payment options automatically. | |
*/ | |
/* Begin Adding Functions Below This Line */ | |
function ee_1() { |
NewerOlder