Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/21/2014 02:49:33 PM (12 years ago)
Author:
boonebgorges
Message:

Automatically check for newly created items when viewing the Activity Stream.

Leveraging WP's Heartbeat API, this new functionality performs periodic checks
to see whether new activity items matching the current filter have been posted
since the page was originally loaded. If new items are found, a Load Newest
link is inserted into the top of the stream, which will insert the new items.

A filter is included, bp_activity_heartbeat_pulse, that allows site owners to
set a specific interval for these checks. The default value is 15 seconds, or
whatever your global Heartbeat interval is.

To disable the feature, there is a new setting "Automatically check for new
activity items when viewing the activity stream".

Fixes #5328

Props imath, boonebgorges

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-admin.php

    r7754 r7952  
    330330            add_settings_field( 'bp-disable-blogforum-comments', __( 'Blog & Forum Comments', 'buddypress' ), 'bp_admin_setting_callback_blogforum_comments', 'buddypress', 'bp_activity' );
    331331            register_setting( 'buddypress', 'bp-disable-blogforum-comments', 'bp_admin_sanitize_callback_blogforum_comments' );
     332
     333            // Activity Heartbeat refresh
     334            add_settings_field( '_bp_enable_heartbeat_refresh', __( 'Activity auto-refresh', 'buddypress' ), 'bp_admin_setting_callback_heartbeat', 'buddypress', 'bp_activity' );
     335            register_setting( 'buddypress', '_bp_enable_heartbeat_refresh', 'intval' );
    332336
    333337            // Allow activity akismet
Note: See TracChangeset for help on using the changeset viewer.