aioseo_save_term

This filter can be used to manipulate all SEO/social markup/schema data for an individual term when it is saved.

Parameters (1)

$term (AIOSEO\Pro\Models\Term)
The AIOSEO term object.

The object properties are subject to change and therefore not included in this documentation. For a full list of object properties, we recommend inspecting an instance of this object in a local development environment.

Example code snippet

The code snippet below can be used to dynamically change the SEO title of a specific term when the metadata is saved.

add_filter( "aioseo_save_term", "aioseo_filter_term_data" );

function aioseo_filter_term_data( $term ) {
	if ( 12 === (int) $term->term_id ) {
		$term->title = 'Some new title here';
	}
	return $term;
}

Changelog

VersionDescription
4.2.2Introduced.