X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/80b7979fccf09a75af3f4c111fa27060ae6dbf85..80e421fa26a0ef412d7c67749a64a6c1919d515a:/wp-admin/custom-header.php?ds=sidebyside diff --git a/wp-admin/custom-header.php b/wp-admin/custom-header.php index fc9d4f12..14f01dfb 100644 --- a/wp-admin/custom-header.php +++ b/wp-admin/custom-header.php @@ -93,12 +93,6 @@ class Custom_Image_Header { add_action("admin_head-$page", array(&$this, 'js'), 50); if ( $this->admin_header_callback ) add_action("admin_head-$page", $this->admin_header_callback, 51); - - if ( isset( $_REQUEST['context'] ) && $_REQUEST['context'] == 'custom-header' ) { - add_filter( 'attachment_fields_to_edit', array( $this, 'attachment_fields_to_edit' ), 10, 2 ); - add_filter( 'media_upload_tabs', array( $this, 'filter_upload_tabs' ) ); - add_filter( 'media_upload_mime_type_links', '__return_empty_array' ); - } } /** @@ -130,8 +124,8 @@ class Custom_Image_Header { 'title' => __('Header Text'), 'content' => '

' . sprintf( __( 'For most themes, the header text is your Site Title and Tagline, as defined in the General Settings section.' ), admin_url( 'options-general.php' ) ) . '

' . - '

' . __( 'In the Header Text section of this page, you can choose whether to display this text or hide it. You can also choose a color for the text by typing in a legitimate HTML hex value (eg: “#ff0000” for red) or by clicking “Select a Color” and dialing in a color using the color picker.') . '

' . - '

' . __( 'Don’t forget to Save Changes when you’re done!') . '

' + '

' . __( 'In the Header Text section of this page, you can choose whether to display this text or hide it. You can also choose a color for the text by clicking the Select Color button and either typing in a legitimate HTML hex value, e.g. “#ff0000” for red, or by choosing a color using the color picker.' ) . '

' . + '

' . __( 'Don’t forget to click “Save Changes” when you’re done!') . '

' ) ); get_current_screen()->set_help_sidebar( @@ -171,11 +165,10 @@ class Custom_Image_Header { $step = $this->step(); if ( ( 1 == $step || 3 == $step ) ) { - add_thickbox(); - wp_enqueue_script( 'media-upload' ); + wp_enqueue_media(); wp_enqueue_script( 'custom-header' ); if ( current_theme_supports( 'custom-header', 'header-text' ) ) - wp_enqueue_script('farbtastic'); + wp_enqueue_script( 'wp-color-picker' ); } elseif ( 2 == $step ) { wp_enqueue_script('imgareaselect'); } @@ -190,7 +183,7 @@ class Custom_Image_Header { $step = $this->step(); if ( ( 1 == $step || 3 == $step ) && current_theme_supports( 'custom-header', 'header-text' ) ) - wp_enqueue_style('farbtastic'); + wp_enqueue_style( 'wp-color-picker' ); elseif ( 2 == $step ) wp_enqueue_style('imgareaselect'); } @@ -215,12 +208,6 @@ class Custom_Image_Header { return; } - if ( isset( $_POST['resettext'] ) ) { - check_admin_referer( 'custom-header-options', '_wpnonce-custom-header-options' ); - remove_theme_mod('header_textcolor'); - return; - } - if ( isset( $_POST['removeheader'] ) ) { check_admin_referer( 'custom-header-options', '_wpnonce-custom-header-options' ); $this->remove_header_image(); @@ -332,7 +319,6 @@ class Custom_Image_Header { function js_1() { ?>