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( 'soliloquy_fc_slider_data', 'tgm_sol_remove_no_image' ); | |
function tgm_sol_remove_no_image( $data ) { | |
// Loop through the data and remove any items that don't have images. | |
foreach ( (array) $data['slider'] as $id => $item ) { | |
if ( empty( $item['src'] ) ) { | |
unset( $data['slider'][$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
<?php | |
/** | |
* Customize image size used in the loop by Genesis | |
* | |
* @author Jared Atchison | |
* @link http://jaredatchison.com/code/ | |
* @param string $image_size | |
* @global array $wp_query | |
* @global int $loop_counter | |
* @return string |
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 | |
/* | |
Filter the gravity form shortcode output to retreive the form from the main site | |
*/ | |
add_filter('gform_shortcode_form', 'gform_shortcode_form_mu_override',10,3); | |
function gform_shortcode_form_mu_override( $shortcode_string, $attributes, $content ){ |
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 remove_post_type_page_from_search() { | |
global $wp_post_types; | |
$wp_post_types['page']->exclude_from_search = true; | |
} | |
add_action('init', 'remove_post_type_page_from_search'); |
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 | |
/** | |
* Project Quote | |
* | |
*/ | |
function be_project_quote() { | |
global $wp_query, $be_testimonials; | |
if( !( ( 5 < $wp_query->found_posts && 5 == $wp_query->current_post % 6 ) || ( $wp_query->current_post == ( $wp_query->found_posts - 1 ) && 5 > $wp_query->found_posts ) ) ) |
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
jQuery(document).ready(function($) { | |
$('.cmb_id__prefix_layout_option').find('td').append('<div id="_prefix_layout_option_error" class="alert alert-error text-center"></div>'); | |
$('input[name="_prefix_layout_option"').addClass('layout_option'); | |
$('.cmb_id__prefix_thank_you_url').find('td').append('<div id="_prefix_thank_you_url_error" class="alert alert-error text-center"></div>'); | |
$('input[name="_prefix_thank_you_url"').addClass('thank_you_url'); | |
$("#post").validate({ | |
//debug: true, | |
ignore: [], | |
wrapper: 'p', |
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 | |
//* the the default upload path to work in normal WP structure | |
add_filter("gform_upload_path", "change_upload_path", 20, 2); | |
function change_upload_path($path_info, $form_id){ | |
$wp_upload_path = wp_upload_dir(); | |
$path_info["path"] = $wp_upload_path['path'] . '/'; | |
$path_info["url"] = $wp_upload_path['url'] . '/'; | |
return $path_info; |
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
.advanced-toggle .toggle-label { | |
cursor: pointer; | |
display: block; | |
line-height: 3em; | |
border-bottom: 1px solid #e9e9e9; | |
border-left: 1px solid #e9e9e9; | |
border-right: 1px solid #e9e9e9; | |
padding-left: .8em; | |
} | |
.advanced-toggle .inside .cmb-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 | |
/* | |
Plugin Name: Gravity Forms Fields Above | |
Plugin URI: https://gist.github.com/webaware/24e1bacb47b76a6aee7f | |
Description: move field labels from below to above fields in compound fields (e.g. Address, Name) | |
Version: 1 | |
Author: WebAware | |
Author URI: http://webaware.com.au/ | |
@link http://www.gravityhelp.com/forums/topic/change-position-of-sub-labels-on-advanced-fields |
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 a specific download to the cart if not already there | |
*/ | |
function sumobi_edd_add_download_to_cart_if_empty() { | |
$download_id = 123; | |
$cart = function_exists( 'edd_get_cart_contents' ) ? edd_get_cart_contents() : false; | |
OlderNewer