PHP conditional on query string with id
I have this code:
if('open' == $po开发者_Python百科st->comment_status || !isset($_GET['wp_accept_favor']))
{
// show comment form
}
else
{
// dont show comment form
}
domain.com/?wp_accept_favor then show comment form
domain.com/?wp_accept_favor=2 then dont show comment form
How do I do that? Thanks
if('open' == $post->comment_status ||
(isset($_GET['wp_accept_favor']) && empty($_GET['wp_accept_favor'])) )
{
// show comment form
}
else if(isset($_GET['wp_accept_favor']) && !empty($_GET['wp_accept_favor']))
{
// do not show comment form
}
精彩评论