Asrater
Forum Replies Created
-
FYI: Have the same problem with another plugin (GD bbPress Attachments) when a user replies to a post which is not written by himself.
He could not upload files within media library until he has the capability edit_others_topics because of the old problem https://wordpress.org/support/topic/inserting-media-directly-into-post-with-the-add-media-button?replies=31 (wrong topic id)
Forum: Plugins
In reply to: [GD bbPress Attachments] Adding attachments to replies (not parent topic)Okay, found some problems within functions.php.
Attachments are now linked to the correct post/reply…. also pictures, when i use already uploaded images from media library.
When i want to upload new images to the media_library, the user needs the capability edit_others_topics otherwise he gets a “denied” (both his own and other topics/only participant).
To deny that he edit other topics i have included a short code in to functions.php
function sample_add_bbp_admin_link( $links, $args ) { $user = wp_get_current_user(); $post = get_post( $id); if (!current_user_can( 'moderate', $topic->ID) AND $post->post_author != $user->ID ) { $links = array(); $links = '<span class="bbp-admin-links" class="bbp-topic-reply-link"><a href="#new-post">Antwort</a></span>'; }; return $links; } add_filter( 'bbp_get_topic_admin_links', 'sample_add_bbp_admin_link', 10, 2 );This strips the edit button from admin links…