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 | |
// Always show Kitchen Sink in WYSIWYG Editor | |
add_filter( 'tiny_mce_before_init', 'yourprefix_unhide_kitchensink' ); | |
function yourprefix_unhide_kitchensink($args) { | |
$args['wordpress_adv_hidden'] = false; | |
return $args; | |
} |
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 | |
// Load custom favicon | |
add_filter( 'genesis_pre_load_favicon', 'custom_favicon_filter' ); | |
function custom_favicon_filter( $favicon_url ) { | |
return CHILD_URL .'/images/favicon.ico'; | |
} |
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 | |
// http://www.gravityhelp.com/forums/topic/conditional-logic-for-user-notifications | |
// update the "2" to the ID of your form | |
add_filter('gform_pre_submission_filter_2', 'your_prefix_conditional_message'); | |
function your_prefix_conditional_message($form){ | |
// update the "7_1" following "input_" to the IDs of your fields | |
$choice1 = RGForms::post('input_7_1'); | |
$choice2 = RGForms::post('input_7_2'); | |
$choice3 = RGForms::post('input_7_3'); |
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 Custom images sizes to Media Uploader */ | |
add_filter( 'image_size_names_choose', 'your_image_size_names_choose' ); | |
function your_image_size_names_choose( $sizes ) { | |
$sizes = get_intermediate_image_sizes(); | |
$add_sizes = array(); |
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( 'genesis_attr_content', 'yoast_schema_empty', 20 ); | |
add_filter( 'genesis_attr_entry', 'yoast_schema_event', 20 ); | |
add_filter( 'genesis_attr_entry-title', 'yoast_itemprop_name', 20 ); | |
add_filter( 'genesis_attr_entry-content', 'yoast_itemprop_description', 20 ); | |
add_filter( 'genesis_post_title_output', 'yoast_title_link_schema', 20 ); | |
/** | |
* We'll use the post info output to add more meta data about the event. |
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 | |
$select = '<select>'; | |
$forms = RGFormsModel::get_forms( null, 'title' ); | |
foreach( $forms as $form ): | |
$select .= '<option id="' . $form->id . '">' . $form->title . '</option>'; | |
endforeach; | |
$select .= '</select>'; | |
echo "GF dropdown: $select"; |
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
/* 4 column Gravity Forms custom ready class ------------------------------------------------------*/ | |
.gform_wrapper .top_label li.gfield.gf_first_quarter, | |
.gform_wrapper .top_label li.gfield.gf_second_quarter, | |
.gform_wrapper .top_label li.gfield.gf_third_quarter, | |
.gform_wrapper .top_label li.gfield.gf_fourth_quarter { | |
margin:0 0 8px 0; | |
width:24%; | |
} |
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 span to menu items with icon class so we can hide the text and show icons instead | |
* | |
* @link http://codex.wordpress.org/Function_Reference/wp_get_nav_menu_items | |
*/ | |
add_filter( 'walker_nav_menu_start_el', 'hrt_span_to_nav_menu', 10, 4 ); | |
function hrt_span_to_nav_menu( $item_output, $item, $depth, $args ) { | |
if ( isset( $item->classes ) && !empty( $item->classes ) ) { |
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
// Extra big for Twitter Bootstrap | |
@media screen and (min-width: 1400px) { | |
.container { | |
width: 1370px; | |
} | |
} | |
@media screen and (min-width: 1600px) { | |
.container { | |
width: 1570px; |
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 | |
// conditional to check whether Gravity Forms shortcode is on a page | |
function lwd_has_gform() { | |
global $post; | |
$all_content = get_the_content(); | |
if (strpos($all_content,'[gravityform') !== false) { | |
return true; | |
} else { | |
return false; | |
} |
OlderNewer