Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #232085

    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.

    #232094

    I think I’ve found a solution:
    pd-fix-wp-upload-dir-ssl

    #232097

    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

    #232101

    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.

    #232206

    Hi!

    You can create a child theme if you want to preserve the modifications that you did. Add the code I posted on the child theme’s functions.php.

    Cheers!
    Ismael

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.