WordPress.org

Ready to get started?Download WordPress

Forums

Customizr
[resolved] Customizr + SSL + logo issues (4 posts)

  1. everglate
    Member
    Posted 2 months ago #

    Hello again,

    I have bumped just into another problem.

    I build up a shop with WooCommerce for which I am of use SSL. Now it is in such a way that the logo will not hand over in HTTPS what entails that all sides are spent without SSL.

    I have more exactly had a look at the file: class-header-header_main.php and found something:

    function tc_logo_title_display() {
           	//rebuild the logo path : check if the full path is already saved in DB. If not, then rebuild it.
           	$upload_dir 			= wp_upload_dir();
           	$saved_path 			= esc_url ( tc__f( '__get_option' , 'tc_logo_upload') );
           	if ( false !== strpos( $saved_path , '/wp-content/' ) ) {
           		$logo_src    		= $saved_path ;
           	} else {
           		$logo_src 			= $upload_dir['baseurl'] . $saved_path;
           	}
           	$logo_src    			= apply_filters( 'tc_logo_src' , $logo_src ) ;
    
           	$logo_resize 			= esc_attr( tc__f( '__get_option' , 'tc_logo_resize') );
          	$accepted_formats		= array('jpg', 'jpeg', 'png' ,'gif');
           	$filetype 				= wp_check_filetype ($logo_src);
           	$logo_class 			= apply_filters( 'tc_logo_class', 'brand span3' );
    		?>

    Can I add to the code something to hand over the logo in HTTPS?

    Or is it the wrong php-file?

    Thx a lot.

    everglate

  2. d4z_c0nf
    Member
    Posted 2 months ago #

    Tried this simple solution in your child-theme functions.php?
    http://www.kriesi.at/support/topic/loading-resources-from-uploads-folder-with-ssl/#post-232097

    So something like this:

    function fix_ssl_upload_url( $url ) {
        if ( is_ssl() ){
            $url['url'] = str_replace( 'http://', 'https://', $url['url'] );
            $url['baseurl'] = str_replace( 'http://', 'https://', $url['baseurl'] );
        }
        return $url;
    
    }
    add_filter( 'upload_dir', 'fix_ssl_upload_url' );
  3. everglate
    Member
    Posted 2 months ago #

    Thank you very much! Works! :-)

  4. d4z_c0nf
    Member
    Posted 2 months ago #

    Glad you solved.
    Could you mark this topic as resolved?
    Thanks

Reply

You must log in to post.

About this Theme

About this Topic

Tags