diff --git a/wp-admin/custom-background.php b/wp-admin/custom-background.php index 1ee1dba35e..a5b5f9dc76 100644 --- a/wp-admin/custom-background.php +++ b/wp-admin/custom-background.php @@ -53,6 +53,8 @@ class Custom_Background { function __construct($admin_header_callback = '', $admin_image_div_callback = '') { $this->admin_header_callback = $admin_header_callback; $this->admin_image_div_callback = $admin_image_div_callback; + + add_action( 'admin_menu', array( $this, 'init' ) ); } /** @@ -226,7 +228,7 @@ if ( get_background_image() ) { - +
%1$d × %2$d pixels will be used as-is.' ) . '
', HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT );
+ printf( __( 'Images of exactly %1$d × %2$d pixels will be used as-is.' ) . '
', get_theme_support( 'custom-header', 'width' ), get_theme_support( 'custom-header', 'height' ) );
} elseif ( current_theme_supports( 'custom-header', 'flex-height' ) ) {
if ( ! current_theme_supports( 'custom-header', 'flex-width' ) )
- printf( __( 'Images should be at least %1$d pixels wide.' ) . '
', HEADER_IMAGE_WIDTH );
+ printf( __( 'Images should be at least %1$d pixels wide.' ) . ' ', get_theme_support( 'custom-header', 'width' ) );
} elseif ( current_theme_supports( 'custom-header', 'flex-width' ) ) {
if ( ! current_theme_supports( 'custom-header', 'flex-height' ) )
- printf( __( 'Images should be at least %1$d pixels tall.' ) . '
', HEADER_IMAGE_HEIGHT );
+ printf( __( 'Images should be at least %1$d pixels tall.' ) . ' ', get_theme_support( 'custom-header', 'height' ) );
}
if ( current_theme_supports( 'custom-header', 'flex-height' ) || current_theme_supports( 'custom-header', 'flex-width' ) ) {
- $header_support = get_theme_support( 'custom-header' );
- if ( !empty( $header_support[ 0 ][ 'suggested-width' ] ) )
- printf( __( 'Suggested width is %1$d pixels.' ) . '
', absint( $header_support[ 0 ][ 'suggested-width' ] ) );
- if ( !empty( $header_support[ 0 ][ 'suggested-height' ] ) )
- printf( __( 'Suggested height is %1$d pixels.' ) . '
', absint( $header_support[ 0 ][ 'suggested-height' ] ) );
+ if ( current_theme_supports( 'custom-header', 'width' ) )
+ printf( __( 'Suggested width is %1$d pixels.' ) . ' ', get_theme_support( 'custom-header', 'width' ) );
+ if ( current_theme_supports( 'custom-header', 'height' ) )
+ printf( __( 'Suggested height is %1$d pixels.' ) . ' ', get_theme_support( 'custom-header', 'height' ) );
}
?>