
Replacing the standard inscriptions in the WordPress admin
Working with WordPress I often stumbled upon a misunderstanding of clients, what is a point POST or Media in admin panel. I recently found a simple and effective solution to this problem on the Internet.. WordPress has a standard solution to replace some of the default admin headers with the function str_ireplace(). I won't tell for a long time., just sharing a working example.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | add_filter( 'gettext', 'wps_translate_words_array' ); add_filter( 'ngettext', 'wps_translate_words_array' ); function wps_translate_words_array( $translated ) { $words = array( // 'word to translate' = > 'translation' 'Posts' => 'Article', 'Post' => 'Articles', 'Pages' => 'Stuffing', 'Media' => 'Upload Images', 'Links' => 'Blog Roll', ); $translated = str_ireplace( array_keys($words), $words, $translated ); return $translated; } |
I checked everything, works great! Good luck with development ).

/*

- Basic web design course;
- Site layout;
- General course on CMS WordPress and continuation of the course on template development;
- Website development in PHP.