Thanks for following the link from WordPress Development Stack Exchange and posting your question. You have a couple of options depending on your specific needs.
First, there are two columns in the Media/Assistant submenu table that may give you what you need. You can add them to your submenu display by clicking on the “Screen Options” link in the upper-right corner of the screen.
- File URL shows the complete path required to access the file, starting with your site’s URL and down through the uploads directory ending with the file name.
- Base File shows just the sub-path within the uploads directory, ending with the file name.
Just check the box to the left of the column you want to add it to the display.
Both of these are standard values provided by MLA. The drawback is that sorting on these will not be the same as sorting on the file name alone, unless you left the WordPress “Organize my uploads into month- and year-based folders” setting unchecked when you set up your site.
If you want the file name without the additional URL/path components you can easily create a Custom Field for it. MLA gives you access to many “Data sources for custom field mapping”; you can find a complete list in the Settings/Media Library Assistant Documentation tab. You can select file_name
to get the file name and extension or name_only
to get just the name portion without the extension.
Complete instructions on setting up a custom field and making it a sortable column on the Media/assistant submenu table are given in this earlier support topic:
Show Image Size in Directory?
Just substitute file_name
or name_only
for your data source. YOu can leave the default “Native” format and “Text” option for your custom field.
I am marking this topic resolved, but please update it if you have any problems or further questions about adding File Name to your Media/Assistant submenu table. Thanks for your interest in the plugin.