Gets all events that occur within a given time range, and that include the specified guest email in the guest list.
###Parameters:###
<?php | |
/** | |
* setup when your post type is saved to add _EventStartDate & _EventDuration | |
* meta fields add your own post types (line 10) to mach filters for the meta | |
* data. Then use tribe_get_events to query both all desired post types (be | |
* sure to set for future status) | |
*/ | |
function extend_events_startdate( $post_id ){ | |
//verify post is not a revision | |
if ( !wp_is_post_revision( $post_id ) && in_array( get_post_type( $post_id ), array( 'post' ) ) ) { |
<?php | |
/** add additional classes / id to the facetwp-template div generated by a facetwp | |
** layout template | |
**/ | |
add_filter( 'facetwp_shortcode_html', function( $output, $atts) { | |
if ( $atts['template'] = 'example' ) { // replace 'example' with name of your template | |
/** modify replacement as needed, make sure you keep the facetwp-template class **/ | |
$output = str_replace( 'class="facetwp-template"', 'id="masonry-container" class="facetwp-template small-up-1 medium-up-2 large-up-3"', $output ); | |
} | |
return $output; |
<?php | |
/** | |
* WARNING! THIS SNIPPET MAY BE OUTDATED. | |
* The latest version of this snippet can be found in the Gravity Wiz Snippet Library: | |
* https://github.com/gravitywiz/snippet-library/blob/master/gravity-forms/gw-gravity-forms-rename-uploaded-files.php | |
*/ | |
# First and Last Name | |
new GW_Rename_Uploaded_Files( array( | |
'form_id' => 628, |
<? | |
// Gravity Form Hook to SQL Database for Today's Dishes // | |
// the ### in gform_pre_render_### locates the id of your form // | |
add_filter('gform_pre_render_5', 'todays_dishes'); | |
function todays_dishes($form){ | |
foreach($form['fields'] as &$field){ |
if ( ! function_exists( 'helper_vc_fonts' ) ) { | |
function helper_vc_fonts( $fonts_list ) { | |
$poppins->font_family = 'Poppins'; | |
$poppins->font_types = '300 light regular:300:normal,400 regular:400:normal,500 bold regular:500:normal,600 bold regular:600:normal,700 bold regular:700:normal'; | |
$poppins->font_styles = 'regular'; | |
$poppins->font_family_description = esc_html_e( 'Select font family', 'helper' ); | |
$poppins->font_style_description = esc_html_e( 'Select font styling', 'helper' ); | |
$fonts_list[] = $poppins; | |
return $fonts_list; |
/* | |
Based on: http://wordpress.stackexchange.com/questions/42652/#answer-42729 | |
These functions provide a simple way to interact with TinyMCE (wp_editor) visual editor. | |
This is the same thing that WordPress does, but a tad more intuitive. | |
Additionally, this works for any editor - not just the "content" editor. | |
Usage: |
function pullJSON() { | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var sheets = ss.getSheets(); | |
var sheet = ss.getActiveSheet(); | |
var url="http://example.com/feeds?type=json"; // Paste your JSON URL here | |
var response = UrlFetchApp.fetch(url); // get feed | |
var dataAll = JSON.parse(response.getContentText()); // |
<?php | |
/** | |
* Remove the h1 tag from the WordPress editor. | |
* | |
* @param array $settings The array of editor settings | |
* @return array The modified edit settings | |
*/ | |
function remove_h1_from_editor( $settings ) { | |
$settings['block_formats'] = 'Paragraph=p;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre;'; | |
return $settings; |
<?php | |
$args = array( | |
'post_status'=>'publish', | |
'post_type'=>array(TribeEvents::POSTTYPE), | |
'posts_per_page'=>10, | |
//order by startdate from newest to oldest | |
'meta_key'=>'_EventStartDate', | |
'orderby'=>'_EventStartDate', | |
'order'=>'DESC', |