Hi, i would like to let ‘editor’ users to create and update Header elements. I’ve been able to let access to that option following this topic: https://generatepress.com/forums/topic/add-update-elements-for-specific-user-role/
That thread was useful because i want exactly that. Once i’ve logged in as an editor, i can see the menu option ‘Elements’, and that’s fine, but the problem arrives when i want to create/edit a header. I go to the ‘display rules’ tab and in ‘location’ when i choose for example a page, no dropdown of pages appear at all. If i see the xhr calls at chrome inspector, i can see there is a call to wp-admin/admin-ajax.php with correct id, nonce and action (generate_elements_get_location_posts) values, but the return is always ‘0’. I’ve seen at source code at gp-premium/elements/class-metabox.php:line 1832 that if i comment out:
/*if ( ! current_user_can( ‘manage_options’ ) ) {
return;
}*/
i can select a page (or wahtever) logged in as editor, exactly what i want.
So, at this point, i know at least 2 solutions to this:
– assign manage_options capability to editors: but this.. you know, it will give editors too much control.
– change source code of your premium plugin: problem with updates, etc.
But i wonder if there is any other solution to this, any filter?
Hope i’ve been clear in explanation. Any help is appreciated. Some ideas to get it to work?