aam_sanitize_slug
Purpose
Override AAM slug normalization.
Callback
- Type: Filter.
- Arguments:
$normalized,$slug. - Return: the filtered first argument.
Example
add_filter('aam_sanitize_slug', function ($normalized, $slug) {
return $slug === 'myapp:legacy' ? 'myapp-legacy' : $normalized;
}, 10, 2);
Maps a single legacy slug to a stable identifier while keeping AAM normalization for other slugs.
See the complete hook list.