Make WordPress Core


Ignore:
Timestamp:
05/29/2015 08:16:22 PM (9 years ago)
Author:
wonderboymusic
Message:

Add missing doc blocks to wp-admin/includes/*.
Fix some egregious uses of tabbing.
Some functions can simply return apply_filters(...) instead of setting a variable that is immediately returned.

See #32444.

File:
1 edited

Legend:

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

    r32642 r32654  
    318318        }
    319319        ?>
    320 
    321320<script type="text/javascript">
    322321(function($){
     
    926925     *
    927926     * @since 3.4.0
     927     *
     928     * @param array $form_fields
     929     * @return $form_fields
    928930     */
    929931    public function attachment_fields_to_edit( $form_fields ) {
     
    935937     *
    936938     * @since 3.4.0
     939     *
     940     * @param array $tabs
     941     * @return $tabs
    937942     */
    938943    public function filter_upload_tabs( $tabs ) {
     
    951956     *
    952957     * @since 3.4.0
     958     *
     959     * @param array|object|string $choice
    953960     */
    954961    final public function set_header_image( $choice ) {
     
    10021009     */
    10031010    final public function remove_header_image() {
    1004         return $this->set_header_image( 'remove-header' );
     1011        $this->set_header_image( 'remove-header' );
    10051012    }
    10061013
     
    10161023        $default = get_theme_support( 'custom-header', 'default-image' );
    10171024
    1018         if ( ! $default )
    1019             return $this->remove_header_image();
    1020 
     1025        if ( ! $default ) {
     1026            $this->remove_header_image();
     1027            return;
     1028        }
    10211029        $default = sprintf( $default, get_template_directory_uri(), get_stylesheet_directory_uri() );
    10221030
     
    10361044     * Calculate width and height based on what the currently selected theme supports.
    10371045     *
     1046     * @param array $dimensions
    10381047     * @return array dst_height and dst_width of header image.
    10391048     */
     
    10851094     * Create an attachment 'object'.
    10861095     *
    1087      * @param string $cropped Cropped image URL.
    1088      * @param int $parent_attachment_id Attachment ID of parent image.
     1096     * @param string $cropped              Cropped image URL.
     1097     * @param int    $parent_attachment_id Attachment ID of parent image.
    10891098     *
    10901099     * @return array Attachment object.
     
    11131122     * Insert an attachment and its metadata.
    11141123     *
    1115      * @param array $object Attachment object.
     1124     * @param array  $object Attachment object.
    11161125     * @param string $cropped Cropped image URL.
    11171126     *
     
    12411250    }
    12421251
     1252    /**
     1253     *
     1254     * @param WP_Customize_Manager $wp_customize
     1255     */
    12431256    public function customize_set_last_used( $wp_customize ) {
    12441257        $data = $wp_customize->get_setting( 'header_image_data' )->post_value();
     
    12531266    }
    12541267
     1268    /**
     1269     *
     1270     * @return array
     1271     */
    12551272    public function get_default_header_images() {
    12561273        $this->process_default_headers();
     
    12861303
    12871304        // The rest of the set comes after.
    1288         $header_images = array_merge( $header_images, $this->default_headers );
    1289         return $header_images;
    1290     }
    1291 
     1305        return array_merge( $header_images, $this->default_headers );
     1306    }
     1307
     1308    /**
     1309     *
     1310     * @return array
     1311     */
    12921312    public function get_uploaded_header_images() {
    12931313        $header_images = get_uploaded_header_images();
Note: See TracChangeset for help on using the changeset viewer.