I am looking for the user to redirect to the home page when the user tries to access the video permalink.

function wpb_imagelink_setup() {
$image_set = get_option( 'image_default_link_type' );

if ($image_set !== 'none') {
    update_option('image_default_link_type', 'none');
add_action('admin_init', 'wpb_imagelink_setup', 10);

I tried the above code, but it doesn’t work

Read more here: How to Automatically Remove Default Video Links in WordPress


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: