Make WordPress Core

Ticket #40231: 40231.6.diff

File 40231.6.diff, 3.7 KB (added by westonruter, 8 years ago)

Add remaining since tags

  • src/wp-admin/custom-header.php

    diff --git src/wp-admin/custom-header.php src/wp-admin/custom-header.php
    index 5cc64ef7bf..62c8e20108 100644
    class Custom_Image_Header { 
    4242
    4343        /**
    4444         * Used to trigger a success message when settings updated and set to true.
    45          *
     45         *
    4646         * @since 3.0.0
    4747         * @access private
    4848         * @var bool
    wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?> 
    10971097        /**
    10981098         * Calculate width and height based on what the currently selected theme supports.
    10991099         *
     1100         * @since 3.9.0
     1101         *
    11001102         * @param array $dimensions
    11011103         * @return array dst_height and dst_width of header image.
    11021104         */
    wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?> 
    11471149        /**
    11481150         * Create an attachment 'object'.
    11491151         *
     1152         * @since 3.9.0
     1153         *
    11501154         * @param string $cropped              Cropped image URL.
    11511155         * @param int    $parent_attachment_id Attachment ID of parent image.
    1152          *
    11531156         * @return array Attachment object.
    11541157         */
    11551158        final public function create_attachment_object( $cropped, $parent_attachment_id ) {
    wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?> 
    11741177        /**
    11751178         * Insert an attachment and its metadata.
    11761179         *
     1180         * @since 3.9.0
     1181         *
    11771182         * @param array  $object  Attachment object.
    11781183         * @param string $cropped Cropped image URL.
    1179          *
    11801184         * @return int Attachment ID.
    11811185         */
    11821186        final public function insert_attachment( $object, $cropped ) {
    wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?> 
    11991203        /**
    12001204         * Gets attachment uploaded by Media Manager, crops it, then saves it as a
    12011205         * new object. Returns JSON-encoded object details.
     1206         *
     1207         * @since 3.9.0
    12021208         */
    12031209        public function ajax_header_crop() {
    12041210                check_ajax_referer( 'image_editor-' . $_POST['id'], 'nonce' );
    wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?> 
    12571263         *
    12581264         * Triggered when the user tries adds a new header image from the
    12591265         * Media Manager, even if s/he doesn't save that change.
     1266         *
     1267         * @since 3.9.0
    12601268         */
    12611269        public function ajax_header_add() {
    12621270                check_ajax_referer( 'header-add', 'nonce' );
    wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?> 
    12831291         *
    12841292         * Triggered when the user clicks the overlay "X" button next to each image
    12851293         * choice in the Customizer's Header tool.
     1294         *
     1295         * @since 3.9.0
    12861296         */
    12871297        public function ajax_header_remove() {
    12881298                check_ajax_referer( 'header-remove', 'nonce' );
    wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?> 
    13041314        }
    13051315
    13061316        /**
     1317         * Updates the last-used postmeta on a header image attachment after saving a new header image via the customizer.
    13071318         *
    1308          * @param WP_Customize_Manager $wp_customize
     1319         * @since 3.9.0
     1320         *
     1321         * @param WP_Customize_Manager $wp_customize Customize manager.
    13091322         */
    13101323        public function customize_set_last_used( $wp_customize ) {
    13111324                $data = $wp_customize->get_setting( 'header_image_data' )->post_value();
    wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?> 
    13201333        }
    13211334
    13221335        /**
     1336         * Gets the details of default header images if defined.
     1337         *
     1338         * @since 3.9.0
    13231339         *
    1324          * @return array
     1340         * @return array Default header images.
    13251341         */
    13261342        public function get_default_header_images() {
    13271343                $this->process_default_headers();
    wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?> 
    13601376        }
    13611377
    13621378        /**
     1379         * Gets the previously uploaded header images.
     1380         *
     1381         * @since 3.9.0
    13631382         *
    1364          * @return array
     1383         * @return array Uploaded header images.
    13651384         */
    13661385        public function get_uploaded_header_images() {
    13671386                $header_images = get_uploaded_header_images();