Make WordPress Core

Changeset 45654


Ignore:
Timestamp:
07/17/2019 06:16:27 AM (5 years ago)
Author:
pento
Message:

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.

Location:
trunk
Files:
1 added
5 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/custom-background.php

    r45583 r45654  
    519519        set_theme_mod( 'background_image_thumb', esc_url_raw( $thumbnail[0] ) );
    520520
    521         /** This action is documented in wp-admin/custom-header.php */
     521        /** This action is documented in wp-admin/includes/class-custom-image-header.php */
    522522        do_action( 'wp_create_file_in_uploads', $file, $id ); // For replication
    523523        $this->updated = true;
  • trunk/src/wp-admin/includes/ajax-actions.php

    r45611 r45654  
    36803680            }
    36813681
    3682             /** This filter is documented in wp-admin/custom-header.php */
     3682            /** This filter is documented in wp-admin/includes/class-custom-image-header.php */
    36833683            $cropped = apply_filters( 'wp_create_file_in_uploads', $cropped, $attachment_id ); // For replication.
    36843684            $object  = $wp_site_icon->create_attachment_object( $cropped, $attachment_id );
     
    37083708            do_action( 'wp_ajax_crop_image_pre_save', $context, $attachment_id, $cropped );
    37093709
    3710             /** This filter is documented in wp-admin/custom-header.php */
     3710            /** This filter is documented in wp-admin/includes/class-custom-image-header.php */
    37113711            $cropped = apply_filters( 'wp_create_file_in_uploads', $cropped, $attachment_id ); // For replication.
    37123712
  • trunk/src/wp-admin/includes/class-custom-image-header.php

    r45653 r45654  
    826826            }
    827827
    828             /** This filter is documented in wp-admin/custom-header.php */
     828            /** This filter is documented in wp-admin/includes/class-custom-image-header.php */
    829829            $image = apply_filters( 'wp_create_file_in_uploads', $image, $attachment_id ); // For replication
    830830
     
    969969        }
    970970
    971         /** This filter is documented in wp-admin/custom-header.php */
     971        /** This filter is documented in wp-admin/includes/class-custom-image-header.php */
    972972        $cropped = apply_filters( 'wp_create_file_in_uploads', $cropped, $attachment_id ); // For replication
    973973
     
    13051305        }
    13061306
    1307         /** This filter is documented in wp-admin/custom-header.php */
     1307        /** This filter is documented in wp-admin/includes/class-custom-image-header.php */
    13081308        $cropped = apply_filters( 'wp_create_file_in_uploads', $cropped, $attachment_id ); // For replication
    13091309
  • trunk/src/wp-includes/customize/class-wp-customize-header-image-setting.php

    r42343 r45654  
    3232        // If _custom_header_background_just_in_time() fails to initialize $custom_image_header when not is_admin().
    3333        if ( empty( $custom_image_header ) ) {
    34             require_once( ABSPATH . 'wp-admin/custom-header.php' );
     34            require_once( ABSPATH . 'wp-admin/includes/class-custom-image-header.php' );
    3535            $args                   = get_theme_support( 'custom-header' );
    3636            $admin_head_callback    = isset( $args[0]['admin-head-callback'] ) ? $args[0]['admin-head-callback'] : null;
  • trunk/src/wp-includes/theme.php

    r45639 r45654  
    26052605
    26062606        if ( is_admin() ) {
    2607             require_once( ABSPATH . 'wp-admin/custom-header.php' );
     2607            require_once( ABSPATH . 'wp-admin/includes/class-custom-image-header.php' );
    26082608            $custom_image_header = new Custom_Image_Header( $args[0]['admin-head-callback'], $args[0]['admin-preview-callback'] );
    26092609        }
  • trunk/tests/phpunit/tests/image/header.php

    r42343 r45654  
    11<?php
    2 require_once( ABSPATH . 'wp-admin/custom-header.php' );
     2require_once( ABSPATH . 'wp-admin/includes/class-custom-image-header.php' );
    33
    44/**
Note: See TracChangeset for help on using the changeset viewer.