Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Takes a normal Image URL,
- * gets the absolute path and includes it via PHP
- * For use with SVG embeds
- *
- * @param String $image_url URL to the attachement
- */
- function inline_svg_embed( $image_url ) {
- if ( false !== strpos( $image_url, '.svg' ) ) :
- $image_url = str_replace( site_url(), '', $image_url);
- include( ABSPATH . $image_url );
- endif;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement