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
//Your html code snippet | |
<?php echo(encode_email(get_field('variable-you-choose')));?> | |
//Your Functions file add on | |
function encode_email($e) { | |
$output = ""; | |
for ($i = 0; $i < strlen($e); $i++) { $output .= '&#'.ord($e[$i]).';'; } | |
return $output; | |
} |
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 add_grav_forms(){ | |
$role_object = get_role( 'editor' ); | |
$role_object->add_cap( 'edit_theme_options' ); | |
$role = get_role('editor'); | |
$role->add_cap('gform_full_access'); | |
} | |
add_action('admin_init','add_grav_forms'); |
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 sameHeights(selector) { | |
var selector = selector || '[data-key="sameHeights"]', | |
query = document.querySelectorAll(selector), | |
elements = query.length, | |
max = 0; | |
if (elements) { | |
while (elements--) { | |
var element = query[elements]; | |
if (element.clientHeight > max) { | |
max = element.clientHeight; |
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 swg_scripts() { | |
// Load our main stylesheet. | |
wp_enqueue_style( 'swg-style', get_stylesheet_uri() ); | |
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { | |
wp_enqueue_script( 'comment-reply' ); | |
} | |
wp_enqueue_script( 'swg-superfish', get_template_directory_uri() . '/js/superfish.js', array( 'jquery' ), '20131209', true ); |