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( 'gform_gf_field_create', 'convert_hidden_to_text', 10, 2 ); | |
function convert_hidden_to_text( $field, $properties ) { | |
if( $field->get_input_type() == 'hidden' ) { | |
$field = new GF_Field_Text( $properties ); | |
} | |
return $field; | |
} |
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( 'gform_currencies', function( $currencies ) { | |
$currencies['EUR']['decimals'] = 3; | |
return $currencies; | |
} ); | |
?> |
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 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
body img.gform_ajax_spinner { | |
display: none!important; | |
} |
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 | |
// Non WordPress | |
$current_url = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; | |
// WordPress Site | |
global $wp; | |
$current_url = add_query_arg( $wp->query_string, '', home_url( $wp->request ) ); |
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 | |
// [yvideo vid="4mEbABPtTv8" /] | |
add_shortcode( 'yvideo', 'hjs_do_video' ); | |
function hjs_do_video() { | |
$atts = shortcode_atts( array( | |
'vid' => '' | |
), $atts, 'yvideo' ); | |
return '<div class="embed-container"><iframe src="https://www.youtube.com/embed/' . $atts['vid'] . '" frameborder="0" allowfullscreen></iframe></div>'; |
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 | |
// Removes WooCommerce Product Tabs | |
add_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 98 ); | |
function woo_remove_product_tabs( $tabs ) { | |
unset( $tabs['description'] ); | |
unset( $tabs['additional_information'] ); | |
unset( $tabs['reviews'] ); |
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( 'gform_enable_field_label_visibility_settings', '__return_true' ); | |
?> |
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
body { font-family: Arial, sans-serif; } | |
.amp-wp-header { background: none; overflow: hidden; } | |
.amp-wp-header div { overflow: hidden; padding-bottom: 0; } | |
.amp-wp-title, h2, h3, h4 { font-weight: 400; } | |
.amp-wp-header a.amp-logo { | |
background: url(https://302mzo3s6lif441niv3xmjco-wpengine.netdna-ssl.com/wp-content/themes/nationaldebtrelief/images/logo-280.png) no-repeat; | |
margin: 0; | |
padding: 0; | |
width: 150px; | |
height: 45px; |
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 | |
$search_criteria = array(); | |
$form_id = array(108, 109); | |
$start_date = date( 'Y-m-d' ); | |
$end_date = date( 'Y-m-d' ); | |
$search_criteria['start_date'] = $start_date; | |
$search_criteria['end_date'] = $end_date; | |
$result = GFAPI::count_entries( $form_ids, $search_criteria ); | |
$formatted_number = number_format($result); |
OlderNewer