Skip to content

Instantly share code, notes, and snippets.

@ko31

ko31/functions.php

Created Oct 26, 2019
Embed
What would you like to do?
[Simple Slug Translate] Customize the translated slug.
/**
* Customize the translated slug.
*/
add_filter( 'simple_slug_translate_results', function( $results ) {
// 200 - OK
if ( 200 === $results['code'] ) {
// Customize slug
$results['text'] = sprintf( 'translated-%s', $results['text'] );
}
return $results;
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.