Changeset 5646 for sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-user-notes.php
- Timestamp:
- 07/11/2017 03:28:02 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-user-notes.php
r5645 r5646 100 100 'date' => current_time( 'mysql' ), 101 101 'post_id' => $post_id, 102 'site_id' => get_current_blog_id(), 102 103 'moderator' => wp_get_current_user()->user_nicename 103 104 ); … … 212 213 * 213 214 * @param int $post_id Post ID. Default 0. 214 * @param int $user_id User ID. Defaults to the current post author. 215 * @param int $user_id User ID. Default 0. 216 * @param int $site_id Site ID. Default 0. 215 217 * @return string Post permalink or user profile URL. 216 218 */ 217 function get_user_note_post_permalink( $post_id = 0, $user_id = 0 ) { 219 function get_user_note_post_permalink( $post_id = 0, $user_id = 0, $site_id = 0 ) { 220 switch_to_blog( $site_id ); 221 218 222 $post_type = $post_id ? get_post_type( $post_id ) : ''; 219 223 … … 228 232 } 229 233 234 restore_current_blog(); 235 230 236 return $permalink; 231 237 } … … 250 256 } 251 257 252 $post_permalink = $this->get_user_note_post_permalink( $note->post_id, $user_id ); 253 $redirect_on_delete = $this->get_user_note_post_permalink( get_the_ID(), $user_id ); 258 $post_site_id = isset( $note->site_id ) ? (int) $note->site_id : get_current_blog_id(); 259 $post_permalink = $this->get_user_note_post_permalink( $note->post_id, $user_id, $post_site_id ); 260 $redirect_on_delete = $this->get_user_note_post_permalink( get_the_ID(), $user_id, get_current_blog_id() ); 254 261 255 262 printf( '<div class="bbp-template-notice warning"><p>%s</p> %s</div>' . "\n",
Note: See TracChangeset
for help on using the changeset viewer.