Tagged: social icons
Please see item number 2 on this list for validation issue we are seeing:
It appears to have an issue with this portion of code:
data-av_icon=’’
Is there an easy fix for this? After digging I found it was linked to av_icon_string function built into the theme. Perhaps there is an easy rewrite we can do in functions.php to eliminate this?
Thank you!
Hey pcmichiana,
That is the way we are loading the icons at the theme, so there are not alternatives to use something else.
You could try to disable the icon on those positions – if that removed the data-av-icon and then add a :before rule, with a CSS content to add the icon
That is the only solution can think off.
Best regards,
Basilis
There’s no way to edit the function in functions.php to remove the character out of compliance with W3C?
Hi,
I found a function that may help:
function removeunicode($content) {
$content = preg_replace('/[\x00-\x1F\x80-\xFF]/', '', $content);
return $content;
}
add_filter('the_content', 'removeunicode');
add_filter('the_title', 'removeunicode');
It is meant to remove any characters in the hex ranges 0-31 and 128-255, but you could change it to remove only the one you want if you changed it to the hex you wanted to remove.
Best regards,
Mike
Unfortunately that did not remove the above character from the line of code. Any other suggestions?
Thank you for your input on this by the way!
Hi,
The icon elements in the page will not render correctly if you remove the av_icon data attribute.
[data-av_icon]:before {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-weight: normal;
content: attr(data-av_icon);
speak: none;
}
It’s not a critical error so you can ignore the warning from the validator.
Best regards,
Ismael
Ismael
That makes sense, thanks for letting me know!