skip to Main Content

PHP Conditional Check for multiple WordPress Roles

I am looking for more performant code for selecting multiple WordPress roles as a check to run some code: if ( current_user_can( 'wholesale_customer' ) || current_user_can( 'wholesale_premium' ) || current_user_can( 'wholesale_nz') || current_user_can( 'wholesale_wa') ){ // do something } The…

VIEW QUESTION

WordPress role capabilities issue

I need some help with capabilities for a CPT. I register a new CPT with a capability type 'agenda'. To do this I use the code below in the register array 'capability_type' => 'agenda' After that I added two new…

VIEW QUESTION
Back To Top
Search