Tidy Media 1.1.0 has 7 actions and 12 filters, read directly from its source code on Nov 18, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when Tidy Media fires an action
add_action( 'tidy_media_file_quarantined', function( $attachment_id, $quarantine_meta ) {
// Your code runs here.
}, 10, 2 );
// Change a value Tidy Media is about to use
add_filter( 'https_local_ssl_verify', function( $value ) {
// Change $value here.
return $value;
}, 10, 1 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
/** * This filter is documented in wp-includes/class-wp-http-streams.php */ apply_filters( 'https_local_ssl_verify', false ); -
/** * Fires after a file is quarantined. */ do_action( 'tidy_media_file_quarantined', $attachment_id, $quarantine_meta ); -
/** * Fires on plugin activation. */ do_action( 'tidy_media_activated' ); -
/** * Filter the post types whose content is scanned for media references. */ apply_filters( 'tidy_media_content_post_types', $types ); -
/** * Filter to add custom field media detection from other plugins. */ apply_filters( 'tidy_media_custom_fields_additional', $used_media ); -
/** * Fires on plugin deactivation. */ do_action( 'tidy_media_deactivated' ); -
/** * Fires after a file is permanently deleted from quarantine. */ do_action( 'tidy_media_file_deleted', $quarantine_path ); -
/** * Fires after a file is restored from quarantine. */ do_action( 'tidy_media_file_restored', $attachment_id, $quarantine_path, $meta ); -
/** * Filter the list of directory names to skip during filesystem scan. */ apply_filters( 'tidy_media_fs_skip_dirs', $skip_dirs ); -
/** * Filter the name patterns of log and history tables, which Tidy Media never * reads. */ apply_filters( 'tidy_media_history_tables', $patterns ); -
/** * Filter the fields and options whose value is a media ID, a list of IDs or a * map of IDs. */ apply_filters( 'tidy_media_id_fields', array() ); -
/** * Filter the media item fields that mark it as created by an import or sync * tool. */ apply_filters( 'tidy_media_import_marker_keys', $keys ); -
/** * Filter the names of active plugins that import or sync media. */ apply_filters( 'tidy_media_importer_plugins', $names ); -
/** * Fires after Tidy Media is fully initialized. */ do_action( 'tidy_media_init', $this ); -
/** * Filter the upload folders (first path segment) whose files Tidy Media never * moves. */ apply_filters( 'tidy_media_protected_folders', $folders ); -
/** * Fires after expired quarantine files are cleaned up. */ do_action( 'tidy_media_quarantine_cleanup_complete', $deleted_count ); -
/** * Filter the plugin tables whose rows are read for media references. */ apply_filters( 'tidy_media_reference_tables', array() ); -
/** * Filter to add custom WooCommerce media detection. */ apply_filters( 'tidy_media_woocommerce_additional', $used_media ); -
apply_filters( 'mb_settings_pages', array() );
Generated from Tidy Media's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Done for you
Rather have it built for you?
Tell us what should change and we’ll write and test the code using these hooks.
Custom hook snippet
from $49
A small, update-safe change built on the plugin’s own hooks.
- Code written against the plugin’s actions and filters
- Tested on a staging copy of your site
- Install instructions included
Typical turnaround: 2–3 business days
Choose thisPlugin customisation
from $149
New features or changed behaviour, without editing the plugin’s files.
- Built as a companion plugin, so updates never wipe it
- Exact quote before we start
- Tested on staging, then deployed
Typical turnaround: 3–7 business days
Choose thisNot sure which fits? Describe what you need and we’ll suggest the simplest option.
Can't find the right hook?
We can build the customisation for you. Describe what you need: