Podpress – ‘Before More tag’ bug fix

Posted in: PHP, Web Development, WordPress

I was having an issue using Podpress 8.8 and WordPress 2.5 on one of my projects. Even though I set the ‘Before <!- More -> tag’ option to ‘No’, the flash player was still showing up in the short version or excerpt of the posts. Setting the option to ‘no’ is supposed to keep the flash player from showing in the short version of your posts but there was some kind of bug in the coding.

After taking a look at the code I made a few changes that seemed to make this feature work the way it is supposed to. Here are the changes that I made…

podpress_class.php line 623 below GLOBAL $post I changed:

unset($this->tempContentAddedTo[$post->ID]);
$content = $this->insert_content($content);
unset($this->tempContentAddedTo[$post->ID]);
return $content;

To this:

if($this->settings['contentBeforeMore'] == 'yes') {
   unset($this->tempContentAddedTo[$post->ID]);
   $content = $this->insert_content($content);
   unset($this->tempContentAddedTo[$post->ID]);
}
return $content;

Then I commented out lines 665 – 667:

/*if($this->settings['contentBeforeMore'] == 'no') {
    return $content;
}*/

Those changes made Podpress function the way I wanted it to (the way I believe it was intended too) and so far has not caused any problems or broke any other functionality with WordPress or Podpress.

About This Site

WDBuc.com is the web site and blog of William D Buchanan, a technology professional in the Tampa, Florida area. More...