WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/10/2019 07:22:07 PM (9 months ago)
Author:
SergeyBiryukov
Message:

Docs: Fix placement of some duplicate hook references.

Hook documentation should be on the line directly above the line containing the do_action() or apply_filters() call. The CS auto-fixing, which changed some inconsistent function calls to multi-line function calls, is part of the reason why this was no longer the case for a select group of duplicate hook references.

Includes minor code layout fixes.

See #47110.

File:
1 edited

Legend:

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

    r45932 r46088  
    585585            exit;
    586586        }
     587
    587588        $attachment_id = absint( $_POST['attachment_id'] );
    588         /** This filter is documented in wp-admin/includes/media.php */
     589
    589590        $sizes = array_keys(
     591            /** This filter is documented in wp-admin/includes/media.php */
    590592            apply_filters(
    591593                'image_size_names_choose',
     
    598600            )
    599601        );
    600         $size  = 'thumbnail';
     602
     603        $size = 'thumbnail';
    601604        if ( in_array( $_POST['size'], $sizes ) ) {
    602605            $size = esc_attr( $_POST['size'] );
     
    604607
    605608        update_post_meta( $attachment_id, '_wp_attachment_is_custom_background', get_option( 'stylesheet' ) );
     609
    606610        $url       = wp_get_attachment_image_src( $attachment_id, $size );
    607611        $thumbnail = wp_get_attachment_image_src( $attachment_id, 'thumbnail' );
Note: See TracChangeset for help on using the changeset viewer.