Changeset 13114 for trunk/src/bp-activity/bp-activity-template.php
- Timestamp:
- 09/24/2021 01:54:39 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-activity/bp-activity-template.php
r13108 r13114 2678 2678 if ( bp_is_activity_component() && is_numeric( bp_current_action() ) ) { 2679 2679 $class = 'delete-activity-single'; 2680 } elseif ( 'activity_comment' === bp_get_activity_type() ) { 2681 $class = 'acomment-delete'; 2680 2682 } 2681 2683 … … 2714 2716 global $activities_template; 2715 2717 2716 $url = trailingslashit( bp_get_root_domain() . '/' . bp_get_activity_root_slug() . '/delete/' . $activities_template->activity->id ); 2718 $activity_id = 0; 2719 if ( isset( $activities_template->activity->id ) ) { 2720 $activity_id = (int) $activities_template->activity->id; 2721 } 2722 2723 $url = trailingslashit( bp_get_root_domain() . '/' . bp_get_activity_root_slug() . '/delete/' . $activity_id ); 2717 2724 2718 2725 // Determine if we're on a single activity page, and customize accordingly. 2719 2726 if ( bp_is_activity_component() && is_numeric( bp_current_action() ) ) { 2720 2727 $url = add_query_arg( array( 'redirect_to' => wp_get_referer() ), $url ); 2728 } elseif ( 'activity_comment' === bp_get_activity_type() ) { 2729 $url = add_query_arg( 'cid', $activity_id, $url ); 2721 2730 } 2722 2731
Note: See TracChangeset
for help on using the changeset viewer.