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 | |
function intw_gf_sublabels() { | |
if( is_page(39) ) { ?> | |
<script type="text/javascript"> | |
jQuery(document).ready(function() { | |
jQuery('.ginput_complex label').each(function(i,e){ | |
sublabel = jQuery('<label>').append(jQuery(e).clone()).remove().html(); | |
jQuery(e).siblings().after(sublabel); | |
jQuery(e).remove(); |
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 | |
function intw_head() { | |
if ( !current_user_can('administrator') ) { ?> | |
<script type="text/javascript"> | |
var _gaq = _gaq || []; | |
_gaq.push(['_setAccount', 'UA-XXXXXXXX-X']); | |
_gaq.push(['_setDomainName', 'example.com']); | |
_gaq.push(['_trackPageview']); | |
(function() { |
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 | |
// WordPress function that encodes an email address (and adds mailto: link) | |
echo antispambot('[email protected]', 1); | |
?> | |
<?php | |
// Shortcode to encode email address in a mailto: link | |
function protect_email_address( $atts , $content=null ) { | |
for ($i = 0; $i < strlen($content); $i++) $encodedmail .= "&#" . ord($content[$i]) . ';'; |
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 | |
function intw_autoset_featuredimage() { | |
global $post; | |
$already_has_thumb = has_post_thumbnail($post->ID); | |
if (!$already_has_thumb) { | |
$attached_image = get_children( "post_parent=$post->ID&post_type=attachment&post_mime_type=image&numberposts=1" ); | |
if ($attached_image) { | |
foreach ($attached_image as $attachment_id => $attachment) { | |
set_post_thumbnail($post->ID, $attachment_id); |
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 custom CSS class to <body> tag | |
add_filter('body_class','intw_body_class'); | |
function intw_body_class($classes) { | |
$url = get_bloginfo('url'); | |
if( ($url == 'http://siteA.com') || ($url == 'http://devserver.com/siteA') ) { | |
$classes[] = 'siteA'; | |
return $classes; | |
} elseif ( ($url == 'http://siteB.com') || ($url == 'http://devserver.com/siteB') ) { |
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 | |
// Shortcode: [SHORTCODE_TAG] | |
add_shortcode('SHORTCODE_TAG', 'intw_shortcode_SHORTCODE_TAG'); | |
function intw_shortcode_SHORTCODE_TAG($atts) { | |
extract( shortcode_atts( array( | |
'att1' => 'DEFAULT_VALUE', | |
'att2' => 'DEFAULT_VALUE', | |
), $atts ) ); | |
ob_start(); ?> |
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
input::-webkit-input-placeholder { /* Webkit - Yes, double :: is correct! */ | |
color: #eaeaea; | |
} | |
input:-moz-placeholder { /* Firefox 4-18 */ | |
color: #eaeaea; | |
} | |
input::-moz-placeholder{ /* Firefox 19+ */ | |
color: #eaeaea; | |
} | |
input:-ms-input-placeholder { /* IE 10+ */ |
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
.gform_footer.top_label { | |
float: right; | |
margin: -45px 0 0 0; | |
} |
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 | |
/*Template Name: Blank */ | |
function render_content() { | |
//CODE and INFORMATION GOES IN THIS FUNCTION | |
} | |
add_action( 'builder_layout_engine_render_content', 'render_content' ); |