Open the Media Library in List View
Shows Media > Library as a table by default instead of the thumbnail grid, which makes file names, dates, authors and attachment details easier to scan on large libraries.
Opens WPIDE on
Code
add_filter( 'get_user_option_media_library_mode', function ( $mode ) {
return isset( $_GET['mode'] ) && in_array( $_GET['mode'], array( 'grid', 'list' ), true ) ? sanitize_key( $_GET['mode'] ) : 'list';
} );
Notes
Users can still switch to the grid with the icons above the list; the default only applies when no mode is chosen in the address.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.