Support ForumHTTPS browser warning for main-options.css – wp_upload_dir function HTTPS problem – Support Forum https://support.ishyoboy.com/forums/topic/https-browser-warning-for-main-options-css-wp_upload_dir-function-https-problem/feed Wed, 14 May 2025 04:14:39 +0200 http://bbpress.org/?v=2.5.12-6148 en-US https://support.ishyoboy.com/forums/topic/https-browser-warning-for-main-options-css-wp_upload_dir-function-https-problem/#post-12817 <![CDATA[HTTPS browser warning for main-options.css – wp_upload_dir function HTTPS problem]]> https://support.ishyoboy.com/forums/topic/https-browser-warning-for-main-options-css-wp_upload_dir-function-https-problem/#post-12817 Thu, 05 May 2016 02:15:40 +0000 JaraJara Hi,

I have a HTTP website, but in some pages (i.e. Checkout, Shopping cart, etc.) I need to use HTTPS. For those cases I’m receiving the security warning regarding the resource main-options.css that is being loaded always through HTTP.

I found the code in the functions.php of Boldial. I could copy and overwrite the function ishyoboy_load_my_scripts() through my Boldial-Child theme to fix this is a big piece of code that could be updated by you guys in the future and cause more trouble just for that fix.

I can add a temporary fix directly into the main Boldial theme… In the meantime Could you guys please fix this call? Instead of using/forcing “HTTP”, use just a scheme-less URI using simply “//” (Protocol Relative URL).

Thanks.

;)

]]>
https://support.ishyoboy.com/forums/topic/https-browser-warning-for-main-options-css-wp_upload_dir-function-https-problem/#post-12818 <![CDATA[Reply To: HTTPS browser warning for main-options.css – wp_upload_dir function HTTPS problem]]> https://support.ishyoboy.com/forums/topic/https-browser-warning-for-main-options-css-wp_upload_dir-function-https-problem/#post-12818 Thu, 05 May 2016 03:00:20 +0000 JaraJara Just FYI, I added 1 line of code that solved the problem (around Line 263):

$uploads_url = str_replace(‘https://’, ‘//’, $uploads_url);

;)

]]>
https://support.ishyoboy.com/forums/topic/https-browser-warning-for-main-options-css-wp_upload_dir-function-https-problem/#post-12822 <![CDATA[Reply To: HTTPS browser warning for main-options.css – wp_upload_dir function HTTPS problem]]> https://support.ishyoboy.com/forums/topic/https-browser-warning-for-main-options-css-wp_upload_dir-function-https-problem/#post-12822 Thu, 05 May 2016 06:05:43 +0000 IshYoBoy Hi JaraJara,

Seems like the problem (not appearing always) comes from the function “wp_upload_dir()”. Here is some discussion about it supporting HTTPS. https://core.trac.wordpress.org/ticket/25449

In the code of the function you can find this line:
$uploads = apply_filters( 'upload_dir', $cache[ $key ] );

So basically you can use this ‘upload_dir’ filter to resolve the problem from a child theme. This has not been an issue so far so we’d rather keep the code as it was not to cause any problems for other users.

Is this ok for you?

Cheers

A 5 star rating is always a great motivation for us if you are happy with our theme or support!
Themeforest | MojoMarketplace | Creative Market

]]>
https://support.ishyoboy.com/forums/topic/https-browser-warning-for-main-options-css-wp_upload_dir-function-https-problem/#post-12833 <![CDATA[Reply To: HTTPS browser warning for main-options.css – wp_upload_dir function HTTPS problem]]> https://support.ishyoboy.com/forums/topic/https-browser-warning-for-main-options-css-wp_upload_dir-function-https-problem/#post-12833 Thu, 05 May 2016 18:07:42 +0000 JaraJara Worked like a charm!

Thank you guys! Superb technical knowledge!
Just for future reference to folks with the same problem…
I added to my Boldial Child functions.php:

Even if WP comes with an update, nothing in my code will break…

;)

]]>
https://support.ishyoboy.com/forums/topic/https-browser-warning-for-main-options-css-wp_upload_dir-function-https-problem/#post-12848 <![CDATA[Reply To: HTTPS browser warning for main-options.css – wp_upload_dir function HTTPS problem]]> https://support.ishyoboy.com/forums/topic/https-browser-warning-for-main-options-css-wp_upload_dir-function-https-problem/#post-12848 Fri, 06 May 2016 06:39:19 +0000 IshYoBoy Hey,

Thank you very much and also thanks for sharing the code! Very nicely and safely done ;)

Cheers

A 5 star rating is always a great motivation for us if you are happy with our theme or support!
Themeforest | MojoMarketplace | Creative Market

]]>