WordPress.org

Make WordPress Core

Ticket #18005: 18005.diff

File 18005.diff, 597 bytes (added by jkudish, 3 years ago)

patch for get_background_image props @rfc1437

  • wp-includes/theme.php

     
    16541654function get_background_image() { 
    16551655        $default = defined('BACKGROUND_IMAGE') ? BACKGROUND_IMAGE : ''; 
    16561656 
    1657         return get_theme_mod('background_image', $default); 
     1657        $url = get_theme_mod('background_image', $default); 
     1658        if ( is_ssl() ) { 
     1659                $url = str_replace( 'http://', 'https://', $url ); 
     1660        } else { 
     1661                $url = str_replace( 'https://', 'http://', $url ); 
     1662        } 
     1663        return $url; 
    16581664} 
    16591665 
    16601666/**