Change WordPress user roles and capabilities › Forums › How to or FAQ › Edit Page – but a specific page only › Reply To: Edit Page – but a specific page only
16/10/2019 at 03:26
#6027
Vladimir
Keymaster
Thank you.
There is a possible bug at URE Pro code which I should investigate and fix. At some conditions URE sends TRUE to ure_restrict_edit_post_type
instead of real post_type value. PHP evaluates ($post_type==’news’) expression as TRUE and switches off edit restrictions for pages too. This is a reason why user sees all pages instead of 1 allowed and its child page.
Quick fix is to use exact type comparison operand ‘===’, like this:
‘
if ($post_type===’news’) { // CPT ID
‘