Changeset 9382
- Timestamp:
- 01/20/2015 06:50:52 PM (10 years ago)
- Location:
- trunk/src/bp-activity
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-activity/bp-activity-classes.php
r9380 r9382 163 163 $this->is_spam = $row->is_spam; 164 164 } 165 166 /**167 * Make sure the activity actions have been registered.168 * We can't assume it will already be set because this is normally only done on an ad-hoc basis.169 *170 * @link https://buddypress.trac.wordpress.org/ticket/6126171 */172 bp_activity_get_actions();173 165 174 166 // Generate dynamic 'action' when possible -
trunk/src/bp-activity/bp-activity-functions.php
r9351 r9382 1250 1250 1251 1251 // Check for registered format callback 1252 if ( empty( buddypress()->activity->actions->{$activity->component}->{$activity->type}['format_callback'] ) ) { 1252 $actions = bp_activity_get_actions(); 1253 if ( empty( $actions->{$activity->component}->{$activity->type}['format_callback'] ) ) { 1253 1254 return false; 1254 1255 } 1255 1256 1256 1257 // We apply the format_callback as a filter 1257 add_filter( 'bp_activity_generate_action_string', buddypress()->activity->actions->{$activity->component}->{$activity->type}['format_callback'], 10, 2 );1258 add_filter( 'bp_activity_generate_action_string', $actions->{$activity->component}->{$activity->type}['format_callback'], 10, 2 ); 1258 1259 1259 1260 /** … … 1268 1269 1269 1270 // Remove the filter for future activity items 1270 remove_filter( 'bp_activity_generate_action_string', buddypress()->activity->actions->{$activity->component}->{$activity->type}['format_callback'], 10, 2 );1271 remove_filter( 'bp_activity_generate_action_string', $actions->{$activity->component}->{$activity->type}['format_callback'], 10, 2 ); 1271 1272 1272 1273 return $action;
Note: See TracChangeset
for help on using the changeset viewer.