Forums

[Plugin: No Comments On Pages] Fix for "Parse error when activating" (3 posts)

  1. dound
    Member
    Posted 3 years ago #

    For reasons I don't really understand, the body first function was causing a parse error. I split up the test and everything is fine now (see the new code for the function below). With this fix, the plugin does exactly what I want -- hopefully Jaka can update the plugin (maybe it is a WP2.7.1 issue?) so others can take advantage of it too.

    Thanks!!

    function ncop_comments_open_filter($open, $post_id=null)
    {
        if($open) {
           $post = get_post($post_id);
           if($post->post_type !== 'page') {
               return true;
           }
        }
        return false;
    }

    http://wordpress.org/extend/plugins/no-comments-on-pages/

  2. JakaJancar
    Member
    Posted 3 years ago #

    Hi!

    This seems to be a PHP4 issue. I've fixed it in 1.0.1 which will hopefully appear on the page soon.

    Jaka

  3. dound
    Member
    Posted 3 years ago #

    Great, thanks Jaka!

    David Underhill

Topic Closed

This topic has been closed to new replies.

About this Topic