bulk change of image setting “link to” to “link to: image url “

i want every image present on my wordpress site with setting “link to: none” or “link to: post url” became in “link to :image url”

ho make this for old post and for new post ?

i tried this code in function.php of my theme but not work :

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


        update_option('image_default_link_type', 'file');

}
add_action('admin_init', 'wpb_imagelink_setup', 10);

or

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


        update_option('image_default_link_type', 'image url');

}
add_action('admin_init', 'wpb_imagelink_setup', 10);

attention: this for photo also with external URL

http://postimg.org/image/msymf73zp/

0

Leave a Comment