comments_open vs $post->comment_status
-
Hi All,
I’m developing my first plugin which changes some functionality using the comments_open hook. No problems there, worked great on my local install.
However, I tried it on a live 2.8 site and it didn’t work, in this case because the theme didn’t use
comments_open()
Instead the theme used
('open' == $post-> comment_status)
which as far as I can tell does exactly the same thing, but without allowing plugins to hook in. I’m guessing this was a nice up-to-date 2.8 site but using an older theme.So my question is…
Is this anything to worry about when releasing a plugin? I managed to get this site working by changing the theme to use
comments_open()
, but I was wondering if there was a way I could hook into $post-> comment_status directly as well, just to make sure the plugin works. Is this a case of it being the site-owners job to upgrade their theme or is there something I can do as the plugin developer to make their job easier?Any feedback appreciated.
Harvey.
- The topic ‘comments_open vs $post->comment_status’ is closed to new replies.