PluginProbe
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin / 1.1.12
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin v1.1.12
1.1.12 1.1.11 1.1.10 1.1.9 1.1.8 1.1.7 1.1.6 1.1.5 1.1.4 1.1.3 1.1.2 1.1.1 1.1.0 1.0.1 1.0.0 0.9.8 0.9.7 0.9.6 0.9.4 0.9.5 0.9.3 0.9.2 0.9.1 0.9.0 0.8.9 All 36 releases
← All changes | includes/my-wordpress/comment-stats.php +10 -12 1.1.8 → 1.1.12 View file →
@@ -228,9 +228,9 @@
228 228 }
229 229
230 230 // ----- Author ------------------------------------------------------
231 231 $author = array(
232 - 'name' => (string) $comment->comment_author,
232 + 'name' => openstation_plain_text_title( $comment->comment_author ),
233 233 'url' => esc_url_raw( (string) $comment->comment_author_url ),
234 234 'avatarUrl' => (string) get_avatar_url(
235 235 $comment,
236 236 array( 'size' => 96 )
@@ -242,9 +242,9 @@
242 242 }
243 243 if ( $author['userId'] > 0 ) {
244 244 $user = get_userdata( $author['userId'] );
245 245 if ( $user ) {
246 - $author['displayName'] = $user->display_name;
246 + $author['displayName'] = openstation_plain_text_title( $user->display_name );
247 247 $author['profileLink'] = get_author_posts_url( $user->ID );
248 248 }
249 249 }
250 250
@@ -255,9 +255,9 @@
255 255 ? get_userdata( (int) $post->post_author )
256 256 : null;
257 257 $post_payload = array(
258 258 'id' => (int) $post->ID,
259 - 'title' => get_the_title( $post ),
259 + 'title' => openstation_plain_text_title( get_the_title( $post ) ),
260 260 'link' => (string) get_permalink( $post ),
261 261 'editLink' => current_user_can( 'edit_post', $post->ID )
262 262 ? (string) get_edit_post_link( $post->ID, 'raw' )
263 263 : '',
@@ -266,9 +266,9 @@
266 266 'date' => mysql2date( 'c', $post->post_date_gmt, false ),
267 267 'author' => $post_author
268 268 ? array(
269 269 'id' => (int) $post_author->ID,
270 - 'name' => $post_author->display_name,
270 + 'name' => openstation_plain_text_title( $post_author->display_name ),
271 271 'avatarUrl' => (string) get_avatar_url(
272 272 $post_author->ID,
273 273 array( 'size' => 48 )
274 274 ),
@@ -292,13 +292,12 @@
292 292 && openstation_my_wordpress_comment_is_visible( $parent_comment )
293 293 ) {
294 294 $parent_payload = array(
295 295 'id' => (int) $parent_comment->comment_ID,
296 - 'authorName' => (string) $parent_comment->comment_author,
296 + 'authorName' => openstation_plain_text_title( $parent_comment->comment_author ),
297 297 'date' => mysql2date( 'c', $parent_comment->comment_date_gmt, false ),
298 - 'excerpt' => wp_trim_words(
299 - wp_strip_all_tags( $parent_comment->comment_content ),
300 - 40
298 + 'excerpt' => openstation_plain_text_title(
299 + wp_trim_words( openstation_strip_all_tags( $parent_comment->comment_content ), 40 )
301 300 ),
302 301 );
303 302 }
304 303 }
@@ -333,17 +332,16 @@
333 332 $replies = array();
334 333 foreach ( (array) $reply_rows as $row ) {
335 334 $replies[] = array(
336 335 'id' => (int) $row['comment_ID'],
337 - 'authorName' => (string) $row['comment_author'],
336 + 'authorName' => openstation_plain_text_title( $row['comment_author'] ),
338 337 'avatarUrl' => (string) get_avatar_url(
339 338 $row['comment_author_email'],
340 339 array( 'size' => 32 )
341 340 ),
342 341 'date' => mysql2date( 'c', (string) $row['comment_date_gmt'], false ),
343 - 'excerpt' => wp_trim_words(
344 - wp_strip_all_tags( (string) $row['comment_content'] ),
345 - 40
342 + 'excerpt' => openstation_plain_text_title(
343 + wp_trim_words( openstation_strip_all_tags( (string) $row['comment_content'] ), 40 )
346 344 ),
347 345 'status' => '1' === (string) $row['comment_approved']
348 346 ? 'approved'
349 347 : (string) $row['comment_approved'],