Default Media Set

Home Forums Legacy Support Support queries How-to & Troubleshooting Default Media Set

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #3368
    mesrick
    Spectator
    Is there a way to setup a default media set such that it is owned by an admin (so only the admin can edit it) but every instructor has the ability to insert this media and view it from the media library?
    #3451
    Anshuman Sahu
    Keymaster
    Sorry this sis not available in wplms as of now . You can try third party plugins for this .
    #3490
    mesrick
    Spectator
    any recommendations?
    #3526
    mesrick
    Spectator
    went through old tickets and realized you guys provided me with this code to do exactly this a while ago, but it doesn't work anymore... is there a tweak to it that could fix that? // Paste into customizer plugin // Default media library set - remember to change XX to admin id add_action('init','add_custom_filters'); function add_custom_filters(){ remove_filter( 'posts_where', 'wplms_attachments_wpquery_where',10 ); add_filter( 'posts_where', 'custom_wplms_attachments_wpquery_where',30); function custom_wplms_attachments_wpquery_where( $where ){ $instructor_privacy = vibe_get_option('instructor_content_privacy'); if(isset($instructor_privacy) && $instructor_privacy && !current_user_can('manage_options')){ if( is_user_logged_in() && current_user_can('edit_posts')){ global $current_user; if( isset( $_POST['action'] ) ){ if( $_POST['action'] == 'query-attachments' ){ $where .= ' AND post_author IN ('.$current_user->data->ID.',1)'; } } } } return $where; } }
    #3583
    Anshuman Sahu
    Keymaster
    This code is just a workaround to show private library to admin also . But putting restriction to delete or edit the media is not available as of now in wplms .
    #3677
    mesrick
    Spectator
    any chance this feature will be added?
    #3775
    Anshuman Sahu
    Keymaster
    Please create a feature request for this here : https://wplms.io/support/forums/forum/general/feature-request/
Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Default Media Set’ is closed to new replies.