Changeset 8783 for trunk/src/bp-activity/bp-activity-functions.php
- Timestamp:
- 08/10/2014 06:24:02 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-activity/bp-activity-functions.php
r8754 r8783 1798 1798 * @since BuddyPress (1.6.0) 1799 1799 * 1800 * @global object $bp BuddyPress global settings.1801 *1802 1800 * @param BP_Activity_Activity $activity The activity item to be spammed. 1803 1801 * @param string $source Optional. Default is "by_a_person" (ie, a person has … … 1806 1804 */ 1807 1805 function bp_activity_mark_as_spam( &$activity, $source = 'by_a_person' ) { 1808 global $bp;1806 $bp = buddypress(); 1809 1807 1810 1808 $activity->is_spam = 1; … … 1837 1835 * 1838 1836 * @since BuddyPress (1.6.0) 1839 *1840 * @global object $bp BuddyPress global settings.1841 1837 * 1842 1838 * @param BP_Activity_Activity $activity The activity item to be hammed. … … 1846 1842 */ 1847 1843 function bp_activity_mark_as_ham( &$activity, $source = 'by_a_person' ) { 1848 global $bp;1844 $bp = buddypress(); 1849 1845 1850 1846 $activity->is_spam = 0; … … 1932 1928 * 1933 1929 * @see BP_Embed 1934 * @global object $bp BuddyPress global settings1935 1930 * @uses add_filter() To attach create_function() to 'embed_post_id'. 1936 1931 * @uses add_filter() To attach 'bp_embed_activity_cache' to 'bp_embed_get_cache'. … … 1940 1935 */ 1941 1936 function bp_dtheme_embed_read_more( $activity ) { 1942 global $bp; 1943 1944 $bp->activity->read_more_id = $activity->id; 1945 1946 add_filter( 'embed_post_id', create_function( '', 'global $bp; return $bp->activity->read_more_id;' ) ); 1947 add_filter( 'bp_embed_get_cache', 'bp_embed_activity_cache', 10, 3 ); 1948 add_action( 'bp_embed_update_cache', 'bp_embed_activity_save_cache', 10, 3 ); 1949 } 1950 add_action( 'bp_dtheme_get_single_activity_content', 'bp_dtheme_embed_read_more' ); 1937 buddypress()->activity->read_more_id = $activity->id; 1938 1939 add_filter( 'embed_post_id', create_function( '', 'return buddypress()->activity->read_more_id;' ) ); 1940 add_filter( 'bp_embed_get_cache', 'bp_embed_activity_cache', 10, 3 ); 1941 add_action( 'bp_embed_update_cache', 'bp_embed_activity_save_cache', 10, 3 ); 1942 } 1943 add_action( 'bp_dtheme_get_single_activity_content', 'bp_dtheme_embed_read_more' ); 1951 1944 add_action( 'bp_legacy_theme_get_single_activity_content', 'bp_dtheme_embed_read_more' ); 1952 1945
Note: See TracChangeset
for help on using the changeset viewer.