This file contains hidden or 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_action( 'gform_entry_info', 'djb_gform_entry_info', 10, 2 ); | |
function djb_gform_entry_info( $form, $lead ) { | |
// Show IP info link if address is IPv4 and not in private or reserved range | |
if ( isset( $lead['ip'] ) && filter_var( $lead['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE ) ) { | |
$ip_info_url = 'http://' . $lead['ip'] . '.ipaddress.com'; | |
echo '<a href="' . esc_url( $ip_info_url ) . '" target="_blank">IP info</a>'; | |
} | |
if ( isset( $lead['ip'] ) && isset( $lead['user_agent'] ) ) { | |
echo '<br><br>'; |
This file contains hidden or 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
/** | |
* ============================================== | |
* ENQUEUE_GF_HIGHER | |
* ============================================== | |
* Enqueues gravity forms scripts higher on the page | |
* | |
* | |
* @since 0.1.0 | |
* @version 0.1.0 | |
* @author chriscarvache |
This file contains hidden or 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
.ribbon { | |
width: 80%; | |
position: relative; | |
color: #fff; | |
text-align: center; | |
padding: 1em 2em; /* Adjust to suit */ | |
margin: 0 auto 2em; /* Based on 24px vertical rhythm. 48px bottom margin - normally 24 but the ribbon 'graphics' take up 24px themselves so we double it. */ | |
} | |
.ribbon:before, .ribbon:after { | |
content: ""; |