Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Lacy

    (@katielacy-1)

    Hi Adrian,

    Please download or clone the repo and upload it to the WordPress plugin section.

    A tab with owner permissions will be added to the WordPress admin menu.

    Lacy

    (@katielacy-1)

    Hey Adrian,

    I have created an add-on plugin to wp-filebase which you can find here https://github.com/katielacy/changeFilebaseowner

    Please let me know if this helps you with above!

    Lacy

    (@katielacy-1)

    Hi David,

    Thank you for the above. Here are the questions answered :

    I do wish to remove the images from the media pop up which are within a specific term.

    We have removed the term we wish to exclude from the search term dropdown.

    All the terms we wish to excluded are in the pop up as the other users do not have access to the MLA area. They can only view this when adding new or modifying a post.

    It would be great to extend the “mla_media_modal_initial_filters” hook to allow an exclude option or a NOT IN in the term relation.

    I hope this answers all of the above, and would like to thank you for your quick response and awesome plugin!

    Lacy

    (@katielacy-1)

    Hey guys,

    Please can you help me I would like to include a search for not in term. So I have one term id of 77 within “attachment_category” and if a user is in a group with no access to this category I wish to remove the images from the media modal popup.

    Please see my code ….

    $terms = get_terms( 'attachment_category' );
           if (current_user_can('administrator') || current_user_can('sales_marketing')) :
               $hasAccess = true;
           else :
               $hasAccess = false;
           endif;
        if ( ! empty( $terms ) && ! is_wp_error( $terms ) ){
            $termID = array();
            $imageBank = get_term_by('name', 'Image Bank', 'attachment_category');
            $imageBankId = $imageBank->term_id;
            foreach ( $terms as $term ) {
              $termID[$term->term_id] = $term->term_id;
             }
            if (!$hasAccess) :
            unset($termID[$imageBankId]);
            endif;
           $termID = implode(',' , $termID);
        }
        $initial_values['filterTerm'] = $termID; // This would be a not in if poss.
        return $initial_values;
Viewing 4 replies - 1 through 4 (of 4 total)