Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/19/2023 01:07:13 AM (4 years ago)
Author:
espellcaste
Message:

Adding PHPDoc Improvements to the Blogs (component) files.

Props imath

Closes ​https://github.com/buddypress/buddypress/pull/56
See #8553

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-blogs/classes/class-bp-blogs-template.php

    r13399 r13405  
    3030         * @var int
    3131         */
    32         public $blog_count = 0;
     32        public $blog_count;
    3333
    3434        /**
    … …  
    8686         * @var int
    8787         */
    88         public $total_blog_count = 0;
     88        public $total_blog_count;
    8989
    9090        /**
    … …  
    161161                }
    162162
     163                $max = (int) wp_unslash( $r['max'] );
     164
    163165                // Set the total blog count.
    164                 if ( empty( $r['max'] ) || ( $r['max'] >= (int) $this->blogs['total'] ) ) {
     166                if ( empty( $max ) || ( $max >= (int) $this->blogs['total'] ) ) {
    165167                        $this->total_blog_count = (int) $this->blogs['total'];
    166168                } else {
    167                         $this->total_blog_count = (int) $max;
     169                        $this->total_blog_count = $max;
    168170                }
    169171
    … …  
    175177
    176178                // Set the current blog count.
    177                 if ( empty( $r['max'] ) || ( $r['max'] >= (int) $blog_count ) ) {
     179                if ( empty( $max ) || ( $max >= (int) $blog_count ) ) {
    178180                        $this->blog_count = (int) $blog_count;
    179181                } else {
    180                         $this->blog_count = (int) $max;
     182                        $this->blog_count = $max;
    181183                }
    182184
Note: See TracChangeset for help on using the changeset viewer.