X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/38ca813a0e312e2768e5b9519f0415cd0aa84781..96bc8e88cf39086a9e0a883b8e2c311fe82a5e97:/wp-admin/custom-header.php diff --git a/wp-admin/custom-header.php b/wp-admin/custom-header.php index 24ec9b8b..ebeb2a5a 100644 --- a/wp-admin/custom-header.php +++ b/wp-admin/custom-header.php @@ -99,12 +99,20 @@ class Custom_Image_Header { * @since 3.0.0 */ function help() { - add_contextual_help( $this->page, '

' . __( 'You can set a custom image header for your site. Simply upload the image and crop it, and the new header will go live immediately.' ) . '

' . - '

' . __( 'If you want to discard your custom header and go back to the default included in your theme, click on the buttons to remove the custom image and restore the original header image.' ) . '

' . - '

' . __( 'Some themes come with additional header images bundled. If you see multiple images displayed, select the one you’d like and click the Save Changes button.' ) . '

' . - '

' . __( 'For more information:' ) . '

' . - '

' . __( 'Documentation on Custom Header' ) . '

' . - '

' . __( 'Support Forums' ) . '

' ); + get_current_screen()->add_help_tab( array( + 'id' => 'overview', + 'title' => __('Overview'), + 'content' => + '

' . __( 'You can set a custom image header for your site. Simply upload the image and crop it, and the new header will go live immediately.' ) . '

' . + '

' . __( 'If you want to discard your custom header and go back to the default included in your theme, click on the buttons to remove the custom image and restore the original header image.' ) . '

' . + '

' . __( 'Some themes come with additional header images bundled. If you see multiple images displayed, select the one you’d like and click the Save Changes button.' ) . '

' + ) ); + + get_current_screen()->set_help_sidebar( + '

' . __( 'For more information:' ) . '

' . + '

' . __( 'Documentation on Custom Header' ) . '

' . + '

' . __( 'Support Forums' ) . '

' + ); } /** @@ -241,9 +249,11 @@ class Custom_Image_Header { return; $this->default_headers = $_wp_default_headers; + $template_directory_uri = get_template_directory_uri(); + $stylesheet_directory_uri = get_stylesheet_directory_uri(); foreach ( array_keys($this->default_headers) as $header ) { - $this->default_headers[$header]['url'] = sprintf( $this->default_headers[$header]['url'], get_template_directory_uri(), get_stylesheet_directory_uri() ); - $this->default_headers[$header]['thumbnail_url'] = sprintf( $this->default_headers[$header]['thumbnail_url'], get_template_directory_uri(), get_stylesheet_directory_uri() ); + $this->default_headers[$header]['url'] = sprintf( $this->default_headers[$header]['url'], $template_directory_uri, $stylesheet_directory_uri ); + $this->default_headers[$header]['thumbnail_url'] = sprintf( $this->default_headers[$header]['thumbnail_url'], $template_directory_uri, $stylesheet_directory_uri ); } } @@ -627,7 +637,7 @@ wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?> function step_2() { check_admin_referer('custom-header-upload', '_wpnonce-custom-header-upload'); if ( ! current_theme_supports( 'custom-header-uploads' ) ) - wp_die( 'Cheatin’ uh?' ); + wp_die( __( 'Cheatin’ uh?' ) ); $overrides = array('test_form' => false); $file = wp_handle_upload($_FILES['import'], $overrides); @@ -713,7 +723,7 @@ wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?> function step_3() { check_admin_referer('custom-header-crop-image'); if ( ! current_theme_supports( 'custom-header-uploads' ) ) - wp_die( 'Cheatin’ uh?' ); + wp_die( __( 'Cheatin’ uh?' ) ); if ( $_POST['oitar'] > 1 ) { $_POST['x1'] = $_POST['x1'] * $_POST['oitar'];