Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/23/2022 02:21:19 AM (4 years ago)
Author:
imath
Message:

Make sure an activity is created when adding a site from network admin

When the Blogs component is active, creating a new public site from
front-end and now from the WordPress network administration is generating
a new_blog activity type.

Closes https://github.com/buddypress/buddypress/pull/28
Fixes #8756

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/blogs/functions.php

    r12606 r13343  
    886886         */
    887887        public function test_bp_blogs_comment_sync_activity_comment_for_custom_post_type() {
     888                $bp    = buddypress();
     889                $reset = $bp->activity->track;
     890
    888891                if ( is_multisite() ) {
    889892                        $b = self::factory()->blog->create();
     893
    890894                        switch_to_blog( $b );
     895
     896                        $bp->activity->track = array();
    891897                        add_filter( 'comment_flood_filter', '__return_false' );
    892898                } else {
     
    971977                if ( is_multisite() ) {
    972978                        restore_current_blog();
     979
     980                        $bp->activity->track = $reset;
    973981                        remove_filter( 'comment_flood_filter', '__return_false' );
    974982                }
Note: See TracChangeset for help on using the changeset viewer.