• Resolved riedlprk

    (@riedlprk)


    Hi, we have product (actually seminar) descriptions set up as posts, and insert these on woocommerce product pages – works great so far.

    Now we want to open up for external trainers, and I have to find a way to let people of a certain user role see only their own posts in the dropdown list to pick from.

    I looked at your code example for only show posts return array( 'post' ); but am a bit stumbled on how to expand that. I tried a return get_posts(); instead but that gave me an empty dropdown list.

    Do you have a suggestion how to do that?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter riedlprk

    (@riedlprk)

    Ok investigating a further bit, I see what this is doing, corresponding to lines 1415-1427 in insert-pages.php.

    Would it be possible to add an entry to $query that asks for user capability edit_other_posts and if not given, restricts to showing only own posts?

    Plugin Author Paul Ryan

    (@figureone)

    This makes good sense to me! We’ll probably make a configurable option that defaults to on for new users, but off for existing users (so as not to disrupt any existing installs). We’ll let you know when the next version is out with this option. Thanks!

    Plugin Author Paul Ryan

    (@figureone)

    Aloha, version 3.7.0 has been released with the option to only show Authors and Contributors (roles without the edit_others_posts capability) their own posts in the TinyMCE popup list of posts.

    View post on imgur.com

    Hope that helps your specific use case!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Let users only pick from their own posts to insert’ is closed to new replies.