diff --git a/public/opengraph.php b/public/opengraph.php index c8b03133b..d14213913 100644 --- a/public/opengraph.php +++ b/public/opengraph.php @@ -65,8 +65,13 @@ public static function prepare_twitter_username( $twitter_profile ) { */ public static function twitter_url_to_user( $twitter_profile ) { + // If they're below 4.4 (no wp_parse_url) bail. We can improve this for <4.4 later or just hold out until we drop 4.4 support. + if ( ! function_exists( 'wp_parse_url' ) ) { + return $twitter_profile; + } + //extract the twitter username from the url - + $parsed_twitter_profile = wp_parse_url( $twitter_profile ); $path = $parsed_twitter_profile['path'];