This topic contains 3 replies, has 2 voices. Last updated by Cristián Lávaque 4 years, 2 months ago.
Topic Author | Topic |
---|---|
Posted: Monday Oct 15th, 2012 at 11:52 am #28444 | |
I am using some conditionals for ccaps, and so far, i always used something along the line of this: [s2If is_user_logged_in() AND current_user_can(access_s2member_ccap_music)]Now, i need to check for an OR condition and i get a message that i cannot have an AND and OR in the same conditional in a shortcode. I am wondering if i really need to have the is_user_logged_in() in the shortcode as i assume one cannot “have access” to a ccap if they are not logged in in the first place. Isn`t that redondant? Can i skip the logged_in part so i can have something like : [s2If current_user_can(access_s2member_ccap_music) OR current_user_can(access_s2member_ccap_tutorial) ]That would be simpler than having to use php if i can just use the shortcode (especially since the php vanishes if the wp page opens in the visual editor!) |