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/includes/class-wp-media-list-table.php

    r32644 r32654  
    3838    }
    3939
     40    /**
     41     *
     42     * @return bool
     43     */
    4044    public function ajax_user_can() {
    4145        return current_user_can('upload_files');
     
    106110    }
    107111
     112    /**
     113     *
     114     * @return array
     115     */
    108116    protected function get_bulk_actions() {
    109117        $actions = array();
     
    152160    }
    153161
     162    /**
     163     *
     164     * @return string
     165     */
    154166    public function current_action() {
    155167        if ( isset( $_REQUEST['found_post_id'] ) && isset( $_REQUEST['media'] ) )
     
    165177    }
    166178
     179    /**
     180     *
     181     * @return bool
     182     */
    167183    public function has_items() {
    168184        return have_posts();
     
    222238    }
    223239
     240    /**
     241     *
     242     * @return array
     243     */
    224244    public function get_columns() {
    225245        $posts_columns = array();
     
    272292         *                             to any posts. Default true.
    273293         */
    274         $posts_columns = apply_filters( 'manage_media_columns', $posts_columns, $this->detached );
    275 
    276         return $posts_columns;
    277     }
    278 
     294        return apply_filters( 'manage_media_columns', $posts_columns, $this->detached );
     295    }
     296
     297    /**
     298     *
     299     * @return array
     300     */
    279301    protected function get_sortable_columns() {
    280302        return array(
     
    496518            echo $this->row_actions( $this->_get_row_actions( $post, $att_title ) );
    497519        }
    498        
     520
    499521        echo '</td>';
    500522    }
     
    520542     * @param WP_Post $post
    521543     * @param string  $att_title
     544     *
     545     * @return array
    522546     */
    523547    private function _get_row_actions( $post, $att_title ) {
     
    568592         *                          to any posts. Default true.
    569593         */
    570         $actions = apply_filters( 'media_row_actions', $actions, $post, $this->detached );
    571 
    572         return $actions;
     594        return apply_filters( 'media_row_actions', $actions, $post, $this->detached );
    573595    }
    574596}
Note: See TracChangeset for help on using the changeset viewer.