• Resolved bikinibomb

    (@bikinibomb)


    When adding new links like “somedomain.com” with nothing else is there any way to make them default to “https://somedomain.com” after saving, instead of “http://somedomain.com”? Most sites are going secure using https these days. I tried to find the place to change that default using string locator, thought it was at…

    $options[‘linkaddrdefvalue’] = ‘http://’;

    …but no change?

    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Yannick Lefebvre

    (@jackdewey)

    Are you talking about adding links as an admin of the site through the admin interface? Or about users submitting links through the front-end interface?

    The setting you have found is for user-submitted links. The line of code you found is the default value for the protocol field that is found under the User Submission tab of Library Configuration.

    If you are looking for a new default for links submitted from admin interface, I will need to do some work for this.

    Thread Starter bikinibomb

    (@bikinibomb)

    For admin, if there was an easy way I could change it you could point me to the file. Since it’s not that big of a deal to add an “s” to the http and most sites will still work with http I wouldn’t worry a lot about working on that. Great plugin, thanks for your help.

    • This reply was modified 7 years ago by bikinibomb.
    Plugin Author Yannick Lefebvre

    (@jackdewey)

    No quick place to point you to. The problem is the WordPress core function esc_url. If the link it receives does not contain a protocol, it adds http by default. There is no parameter on the function to change that.

    So I had to work around that issue in my code.

    Update to latest version of Link Library and you will see a new option to set the default protocol for links that are submitted without protocol in admin. The default is http, so as not to break the habits of people, but you can now change it to https.

    Let me know if this works for you and please consider donating to support this plugin’s development.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘https as default’ is closed to new replies.