Merge pull request #1503 from ultimatemember/fix/youtube_validation

Youtube validation
This commit is contained in:
Mykyta Synelnikov
2024-04-11 15:17:48 +03:00
committed by GitHub
+3
View File
@@ -1912,6 +1912,9 @@ function um_profile( $key ) {
* @return bool|string
*/
function um_youtube_id_from_url( $url ) {
if ( ! $url ) {
return true;
}
$url = preg_replace( '/&ab_channel=.*/', '', $url ); // ADBlock argument.
$url = preg_replace( '/\?si=.*/', '', $url ); // referral attribute.