Make WordPress Core

Changeset 28893


Ignore:
Timestamp:
06/29/2014 10:28:52 AM (9 years ago)
Author:
johnbillion
Message:

Normalise the schemes used in get_home_path() so it returns the correct path for sites using SSL in the admin area but not the front end. Fixes #25767. Props GregLone for the initial patch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/file.php

    r28456 r28893  
    8080 */
    8181function get_home_path() {
    82     $home = get_option( 'home' );
    83     $siteurl = get_option( 'siteurl' );
     82    $home    = set_url_scheme( get_option( 'home' ), 'http' );
     83    $siteurl = set_url_scheme( get_option( 'siteurl' ), 'http' );
    8484    if ( ! empty( $home ) && 0 !== strcasecmp( $home, $siteurl ) ) {
    8585        $wp_path_rel_to_home = str_ireplace( $home, '', $siteurl ); /* $siteurl - $home */
Note: See TracChangeset for help on using the changeset viewer.