Last active
December 11, 2015 22:39
-
-
Save rodrigomuniz/4670975 to your computer and use it in GitHub Desktop.
Teste
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
<?php | |
function get_content_link( $content = false, $echo = false ) { | |
if ( $content === false ) | |
$content = get_the_content(); | |
$content = preg_match_all( '/hrefs*=s*["']([^"']+)/', $content, $links ); | |
$content = $links[1][0]; | |
if ( empty($content) ) { | |
$content = false; | |
} | |
return $content; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment