Skip to content

Instantly share code, notes, and snippets.

View hweeks's full-sized avatar

Aech Weeks hweeks

View GitHub Profile
@hweeks
hweeks / Email Encodin
Created April 9, 2014 15:44
WordPress Email Encoder using ACF
//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;
}
/* Plugin */
wp_enqueue_script( 'plugin-js', get_template_directory_uri() . '/js/filename.js', array( 'jquery' ), '1', true );
wp_enqueue_style( 'plugin-css', get_template_directory_uri() . '/css/filename.css' );