WordPress Media Delete Logs

From a quick look there is a dedicated delete_attachment action in wp_delete_attachment() function, it gets passed an ID of attachment being deleted. However I am not completely confident that this covers all cases. There is a fair amount of duplication in WP’s post–related APIs and similar tasks might be performed by different functions in different … Read more

Change thumbnail size for Media Library

This was an interesting question as I knew nothing about modifying the default behaviour of the Media Library. So, I ended up doing some research on the matter. I found out that the Media Library uses wp_ajax_query_attachments() to get the images and other media. Inside the ajax function there’s ajax_query_attachments_args that can be used to … Read more