Make WordPress Core


Ignore:
Timestamp:
05/29/2015 08:16:22 PM (11 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-posts-list-table.php

    r32644 r32654  
    101101        }
    102102
     103        /**
     104         *
     105         * @return bool
     106         */
    103107        public function ajax_user_can() {
    104108                return current_user_can( get_post_type_object( $this->screen->post_type )->cap->edit_posts );
     
    148152        }
    149153
     154        /**
     155         *
     156         * @return bool
     157         */
    150158        public function has_items() {
    151159                return have_posts();
     
    164172         * @since 4.2.0
    165173         *
    166          * @return bool Whether the current ivew is the "All" view.
     174         * @return bool Whether the current view is the "All" view.
    167175         */
    168176        protected function is_base_request() {
     
    255263        }
    256264
     265        /**
     266         *
     267         * @return array
     268         */
    257269        protected function get_bulk_actions() {
    258270                $actions = array();
     
    324336        }
    325337
     338        /**
     339         *
     340         * @return string
     341         */
    326342        public function current_action() {
    327343                if ( isset( $_REQUEST['delete_all'] ) || isset( $_REQUEST['delete_all2'] ) )
     
    344360        }
    345361
     362        /**
     363         *
     364         * @return array
     365         */
    346366        protected function get_table_classes() {
    347367                return array( 'widefat', 'fixed', 'striped', is_post_type_hierarchical( $this->screen->post_type ) ? 'pages' : 'posts' );
    348368        }
    349369
     370        /**
     371         *
     372         * @return array
     373         */
    350374        public function get_columns() {
    351375                $post_type = $this->screen->post_type;
     
    428452                 * @param array $post_columns An array of column names.
    429453                 */
    430                 $posts_columns = apply_filters( "manage_{$post_type}_posts_columns", $posts_columns );
    431 
    432                 return $posts_columns;
    433         }
    434 
     454                return apply_filters( "manage_{$post_type}_posts_columns", $posts_columns );
     455        }
     456
     457        /**
     458         *
     459         * @return array
     460         */
    435461        protected function get_sortable_columns() {
    436462                return array(
     
    489515         * @param int $pagenum
    490516         * @param int $per_page
    491          * @return false|null
    492517         */
    493518        private function _display_rows_hierarchical( $pages, $pagenum = 1, $per_page = 20 ) {
     
    500525
    501526                        if ( ! $pages )
    502                                 return false;
     527                                return;
    503528                }
    504529
     
    597622         */
    598623        private function _page_rows( &$children_pages, &$count, $parent, $level, $pagenum, $per_page, &$to_display ) {
    599 
    600624                if ( ! isset( $children_pages[$parent] ) )
    601625                        return;
     
    605629
    606630                foreach ( $children_pages[$parent] as $page ) {
    607 
    608631                        if ( $count >= $end )
    609632                                break;
Note: See TracChangeset for help on using the changeset viewer.