Make WordPress Core

Changeset 53712


Ignore:
Timestamp:
07/17/2022 01:04:17 AM (2 years ago)
Author:
SergeyBiryukov
Message:

Permalinks: Use home_url() to set the URL base on Permalink Settings screen.

This brings more consistency with how the home URL is retrieved elsewhere in the admin.

Follow-up to [1567], [1664], [2746], [3029], [4144], [53710].

Props sabernhardt.
Fixes #56235.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/options-permalink.php

    r53711 r53712  
    247247);
    248248
    249 $url_base = get_option( 'home' ) . $blog_prefix . $index_php_prefix;
     249$url_base = home_url( $blog_prefix . $index_php_prefix );
    250250
    251251$default_structure_inputs = array(
     
    253253        'id'      => 'plain',
    254254        'label'   => __( 'Plain' ),
    255         'example' => get_option( 'home' ) . '/?p=123',
     255        'example' => home_url( '/?p=123' ),
    256256        'value'   => $default_structures[0],
    257257    ),
Note: See TracChangeset for help on using the changeset viewer.