WordPress.org

Forums

Travelify
[resolved] SSL Compatibility (4 posts)

  1. lemmingzshadow
    Member
    Posted 9 months ago #

    Hi,

    would be nice if in the next version you could implement the following change for SSL compatibility:

    In "travelify/library/functions/functions.php"
    Line 43 (registering the google font) change:
    wp_register_style( 'google_font_ubuntu', 'http://fonts.googleapis.com/css?family=Ubuntu' );

    to:
    wp_register_style( 'google_font_ubuntu', set_url_scheme('http://fonts.googleapis.com/css?family=Ubuntu'));

    This will automatically replace http with https if SSL is enabled.

    Regards

  2. Silkalns
    Member
    Theme Author

    Posted 9 months ago #

    Thank you for pointing that out!

    I think a better solution would be to use it like this:

    wp_register_style( 'google_font_ubuntu', '//fonts.googleapis.com/css?family=Ubuntu' );

    As your given solution was introduced only in WP 3.5 and might break backward compatibility for some users. It would work for most but still someone would be lazy enough not to update to the latest version of WP.

    What do you think about this method?

  3. lemmingzshadow
    Member
    Posted 9 months ago #

    Hello,

    sure that's also okay. Did not notice that set_url_scheme was "that new".

  4. Silkalns
    Member
    Theme Author

    Posted 9 months ago #

    Yeah, in WordPress years it's new :)

Reply

You must log in to post.

About this Theme

About this Topic

Tags