I think the essence of the plug-in is understood by everyone, it translates all Cyrillic words into Latin letters, but it took so much that you need to get the link with Cyrillic letters, how it can be circumvented thanks to the function file, is it possible to write the code
php for id?
|
1 answer
There is a single hook in the plugin that can be used. This is wbcr_ctl_transliterate . You can check what the initial title of the post was and return it if it matches the given one (in the example, this is пост 6 ).
function wbcr_ctl_transliterate_filter( $title, $origin_title, $iso9_table ) { if ( 'пост 6' === $origin_title ) { return $origin_title; } return $title; } add_filter( 'wbcr_ctl_transliterate', 'wbcr_ctl_transliterate_filter', 10, 3 ); The code works at the stage of post creation. After creating a post, you can change its slug (permalink) to пост 6 and this value will not be converted by the plugin to Latin.
- Wow crutches, so IDI is not known at first. Maybe like something like a button? - AndSol
- This is not a crutch, but a normal hook. What does the id? Why id? You know what the name of the post will be - well, insert it into the code. By the way, if after creating a post you want to change it to slug (url), then the code will also work. It is necessary to enter
пост 6into the slug field and this value will remain unchanged. - KAGG Design - I may not be catching up, but in 'post 6' I need to write down 'post = 6' or another number? - AndSol pm
- Everything I understood how it works, but is it possible to enter it in the admin panel, for example, to type a special field? - AndSol 1:08 pm
- Everything's possible. But for this, it is necessary to formulate the requirements clearly and ask a separate question - KAGG Design
|