Support » Plugin: Frontend File Manager Plugin » Filter by author

  • Resolved kanellos

    (@kanellos)


    Hi,

    Is it possibile to filter the uploaded files by author (in Admin > Files Manager > all files)?

    Thanks,
    Randall

Viewing 1 replies (of 1 total)
  • Thread Starter kanellos

    (@kanellos)

    Solved

     // Add Author filter search in files library
    function file_add_author_dropdown()
    {
        $scr = get_current_screen();
        if ( $scr->id !==  'edit-wpfm-files') return;
    
        $author   = filter_input(INPUT_GET, 'author', FILTER_SANITIZE_STRING );
        $selected = (int)$author > 0 ? $author : '-1';
        $args = array(
            'show_option_none'   => 'All Authors',
            'name'               => 'author',
            'selected'           => $selected
        );
        wp_dropdown_users( $args );
    }
    add_action('restrict_manage_posts', 'file_add_author_dropdown');
Viewing 1 replies (of 1 total)
  • The topic ‘Filter by author’ is closed to new replies.