From 45a22f371eae68d9ad2a2e910c8338494618fe1f Mon Sep 17 00:00:00 2001 From: Mykyta Synelnikov Date: Fri, 22 Sep 2023 16:50:51 +0300 Subject: [PATCH] - updated comments; --- includes/um-short-functions.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) 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 *