• Resolved Adrian Toll

    (@adriantoll)


    When not using Media Library Assistant, WordPress stores a per-user setting, “urlbutton” which sets the “Link To” dropdown to the previously selected value. This doesn’t seem to be happening when MLA is activated. Can this per-user setting be taken into account within MLA? I couldn’t find a setting to select that, and the two other possibilities that I’ve seen suggested:
    set_user_setting( 'urlbutton', 'none' );
    and
    update_option('image_default_link_type','none');
    don’t seem to work.

    Thanks

    Adrian

    http://wordpress.org/plugins/media-library-assistant/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author David Lingren

    (@dglingren)

    Thanks for this interesting question; I’ve never looked into these options.

    Media Library Assistant does not use or affect these options in any way I can find. However, the “user settings” are stored in browser cookies and seem to stick around in many cases, even if you use the functions you mention to change the option on the server side. The “urlbutton” is not really a per-user setting, it’s more like a “per-session” setting that attempts to remember the dropdown setting from page to page. The ‘image_default_link_type’ is a site-wide option, and I don’t see any WordPress UI for changing it.

    The wp_user_settings() code documentation says:

    * Saves and restores user interface settings stored in a cookie.
    *
    * Checks if the current user-settings cookie is updated and stores it. When no
    * cookie exists (different browser used), adds the last saved cookie restoring
    * the settings.

    I just ran a test, using phpMyAdmin to find the ‘image_default_link_type’ option and setting it to “none”. The new default didn’t get set reliably until I logged out of WordPress and logged back in. Once I did that the new default showed up with MLA active. I also tried switching From Internet Explorer to Firefox, and the new default showed up immediately in the different browser.

    There are three of these options ‘image_default_link_type’, ‘image_default_align’, and ‘image_default_size’. Perhaps adding them as options in the Settings/Media Library Assistant General tab would be useful; what do you think?

    In the interim, I think you’ll find that changing the value for ‘image_default_link_type’, however you do it, does eventually get reflected in the Media Manager Modal window whether MLA is active or not. I hope this answers your question and gives you what you need to set your defaults.

    Thanks for bringing these options to my attention, and for your interest in the plugin. I’m going to mark this topic resolved, but please update it if you have any problems or further questions.

    Thread Starter Adrian Toll

    (@adriantoll)

    Thank you for the extensive and thoughtful reply. I used

    update_option('image_default_link_type','none');

    to update the setting, which seems to have set the default correctly now. I’m not sure why it wasn’t earlier (although with the nature of these thing perhaps it was and I wasn’t looking in the right place!) You’re right that logging out and back in again made the change stick.

    If you added those settings in MLA I’d definitely use them – I always have to tell clients individually to change the Link To dropdown to None unless they have a specific reason for making their images available, and being able to set that by default would be great. Having the align and default size would probably be handy too, although those aren’t as key for me.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Default "Link To" as None’ is closed to new replies.