Title: Plugin needs update to work w/ current WP version
Last modified: August 21, 2016

---

# Plugin needs update to work w/ current WP version

 *  [bishless](https://wordpress.org/support/users/bishless/)
 * (@bishless)
 * [13 years ago](https://wordpress.org/support/topic/plugin-needs-update-to-work-w-current-wp-version/)
 * Love the idea behind this plugin and would really like to implement it in our
   company’s Intranet pages.
 * Any chance we could put a version on GitHub for some TLC? I’m getting errors 
   all over the place about deprecated functions and such when using 0.9 w/ WP 3.5.1.
   I’d love some help getting it polished up… but only w/ permission/involvement
   from the current ‘owner’.
 * [http://wordpress.org/extend/plugins/post-revision-display/](http://wordpress.org/extend/plugins/post-revision-display/)

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Thread Starter [bishless](https://wordpress.org/support/users/bishless/)
 * (@bishless)
 * [13 years ago](https://wordpress.org/support/topic/plugin-needs-update-to-work-w-current-wp-version/#post-3796499)
 * Currently banging my head on this error:
 * `Notice: Undefined variable: diffs in /path/wp-content/plugins/post-revision-
   display/post-revision-display.php on line 232 Notice: Undefined variable: rev_content
   in /path/wp-content/plugins/post-revision-display/post-revision-display.php on
   line 233`
 * Here are the lines in question (with some extra for context):
 *     ```
       // question: should we be applying filters to all the parts and not just content?
       function prd_set_globals() {
       	if (!$post = get_post(get_the_ID())) {
       		return;
       	}
       	$revision = null;
       	$rev_id = 0;
       	$is_rev = false;
       	$note = prd_get_revision_note($post, $revision, $rev_id, $is_rev);
       	if ($is_rev) {
       		$diffs = prd_get_revision_diffs($post, $revision);
   
       		/* seems clunky, but I don't know a better way -- want to apply_filters
       		   for old revision, but need to skip prd_display_post_revisions filter
       		   to avoid getting stuck in a loop, so will remove filter and add
       		   right back in */
       		remove_filter('the_content', 'prd_display_post_revisions');
       		$rev_content = apply_filters('the_content', $revision->post_content);
       		add_filter('the_content', 'prd_display_post_revisions');
       	}
       	$revs = prd_get_revision_list($post, array('since_publish' => true, 'type' => 'revision',
       											   'rev_id' => $rev_id, 'is_rev' => $is_rev));
       	$GLOBALS['prd_is_rev'] = $is_rev;
       	$GLOBALS['prd_revision_note'] = $note;
       	$GLOBALS['prd_revision_list'] = $revs;
       	$GLOBALS['prd_revision_diffs'] = $diffs;
       	$GLOBALS['prd_revision_content'] = $rev_content;
       	$GLOBALS['prd_globals_set'] = true;
       }
       ```
   
 * I’m using Manual Mode. And have this in the template file in use:
 *     ```
       if ( $prd == "on" && function_exists('the_revision_note_prd')) {
                       the_revision_note_prd();
                   }
   
       			the_content();
   
                   if ( $prd == "on" ) {
                       if(function_exists('the_revision_list_prd')) { the_revision_list_prd(true); }
                       if(function_exists('the_revision_diffs_prd')) { the_revision_diffs_prd(); }
                   }
       ```
   
 * The error shows up above the content, and then again below the content. However,
   despite the error, the revision list still displays and functions as I’d expect.
   Clicking a revision link takes one to the revision page… complete w/ note at 
   the top. Yet no error messages on past revision pages. Only on ‘current’.
 *  Plugin Author [scarpenter](https://wordpress.org/support/users/scarpenter/)
 * (@scarpenter)
 * [13 years ago](https://wordpress.org/support/topic/plugin-needs-update-to-work-w-current-wp-version/#post-3796610)
 * Hi! Thanks for bringing this up. I don’t actively use the plugin and haven’t 
   looked at it for a while, but I’d like to maintain it responsibly. 🙂
 * Do you have debug mode turned on in your wp-config.php file?
 * Still, the code should be fixed to not have debug errors. I’ll be happy to look
   at it, but it might not be in the next day or two. (Maybe this weekend — I’ve
   learned more about WordPress/PHP so that I feel some motivation to do a little
   cleanup.)
 * For now, in debug mode or not, you could try defining the variable here:
 *     ```
       $revision = null;
       $rev_id = 0;
       $is_rev = false;
       $diffs = '';    // insert this line
       $note = prd_get_revision_note($post, $revision, $rev_id, $is_rev);
       ```
   
 * I think that would take care of it
 * And I’ll consider putting it on GitHub — I see no reason not to. And no permission
   is needed for anything, of course. It’s free software!
 *  [Patzman](https://wordpress.org/support/users/patzman/)
 * (@patzman)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/plugin-needs-update-to-work-w-current-wp-version/#post-3796777)
 * Hi!!
 * I’ve installed your very usefull plugin and now updated to wordpress 3.7.1. Previous
   version 3.4.2 worked fine…
 * The result is that everything seems to be ok but the link to each revision is
   broken (in frontend). It just jumps back to the current version… seems like the
   browser shows no reaction on URL/?rev=”revision-ID” …any ideas to resolve the
   issue?
 * cheers
 *  [Patzman](https://wordpress.org/support/users/patzman/)
 * (@patzman)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/plugin-needs-update-to-work-w-current-wp-version/#post-3796778)
 * OK, I have to apologize.. I’ve testet your plugin with another WordPress installation
   and it works as it should. I think I have a conflict with a another plugin.. 
   maybe Co-Authors Plus.. or some PHP settings…
 *  Plugin Author [scarpenter](https://wordpress.org/support/users/scarpenter/)
 * (@scarpenter)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/plugin-needs-update-to-work-w-current-wp-version/#post-3796779)
 * Thanks, Patzman — I’ve not been doing much WordPress these days but I still keep
   an eye on these forums. It might have been hard to find some time to work on 
   it but I do want to keep things functional.
 *  [Patzman](https://wordpress.org/support/users/patzman/)
 * (@patzman)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/plugin-needs-update-to-work-w-current-wp-version/#post-3796780)
 * I still tryed to locate the problem and I think that it don’t work in combination
   with a multisite wordpress installation (I’ve set some time ago). Can you confirm
   that?
 *  Plugin Author [scarpenter](https://wordpress.org/support/users/scarpenter/)
 * (@scarpenter)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/plugin-needs-update-to-work-w-current-wp-version/#post-3796781)
 * Hi — I’ve never tried the plugin on a multisite installation.
 *  [Patzman](https://wordpress.org/support/users/patzman/)
 * (@patzman)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/plugin-needs-update-to-work-w-current-wp-version/#post-3796782)
 * I disabled my multisite installation and your plugin worked fine again.. anyeay
   thanks for reply 😉

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Plugin needs update to work w/ current WP version’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/post-revision-display.svg)
 * [Post Revision Display](https://wordpress.org/plugins/post-revision-display/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/post-revision-display/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/post-revision-display/)
 * [Active Topics](https://wordpress.org/support/plugin/post-revision-display/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/post-revision-display/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/post-revision-display/reviews/)

 * 8 replies
 * 3 participants
 * Last reply from: [Patzman](https://wordpress.org/support/users/patzman/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/plugin-needs-update-to-work-w-current-wp-version/#post-3796782)
 * Status: not resolved