mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Themes: Improve support for placeholders in default headers.
When themes register default headers, they can use sprintf style placeholder strings in place of the template directory URI, which WordPress transforms in several places by running the value of `get_theme_support( 'custom-header', 'default-image' )` through `sprintf()`. This fixes a few places where WordPress skipped the `sprintf()` step and referenced the `get_theme_support()` value directly. Props bradyvercher for initial patch. See #38557. git-svn-id: https://develop.svn.wordpress.org/trunk@39123 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -639,7 +639,7 @@ class Custom_Image_Header {
|
||||
</tr>
|
||||
<?php endif;
|
||||
|
||||
$default_image = get_theme_support( 'custom-header', 'default-image' );
|
||||
$default_image = sprintf( get_theme_support( 'custom-header', 'default-image' ), get_template_directory_uri(), get_stylesheet_directory_uri() );
|
||||
if ( $default_image && get_header_image() != $default_image ) : ?>
|
||||
<tr>
|
||||
<th scope="row"><?php _e( 'Reset Image' ); ?></th>
|
||||
|
||||
Reference in New Issue
Block a user