Changeset 7952 for trunk/bp-activity/bp-activity-functions.php
- Timestamp:
- 02/21/2014 02:49:33 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-functions.php
r7906 r7952 1850 1850 bp_activity_update_meta( $id, $cachekey, $cache ); 1851 1851 } 1852 1853 /** 1854 * Should we use Heartbeat to refresh activities? 1855 * 1856 * @since BuddyPress (2.0.0) 1857 * 1858 * @uses bp_is_activity_heartbeat_active() to check if heatbeat setting is on. 1859 * @uses bp_is_activity_directory() to check if the current page is the activity 1860 * directory. 1861 * @uses bp_is_active() to check if the group component is active. 1862 * @uses bp_is_group_activity() to check if on a single group, the current page 1863 * is the group activities. 1864 * @uses bp_is_group_home() to check if the current page is a single group home 1865 * page. 1866 * 1867 * @return bool True if activity heartbeat is enabled, otherwise false. 1868 */ 1869 function bp_activity_do_heartbeat() { 1870 $retval = false; 1871 1872 if ( ! bp_is_activity_heartbeat_active() ) { 1873 return $retval; 1874 } 1875 1876 if ( bp_is_activity_directory() ) { 1877 $retval = true; 1878 } 1879 1880 if ( bp_is_active( 'groups') ) { 1881 // If no custom front, then activities are loaded in group's home 1882 $has_custom_front = bp_locate_template( array( 'groups/single/front.php' ), false, true ); 1883 1884 if ( bp_is_group_activity() || ( ! $has_custom_front && bp_is_group_home() ) ) { 1885 $retval = true; 1886 } 1887 } 1888 1889 return $retval; 1890 }
Note: See TracChangeset
for help on using the changeset viewer.