diff --git a/includes/um-short-functions.php b/includes/um-short-functions.php index cebfc9e0..442151be 100644 --- a/includes/um-short-functions.php +++ b/includes/um-short-functions.php @@ -1906,17 +1906,16 @@ function um_profile( $key ) { return $value; } - /** - * Get youtube video ID from url + * Get YouTube video ID from URL. * - * @param $url + * @param string $url * - * @return bool + * @return bool|string */ function um_youtube_id_from_url( $url ) { - $url = preg_replace( '/&ab_channel=.*/', '', $url ); - $url = preg_replace( '/\?si=.*/', '', $url ); + $url = preg_replace( '/&ab_channel=.*/', '', $url ); // ADBlock argument. + $url = preg_replace( '/\?si=.*/', '', $url ); // referral attribute. $pattern = '%^# Match any youtube URL @@ -1943,7 +1942,6 @@ function um_youtube_id_from_url( $url ) { return false; } - /** * Find closest number in an array *