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-comments-list-table.php

    r32651 r32654  
    5454        }
    5555
     56        /**
     57         * @return bool
     58         */
    5659        public function ajax_user_can() {
    5760                return current_user_can('edit_posts');
     
    159162                 * @param string $comment_status    The comment status name. Default 'All'.
    160163                 */
    161                 $comments_per_page = apply_filters( 'comments_per_page', $comments_per_page, $comment_status );
    162                 return $comments_per_page;
     164                return apply_filters( 'comments_per_page', $comments_per_page, $comment_status );
    163165        }
    164166
     
    231233                 *                            Accepts 'All', 'Pending', 'Approved', 'Spam', and 'Trash'.
    232234                 */
    233                 $status_links = apply_filters( 'comment_status_links', $status_links );
    234                 return $status_links;
     235                return apply_filters( 'comment_status_links', $status_links );
    235236        }
    236237
     
    238239         *
    239240         * @global string $comment_status
     241         *
     242         * @return array
    240243         */
    241244        protected function get_bulk_actions() {
     
    267270         * @global string $comment_status
    268271         * @global string $comment_type
     272         *
    269273         * @param string $which
    270274         */
     
    322326        }
    323327
     328        /**
     329         * @return string|false
     330         */
    324331        public function current_action() {
    325332                if ( isset( $_REQUEST['delete_all'] ) || isset( $_REQUEST['delete_all2'] ) )
     
    332339         *
    333340         * @global int $post_id
     341         *
    334342         * @return array
    335343         */
     
    351359        }
    352360
     361        /**
     362         *
     363         * @return array
     364         */
    353365        protected function get_sortable_columns() {
    354366                return array(
     
    407419         * @global WP_Post $post
    408420         * @global object  $comment
     421         *
    409422         * @param object $a_comment
    410423         */
     
    438451         * @param string $primary Primary column name
    439452         *
    440          * @return string
     453         * @return string|void
    441454         */
    442455        protected function handle_row_actions( $comment, $column_name, $primary ) {
    443456                global $comment_status;
    444  
     457
    445458                if ( ! $this->user_can ) {
    446459                        return;
    447 
    448460                }
    449461
     
    543555        }
    544556
     557        /**
     558         *
     559         * @param object $comment
     560         */
    545561        public function column_cb( $comment ) {
    546562                if ( $this->user_can ) { ?>
     
    554570         *
    555571         * @global string $comment_status
     572         *
    556573         * @param object $comment
    557574         */
     
    602619         *
    603620         * @global string $comment_status
     621         *
    604622         * @param object $comment
    605623         */
     
    635653        }
    636654
     655        /**
     656         *
     657         * @return string
     658         */
    637659        public function column_date() {
    638660                return get_comment_date( __( 'Y/m/d \a\t g:i a' ) );
     
    667689        }
    668690
     691        /**
     692         *
     693         * @param object $comment
     694         * @param string $column_name
     695         */
    669696        public function column_default( $comment, $column_name ) {
    670697                /**
     
    692719class WP_Post_Comments_List_Table extends WP_Comments_List_Table {
    693720
     721        /**
     722         *
     723         * @return array
     724         */
    694725        protected function get_column_info() {
    695726                return array(
     
    704735        }
    705736
     737        /**
     738         *
     739         * @return array
     740         */
    706741        protected function get_table_classes() {
    707742                $classes = parent::get_table_classes();
     
    710745        }
    711746
     747        /**
     748         *
     749         * @param bool $output_empty
     750         */
    712751        public function display( $output_empty = false ) {
    713752                $singular = $this->_args['singular'];
     
    728767        }
    729768
     769        /**
     770         *
     771         * @param bool $comment_status
     772         * @return int
     773         */
    730774        public function get_per_page( $comment_status = false ) {
    731775                return 10;
Note: See TracChangeset for help on using the changeset viewer.