Docs/Developer Guide/Hooks & Filters
Hooks & Filters
A small, stable set of extension points. Terse signatures for all of them: Reference → Hooks and Reference → Filters.
Action hooks — react to something
Hooks
Fired after an option panel saves — the natural place to bust a cache or sync a saved value elsewhere.
add_action( 'tpmeta/options/saved', function( $opt_name, $saved ) {
// $opt_name: which panel; $saved: the full array of saved values
}, 10, 2 );
// Or scope it to one panel:
add_action( 'tpmeta/options/mytheme_options/saved', function( $saved ) {
delete_transient( 'mytheme_css_cache' );
} );
Filters — provide or adjust data
Filters
Used to register fields, or to adjust a small piece of the plugin's default behavior.
tp_meta_boxes
Return an array of metabox definitions — this is how you register custom fields in code. See Registering Meta Fields for the full shape.
tp_user_meta
Same shape as tp_meta_boxes, but for the user-profile screen. See Integrations → User Meta.
tpmeta_allowed_svg_tags
Filters the allowed-tags array used when the plugin sanitizes SVG markup (for example, inline SVG pasted into an editor field). Add a tag or attribute your theme needs that isn't allowed by default:
add_filter( 'tpmeta_allowed_svg_tags', function( $tags ) {
$tags['clippath'] = [ 'id' => true ];
return $tags;
} );