-5
我必须编写代码来检查用户是否在网站上有广告,如果不是,则函数必须返回$ out:
if(get_post() 'post_type'=>'advert'||'post_status'=>'publish'<1) {
return $out;
}
我必须编写代码来检查用户是否在网站上有广告,如果不是,则函数必须返回$ out:
if(get_post() 'post_type'=>'advert'||'post_status'=>'publish'<1) {
return $out;
}
你可能想这样的:
if(get_posts(array('post_type'=>'advert','post_status'=>'publish'))) {
return $out;
}
我需要为了用户必须第一次等待主持人接受。如果他有第一个广告接受,下一个不需要它 –
欢迎的话,请采取快速[旅游](http://stackoverflow.com/tour),并有一个快速浏览一下[怎么办我问一个好问题?](http://stackoverflow.com/help/how-to-ask) – hassan
也许这个?<?php $ args = array( \t \t'post_status'=>'发布', \t'帖子类型'=>'广告' \t); \t $ posts_array = get_posts($ args); ?> –
'$ post = get_post(7); if(!empty($ post)&& $ post-> post_type =='advert'&& $ post-> post_status =='publish'){return $ out;}' –