Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $img = do_shortcode('[user_meta_avatar_pic]'); // Here your get your img tag
- // Use DOMDocument to parse your img tag
- $dom = new DOMDocument();
- $dom->loadHTML($img);
- $img_url = base64_encode($dom->getElementsByTagName('img')->item(0)->getAttribute('src')); // Encode the extracted src from your img tag
Add Comment
Please, Sign In to add comment