Skip to:
Content

#4527 closed enhancement (fixed)

Allow omitting blogs from being recordable and trackable

Reported by: tiraeth Owned by:
Milestone: 1.7 Priority: normal
Severity: normal Version: 1.6.1
Component: Blogs Keywords: commit
Cc:

Description

I am sending you a proposal patch to Blogs Component. This update will allow developers to exclude particular blogs from being recordable (prevents them from being saved and listed in Sites Dictionary) and trackable (prevents their activities from being saved in Activity Component).

Trackable flag depends on Recordable flag so that by default if blog is not recordable, it won't be trackable. Proposed functions (and filters) accept $user_id as a parameter for possible exclusion per user.

Function definitions:

bp_blogs_is_blog_recordable( $blog_id, $user_id = null );
bp_blogs_is_blog_trackable( $blog_id, $user_id = null );

Added filter hooks:

bp_blogs_is_blog_trackable
bp_blogs_is_blog_recordable
bp_blogs_is_blog_trackable_for_user
bp_blogs_is_blog_recordable_for_user

By telling that blog is trackable for user I mean that activity made by the particular user is trackable.

By telling that blog is recordable for user I mean that a record in user_blogs table is created for the particular user. If blog is not recordable for user, his whole activity (posting, commenting) won't be saved into the activity stream.

The functionality may be very useful (in my case it is) when you want to not record site creation in another network (for example by passing $site_id parameter to wpmu_create_blog).

This patch also includes #4337 to make BuddyPress network-aware.

Attachments (1)

patchfile.patch (2.3 KB) - added by tiraeth 19 months ago.
Fixed patch file

Download all attachments as: .zip

Change History (6)

comment:1 tiraeth20 months ago

Removed #4337 change from this patch to not make you guys confused so that now the patch contains only proposed functionalites.

comment:2 tiraeth20 months ago

  • Version changed from 1.7 to 1.6.1

tiraeth19 months ago

Fixed patch file

comment:3 DJPaul18 months ago

  • Keywords needs-refresh added; has-patch needs-codex removed
  • Milestone changed from Awaiting Review to 1.7

I think trackable/recordable is a little confusing, and we could come up with better names, but that's semantics.

comment:4 johnjamesjacoby17 months ago

  • Keywords commit added; needs-refresh removed

I like this; I think the trackable/recordable is confusing, but it sticks to existing nomenclature.

comment:5 johnjamesjacoby17 months ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [6602]) Allow specific blogs to be removed from blog tracking by third-party plugins. Props tiraeth. Fixes #4527.

Note: See TracTickets for help on using tickets.