Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen-Cronin committed Nov 11, 2015
2 parents 0114de0 + 85b144a commit 315894a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=sjc@scra
Tags: comments, comment moderation, show parent comment, show comment parent, parent comment
Requires at least: 4.2
Tested up to: 4.3.1
Stable tag: 0.2
Stable tag: 0.2.1
Add the parent comment to comments in the WP Admin area, in order to assist with comment moderation

== Description ==
Expand Down Expand Up @@ -45,6 +45,9 @@ There are none! This plugin is purposely kept simple.

== Changelog ==

= 0.2.1 (11 November 2015) =
* Bug Fix: Made changes to how the comment object is accessed so it works with WordPress 4.4 (plugin breaks with the beta version).

= 0.2 (22 September 2015) =
* Enhancement: Reworked the UI so that the parent comment appears before the comment, in a style similar to a blockquote (props to Jason Lemieux from Postmatic).

Expand Down
11 changes: 4 additions & 7 deletions show-parent-comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
Plugin Name: Show Parent Comment
Plugin URI: https://wordpress.org/plugins/show-parent-comment/
Description: Show the parent comment as part of the comment text, in the Admin area only. Useful for getting context when moderating comments.
Version: 0.2
Date: 22 September 2015
Version: 0.2.1
Date: 11 November 2015
Author: Stephen Cronin (Scratch99 Design)
Author URI: http://scratch99.com/
Expand Down Expand Up @@ -35,10 +35,7 @@
/**
* Filter comments and add parent comment to output
*/
function spc_show_parent_comment( $content ) {

// get the global comment variable
global $comment;
function spc_show_parent_comment( $content, $comment ) {

// if there's no parent comment, return the comment text unchanged
if ( ! $comment->comment_parent ) {
Expand All @@ -63,7 +60,7 @@ function spc_show_parent_comment( $content ) {
* Call function to filter comments on Admin requests
*/
function spc_show_parent_comment_admin() {
add_filter( 'get_comment_text', 'spc_show_parent_comment' );
add_filter( 'get_comment_text', 'spc_show_parent_comment', 10, 2 );
}
add_action( 'admin_init', 'spc_show_parent_comment_admin' );

Expand Down

0 comments on commit 315894a

Please sign in to comment.