Skip to:
Content

BuddyPress.org

Ticket #8890: 8890-class-bp-blogs-blog.diff

File 8890-class-bp-blogs-blog.diff, 6.3 KB (added by viralsampat, 3 years ago)
  • src/bp-blogs/classes/class-bp-blogs-blog.php

    diff --git a/src/bp-blogs/classes/class-bp-blogs-blog.php b/src/bp-blogs/classes/class-bp-blogs-blog.php
    index b4d41ac59..f1f40f013 100644
    a b class BP_Blogs_Blog { 
    5555
    5656        /**
    5757         * Populate the object with data about the specific activity item.
     58         *
     59         * @global wpdb $wpdb WordPress database object.
    5860         */
    5961        public function populate() {
    6062                global $wpdb;
    class BP_Blogs_Blog { 
    7173         * Save the BP blog data to the database.
    7274         *
    7375         * @return bool True on success, false on failure.
     76         *
     77         * @global wpdb $wpdb WordPress database object.
    7478         */
    7579        public function save() {
    7680                global $wpdb;
    class BP_Blogs_Blog { 
    149153         *
    150154         * @return int $value The number of associations between the user and blog
    151155         *                    saved in the blog component tables.
     156         *
     157         * @global wpdb $wpdb WordPress database object.
    152158         */
    153159        public function exists() {
    154160                global $wpdb;
    class BP_Blogs_Blog { 
    188194         * @return array Multidimensional results array, structured as follows:
    189195         *               'blogs' - Array of located blog objects
    190196         *               'total' - A count of the total blogs matching the filter params
     197         *
     198         * @global wpdb $wpdb WordPress database object.
    191199         */
    192200        public static function get( ...$args ) {
    193201                global $wpdb;
    class BP_Blogs_Blog { 
    325333         *
    326334         * @param int $blog_id The blog being removed from all users.
    327335         * @return int|bool Number of rows deleted on success, false on failure.
     336         *
     337         * @global wpdb $wpdb WordPress database object.
    328338         */
    329339        public static function delete_blog_for_all( $blog_id ) {
    330340                global $wpdb;
    class BP_Blogs_Blog { 
    343353         * @param int|null $user_id Optional. The ID of the user from whom the blog is
    344354         *                          being removed. If absent, defaults to the logged-in user ID.
    345355         * @return int|bool Number of rows deleted on success, false on failure.
     356         *
     357         * @global wpdb $wpdb WordPress database object.
    346358         */
    347359        public static function delete_blog_for_user( $blog_id, $user_id = null ) {
    348360                global $wpdb;
    class BP_Blogs_Blog { 
    361373         * @param int|null $user_id Optional. The ID of the user whose blog associations
    362374         *                          are being deleted. If absent, defaults to logged-in user ID.
    363375         * @return int|bool Number of rows deleted on success, false on failure.
     376         *
     377         * @global wpdb $wpdb WordPress database object.
    364378         */
    365379        public static function delete_blogs_for_user( $user_id = null ) {
    366380                global $wpdb;
    class BP_Blogs_Blog { 
    388402         * @return array Multidimensional results array, structured as follows:
    389403         *               'blogs' - Array of located blog objects.
    390404         *               'total' - A count of the total blogs for the user.
     405         *
     406         * @global wpdb $wpdb WordPress database object.
    391407         */
    392408        public static function get_blogs_for_user( $user_id = 0, $show_hidden = false ) {
    393409                global $wpdb;
    class BP_Blogs_Blog { 
    425441         * @param int $user_id Optional. ID of the user whose blogs are being
    426442         *                     queried. Defaults to logged-in user.
    427443         * @return int The number of blogs associated with the user.
     444         *
     445         * @global wpdb $wpdb WordPress database object.
    428446         */
    429447        public static function get_blog_ids_for_user( $user_id = 0 ) {
    430448                global $wpdb;
    class BP_Blogs_Blog { 
    443461         * @param int $blog_id ID of the blog being queried.
    444462         * @return int|null The ID of the first located entry in the BP table
    445463         *                  on success, otherwise null.
     464         *
     465         * @global wpdb $wpdb WordPress database object.
    446466         */
    447467        public static function is_recorded( $blog_id ) {
    448468                global $wpdb;
    class BP_Blogs_Blog { 
    464484         * @param int|null $user_id Optional. ID of the user whose blogs are being
    465485         *                          queried. Defaults to logged-in user.
    466486         * @return int Blog count for the user.
     487         *
     488         * @global wpdb $wpdb WordPress database object.
    467489         */
    468490        public static function total_blog_count_for_user( $user_id = null ) {
    469491                global $wpdb;
    class BP_Blogs_Blog { 
    495517         * @return array Multidimensional results array, structured as follows:
    496518         *               'blogs' - Array of located blog objects.
    497519         *               'total' - A count of the total blogs matching the query.
     520         *
     521         * @global wpdb $wpdb WordPress database object.
    498522         */
    499523        public static function search_blogs( $filter, $limit = null, $page = null ) {
    500524                global $wpdb;
    class BP_Blogs_Blog { 
    537561         * @return array Multidimensional results array, structured as follows:
    538562         *               'blogs' - Array of located blog objects.
    539563         *               'total' - A count of the total blogs.
     564         *
     565         * @global wpdb $wpdb WordPress database object.
    540566         */
    541567        public static function get_all( $limit = null, $page = null ) {
    542568                global $wpdb;
    class BP_Blogs_Blog { 
    571597         * @return array Multidimensional results array, structured as follows:
    572598         *               'blogs' - Array of located blog objects.
    573599         *               'total' - A count of the total blogs matching the query.
     600         *
     601         * @global wpdb $wpdb WordPress database object.
    574602         */
    575603        public static function get_by_letter( $letter, $limit = null, $page = null ) {
    576604                global $wpdb;
    class BP_Blogs_Blog { 
    612640         * @param array       $blog_ids    Array of IDs returned from the original query.
    613641         * @param string|bool $type        Not currently used. Default: false.
    614642         * @return array $paged_blogs The located blogs array, with the extras added.
     643         *
     644         * @global wpdb $wpdb WordPress database object.
    615645         */
    616646        public static function get_blog_extras( &$paged_blogs, &$blog_ids, $type = false ) {
    617647                global $wpdb;
    class BP_Blogs_Blog { 
    691721         *
    692722         * @param int $blog_id The ID of the blog being checked.
    693723         * @return bool True if hidden (public = 0), false otherwise.
     724         *
     725         * @global wpdb $wpdb WordPress database object.
    694726         */
    695727        public static function is_hidden( $blog_id ) {
    696728                global $wpdb;
    class BP_Blogs_Blog { 
    708740         * @param int $user_id ID of user.
    709741         * @param int $blog_id ID of blog.
    710742         * @return int|bool ID of user-blog link, or false if not found.
     743         *
     744         * @global wpdb $wpdb WordPress database object.
    711745         */
    712746        public static function get_user_blog( $user_id, $blog_id ) {
    713747                global $wpdb;