| @@ -242,9 +242,9 @@ | ||
| 242 | 242 | ) as $post |
| 243 | 243 | ) { |
| 244 | 244 | $recent_posts[] = array( |
| 245 | 245 | 'id' => (int) $post->ID, |
| 246 | - 'title' => '' !== $post->post_title ? $post->post_title : __( '(no title)', 'desktop-mode' ), | |
| 246 | + 'title' => '' !== $post->post_title ? openstation_plain_text_title( $post->post_title ) : __( '(no title)', 'desktop-mode' ), | |
| 247 | 247 | 'status' => (string) $post->post_status, |
| 248 | 248 | 'type' => (string) $post->post_type, |
| 249 | 249 | 'dateGmt' => openstation_user_edit_window_gmt_or_local( $post->post_date_gmt, $post->post_date ), |
| 250 | 250 | 'commentCount' => (int) $post->comment_count, |
| @@ -267,10 +267,10 @@ | ||
| 267 | 267 | $post = $comment->comment_post_ID ? get_post( (int) $comment->comment_post_ID ) : null; |
| 268 | 268 | $recent_comments[] = array( |
| 269 | 269 | 'id' => (int) $comment->comment_ID, |
| 270 | 270 | 'postId' => (int) $comment->comment_post_ID, |
| 271 | - 'postTitle' => $post instanceof WP_Post ? ( '' !== $post->post_title ? $post->post_title : __( '(no title)', 'desktop-mode' ) ) : '', | |
| 272 | - 'excerpt' => wp_trim_words( wp_strip_all_tags( (string) $comment->comment_content ), 24 ), | |
| 271 | + 'postTitle' => $post instanceof WP_Post ? ( '' !== $post->post_title ? openstation_plain_text_title( $post->post_title ) : __( '(no title)', 'desktop-mode' ) ) : '', | |
| 272 | + 'excerpt' => openstation_plain_text_title( wp_trim_words( openstation_strip_all_tags( (string) $comment->comment_content ), 24 ) ), | |
| 273 | 273 | 'dateGmt' => openstation_user_edit_window_gmt_or_local( $comment->comment_date_gmt, $comment->comment_date ), |
| 274 | 274 | 'approved' => '1' === (string) $comment->comment_approved, |
| 275 | 275 | ); |
| 276 | 276 | } |
| @@ -302,9 +302,9 @@ | ||
| 302 | 302 | }; |
| 303 | 303 | |
| 304 | 304 | return array( |
| 305 | 305 | 'userId' => $id, |
| 306 | - 'displayName' => (string) $user->display_name, | |
| 306 | + 'displayName' => openstation_plain_text_title( $user->display_name ), | |
| 307 | 307 | 'avatarUrl' => (string) get_avatar_url( $id, array( 'size' => 96 ) ), |
| 308 | 308 | 'profileUrl' => (string) get_author_posts_url( $id ), |
| 309 | 309 | 'roles' => array_values( (array) $user->roles ), |
| 310 | 310 | 'capabilitiesCount' => is_array( $user->allcaps ) ? count( array_filter( $user->allcaps ) ) : 0, |