diff --git a/wp-content/plugins/bp-dedication/includes/bp-dedication-create-dedication.php b/wp-content/plugins/bp-dedication/includes/bp-dedication-create-dedication.php index eb59d00..7a74601 100644 --- a/wp-content/plugins/bp-dedication/includes/bp-dedication-create-dedication.php +++ b/wp-content/plugins/bp-dedication/includes/bp-dedication-create-dedication.php @@ -77,6 +77,10 @@ function bp_dedication_create_new_dedication() { $videoData = array(); + if ((!isYoutubeVideo($video_url)) && (!isVimeoVideo($video_url))) { + return false; + } + if (isYoutubeVideo($video_url)) { $videoID = getYouTubeVideoID($video_url); @@ -182,6 +186,8 @@ function bp_dedication_create_new_dedication() { do_action( 'bp_dedication_create_new_dedication', $post_id, $friend_email, $bp->loggedin_user->id); return true; + } else { + return false; } } diff --git a/wp-content/plugins/bp-dedication/includes/bp-dedication-screens.php b/wp-content/plugins/bp-dedication/includes/bp-dedication-screens.php index 44640c3..c81d7a3 100644 --- a/wp-content/plugins/bp-dedication/includes/bp-dedication-screens.php +++ b/wp-content/plugins/bp-dedication/includes/bp-dedication-screens.php @@ -102,7 +102,7 @@ function bp_dedication_new_dedication() { bp_core_add_message( __( 'Your dedication was created!', 'bp-dedication' ) ); bp_core_redirect( bp_loggedin_user_domain() . bp_get_dedication_slug()); } else { - + bp_core_add_message( __( 'Error. Your dedication not was created!', 'bp-dedication' ) ); } }