Hey,
I would like to report the same problem as reported
This code will not work under https:
` if( get_option(‘avia_stylesheet_exists’.$safe_name) == ‘true’ )
{
$avia_upload_dir = wp_upload_dir();
$avia_dyn_stylesheet_url = $avia_upload_dir[‘baseurl’] . ‘/dynamic_avia/’.$safe_name.’.css’;
wp_register_style( ‘avia-dynamic’, $avia_dyn_stylesheet_url, array(), ‘1’, ‘screen’ );
wp_enqueue_style( ‘avia-dynamic’);
}
We are using version 2.4.5, but I’ve checked – the same code appears in version 2.5.2 from February.
Please advise.
Thanks,
Lior.
I think I’ve found a solution:
pd-fix-wp-upload-dir-ssl
Hi!
Please add this on functions.php:
function fix_ssl_upload_url( $url ) {
if ( is_ssl() )
$url = str_replace( 'http://', 'https://', $url );
return $url;
}
add_filter( 'upload_dir', 'fix_ssl_upload_url' );
Regards,
Ismael
Thanks Ismael,
I think I like the idea of an external plugin better. Just to think of all the changes we would have to do again if we decide to update to the latest enfold version makes me horrified.
But what code version do you think is more suitable – the one I’ve found (from about 3 years ago) or the one you posted?
Thanks.