Coding Standards: Move `wp-admin/custom-header.php` to `wp-admin/includes/class-custom-image-header.php`
This renames the file containing the `Custom_Image_Header` class to conform to the coding standards. This commit also includes: - A new `custom-header.php` that includes the new file, for anyone that may've been including the file directly. - Replaces references to the old filename with the new filename. See #47632. Built from https://develop.svn.wordpress.org/trunk@45654 git-svn-id: http://core.svn.wordpress.org/trunk@45465 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
83427a87a9
commit
24d08a9463
|
@ -518,7 +518,7 @@ class Custom_Background {
|
|||
$thumbnail = wp_get_attachment_image_src( $id, 'thumbnail' );
|
||||
set_theme_mod( 'background_image_thumb', esc_url_raw( $thumbnail[0] ) );
|
||||
|
||||
/** This action is documented in wp-admin/custom-header.php */
|
||||
/** This action is documented in wp-admin/includes/class-custom-image-header.php */
|
||||
do_action( 'wp_create_file_in_uploads', $file, $id ); // For replication
|
||||
$this->updated = true;
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -3679,7 +3679,7 @@ function wp_ajax_crop_image() {
|
|||
break;
|
||||
}
|
||||
|
||||
/** This filter is documented in wp-admin/custom-header.php */
|
||||
/** This filter is documented in wp-admin/includes/class-custom-image-header.php */
|
||||
$cropped = apply_filters( 'wp_create_file_in_uploads', $cropped, $attachment_id ); // For replication.
|
||||
$object = $wp_site_icon->create_attachment_object( $cropped, $attachment_id );
|
||||
unset( $object['ID'] );
|
||||
|
@ -3707,7 +3707,7 @@ function wp_ajax_crop_image() {
|
|||
*/
|
||||
do_action( 'wp_ajax_crop_image_pre_save', $context, $attachment_id, $cropped );
|
||||
|
||||
/** This filter is documented in wp-admin/custom-header.php */
|
||||
/** This filter is documented in wp-admin/includes/class-custom-image-header.php */
|
||||
$cropped = apply_filters( 'wp_create_file_in_uploads', $cropped, $attachment_id ); // For replication.
|
||||
|
||||
$parent_url = wp_get_attachment_url( $attachment_id );
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -31,7 +31,7 @@ final class WP_Customize_Header_Image_Setting extends WP_Customize_Setting {
|
|||
|
||||
// If _custom_header_background_just_in_time() fails to initialize $custom_image_header when not is_admin().
|
||||
if ( empty( $custom_image_header ) ) {
|
||||
require_once( ABSPATH . 'wp-admin/custom-header.php' );
|
||||
require_once( ABSPATH . 'wp-admin/includes/class-custom-image-header.php' );
|
||||
$args = get_theme_support( 'custom-header' );
|
||||
$admin_head_callback = isset( $args[0]['admin-head-callback'] ) ? $args[0]['admin-head-callback'] : null;
|
||||
$admin_preview_callback = isset( $args[0]['admin-preview-callback'] ) ? $args[0]['admin-preview-callback'] : null;
|
||||
|
|
|
@ -2604,7 +2604,7 @@ function _custom_header_background_just_in_time() {
|
|||
}
|
||||
|
||||
if ( is_admin() ) {
|
||||
require_once( ABSPATH . 'wp-admin/custom-header.php' );
|
||||
require_once( ABSPATH . 'wp-admin/includes/class-custom-image-header.php' );
|
||||
$custom_image_header = new Custom_Image_Header( $args[0]['admin-head-callback'], $args[0]['admin-preview-callback'] );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.3-alpha-45653';
|
||||
$wp_version = '5.3-alpha-45654';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue