How to Automatically Remove Default Video Links in WordPress

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

Leave a Reply

Your email address will not be published. Required fields are marked *