• Hi there,

    I stumbled into this annoying bug… I have a custom post type ‘user_page’ and a custom role for users ‘custom_role’. A ‘custom_role’ user is allow to edit one ‘user_page’ (he is manually set as author, if it matters). Problem is the “Add NextGen Gallery” TinyMCE buttons didn’t show up for them even if they had the “NextGEN Use TinyMCE” capability.

    Looking around in the code I found this:

    function addbuttons() {
    // Don’t bother doing this stuff if the current user lacks permissions
    if ( !current_user_can(‘edit_posts’)&&!current_user_can(‘edit_pages’))
    return;
    // Check for NextGEN capability
    if ( !current_user_can(‘NextGEN Use TinyMCE’) )
    return;

    So the button is added only if the user have the ‘NextGEN Use TinyMCE’ and the ‘edit_pages’ or ‘edit_posts’ capabilities… that is a bit redundant.

    Problem is if I remove the first if… I get a ‘You are not allowed to call this page directly.’.

    As a workaround I ended up giving ‘custom_users’ the ‘edit_posts’ capability and just hiding the ‘Posts’ section of the admin for them.

    Maybe some one can have a look at this and come with a more permanent solution.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: NextGEN Gallery] TinyMCE buttons and custom post types’ is closed to new replies.