Changeset 13405 for trunk/src/bp-blogs/bp-blogs-activity.php
- Timestamp:
- 01/19/2023 01:07:13 AM (3 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-blogs/bp-blogs-activity.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-blogs/bp-blogs-activity.php
r13342 r13405 15 15 * 16 16 * @since 1.0.0 17 *18 * @return bool|null Returns false if activity component is not active.19 17 */ 20 18 function bp_blogs_register_activity_actions() { … … 241 239 restore_current_blog(); 242 240 243 if ( ! empty( $post ) && ! is_wp_error( $post )) {241 if ( ! empty( $post ) && $post instanceof WP_Post ) { 244 242 $post_url = add_query_arg( 'p', $post->ID, trailingslashit( get_home_url( $activity->item_id ) ) ); 245 243 $action = apply_filters_deprecated( 'bp_blogs_activity_new_post_action', array( $action, $post, $post_url ), '2.0.0', 'bp_blogs_format_activity_action_new_blog_post' ); … … 353 351 restore_current_blog(); 354 352 355 if ( ! empty( $comment ) && ! is_wp_error( $comment )) {353 if ( ! empty( $comment ) && $comment instanceof WP_Comment ) { 356 354 $action = apply_filters_deprecated( 'bp_blogs_activity_new_comment_action', array( $action, $comment, $post_url . '#' . $activity->secondary_item_id ), '2.0.0', 'bp_blogs_format_activity_action_new_blog_comment' ); 357 355 } … … 454 452 * @since 1.2.0 455 453 * 456 * @param string $ valueGenerated summary from content for the activity stream.457 * @param string $ valueContent for the activity stream.458 * @param array $r Array of arguments used for the activity stream item.454 * @param string $summary Generated summary from content for the activity stream. 455 * @param string $content Content for the activity stream. 456 * @param array $r Array of arguments used for the activity stream item. 459 457 */ 460 458 $r['content'] = apply_filters( 'bp_blogs_record_activity_content', bp_activity_create_summary( $r['content'], $r ), $r['content'], $r ); … … 500 498 ); 501 499 502 bp_activity_delete_by_item_id( $r );500 return bp_activity_delete_by_item_id( $r ); 503 501 } 504 502 … … 615 613 * @since 1.1.0 616 614 * 617 * @param string $ valueBlog primary link.618 * @param int $ valueBlog ID.615 * @param string $link Blog primary link. 616 * @param int $blog_id Blog ID. 619 617 */ 620 618 'primary_link' => apply_filters( 'bp_blogs_activity_created_blog_primary_link', bp_blogs_get_blogmeta( $recorded_blog->blog_id, 'url' ), $recorded_blog->blog_id ), … … 678 676 * @param int $user_id Optional. Defaults to the logged-in user ID. This param 679 677 * is currently unused in the function (but is passed to hooks). 680 * @return bool681 678 */ 682 679 function bp_blogs_remove_post( $post_id, $blog_id = 0, $user_id = 0 ) {
Note: See TracChangeset
for help on using the changeset viewer.