Filter months in functions.php
-
Tell me, please, how to make replacement in your widget result.
I need to fix months names:function true_russian_date_forms($the_date = '') { if ( substr_count($the_date , '---') > 0 ) { return str_replace('---', '', $the_date); } $replacements = array( "Январь" => "января", "Февраль" => "февраля", "Март" => "марта", "Апрель" => "апреля", "Май" => "мая", "Июнь" => "июня", "Июль" => "июля", "Август" => "августа", "Сентябрь" => "сентября", "Октябрь" => "октября", "Ноябрь" => "ноября", "Декабрь" => "декабря" ); return strtr($the_date, $replacements); } add_filter('the_time', 'true_russian_date_forms'); add_filter('get_the_time', 'true_russian_date_forms'); add_filter('the_date', 'true_russian_date_forms'); add_filter('get_the_date', 'true_russian_date_forms'); add_filter('the_modified_time', 'true_russian_date_forms'); add_filter('get_the_modified_date', 'true_russian_date_forms'); add_filter('get_post_time', 'true_russian_date_forms'); add_filter('get_comment_date', 'true_russian_date_forms');what filter can be added to hook your plugin data?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Filter months in functions.php’ is closed to new replies.