Divi WordPress Theme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix Reply To: Disabling links to the media file in postings

Discussion in 'Misc WordPress Requests' started by essaysnark, Oct 17, 2017.

  1. essaysnark


    Reply To: Disabling links to the media file in postings, by essaysnark

    Thanks for clarifying!

    I just dug into this and though I’m no WP expert, this is what I think is happening:

    The code you’ve used is creating the default behavior for a new user which is in effect the first time they are adding images to a post.

    However, there’s a setting in the wp_usermeta table in the database that is preserving each user’s last saved preference in inserting images from the media library. You can test it on your side by changing the setting when you insert an image, then updating the post, then go back in and upload a brand-new image into the post. I’m pretty sure that the second time you upload an image, it’ll be set to how it was used last. However, other users’ preferences are saved separately.

    If you have access to phpmyadmin you can see this in the wp_usermeta table, in the user-settings option. It’ll be a value something like this:


    It’s the urlbutton value. In this example, “post” means that it’s linking to the image’s attachment page. If it says “urlbutton=none” then that’s the setting you want, and for that user, it’s not going to enter any link when inserting a new image from the media library — unless they change it when submitting, and save the post they’re working on, and then it’ll preserve that new link preference in this database setting instead.

    It should be possible to code a customization to force the users’ settings to “none” but that’ll likely irritate power users who do know how to use the feature and then have to do one more step to switch it to a link. Maybe there’s a plugin out there that will handle it for you?

    I could be wrong on how this is working (there definitely is not much google-able on this) but that’s my theory!

    Reply To: Disabling links to the media file in postings

Share This Page

Monarch Social Sharing Plugin