'',
'size' => '200',
'default' => '',
'alt' => ''
), $atts));
if( empty($email) )
return '';
$output = get_avatar($email, $size, $default, $alt);
return $output;
}
add_shortcode('gravatar', 'danix_gravatar');
/**
* The google analytics code
*
*/
/*function danix_google_anal() {
if ( function_exists('cn_cookies_accepted') && cn_cookies_accepted() ) { ?>
'640',
"height" => '480',
"src" => ''
), $atts));
return '';
}
add_shortcode("googlemaps", "danix_gmaps");
*/
/*
* Swap src with data-src inside img tags to use lazyload
*/
function dagreynix_lazy_load($atts) {
$default = get_template_directory_uri() . '/img/standard-post-thumb.png';
if ( array_key_exists('src', $atts) ) {
$atts['data-src'] = $atts['src'];
$atts['src'] = $default;
}
return $atts;
}
// add_filter( 'wp_get_attachment_image_attributes', 'dagreynix_lazy_load', 10, 2 );