Forums

are_comments_enabled() (1 post)

  1. cleoni
    Member
    Posted 2 years ago #

    Hello,
    I develop sites upon WordPress and I always wonder why there's no way to cleanly disable the "comments" feature.

    In most of my installations (100% I'd say) comments are disabled (that is, enabled to registered users and user registration disabled), or the like.

    In the themes I always find something like

    <?php comments_popup_link('No Comments &raquo;', '1 Comment &raquo;', '% Comments &raquo;'); ?>

    Which turns out to be useless in my case and which I always have to disable by hand (and eventually re-enable later).

    wouldn't it be useful a function, say are_comments_enabled() which determines if comments are enabled and, if not, just avoids the useless comments stuff?

    example: (please note: this function doesn't actually exist!)

    <?php if (commens_are_enabled()) comments_popup_link('No Comments &raquo;', '1 Comment &raquo;', '% Comments &raquo;'); ?>

    This way, themes would look much more clean and ready to use.

    Peace to all

    Cris

Topic Closed

This topic has been closed to new replies.

About this Topic