Definition:
function twentyeleven_url_grabber() {}
Return the URL for the first link found in the post content.
Return values
returns:URL or false when no link is present.
Source code
function twentyeleven_url_grabber() { if ( ! preg_match( '/<a\s[^>]*?href=[\'"](.+?)[\'"]/is', get_the_content(), $matches ) ) return false; return esc_url_raw( $matches[1] ); }
14761
No comments yet... Be the first to leave a reply!