Created
October 16, 2017 22:56
-
-
Save devonwaldon/69fe3fadee50d8dc46667cc504aaf88a to your computer and use it in GitHub Desktop.
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
/** | |
* Add external link CSS to the head | |
*/ | |
function external_link_css() { | |
echo ' | |
<style> | |
a:after { | |
content: "\e9a7"; | |
margin-left: .3em; | |
font-size: .8em; | |
font-family: "icomoon" !important; | |
speak: none; | |
font-style: normal; | |
font-weight: normal; | |
font-variant: normal; | |
text-transform: none; | |
} | |
a[href^="'.site_url().'"]:after, | |
a[href^="#"]:after, | |
a[href^="skype:"]:after, | |
a[href^="tel:"]:after, | |
a[href^="mailto:"]:after, | |
a:not([href]):after { | |
content: none; | |
} | |
</style>'; | |
} | |
add_action('wp_head', 'external_link_css'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment