Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Insert di functions.php template yg sedang aktif.
- Sumber: http://revelationconcept.com/wordpress-rename-default-posts-news-something-else/
- <?php
- function revcon_change_post_label() {
- global $menu;
- global $submenu;
- $menu[5][0] = 'Produk';
- $submenu['edit.php'][5][0] = 'Produk';
- $submenu['edit.php'][10][0] = 'Tambah Produk';
- $submenu['edit.php'][16][0] = 'Tags Produk';
- echo '';
- }
- function revcon_change_post_object() {
- global $wp_post_types;
- $labels = &$wp_post_types['post']->labels;
- $labels->name = 'Produk';
- $labels->singular_name = 'Produk';
- $labels->add_new = 'Tambah Produk';
- $labels->add_new_item = 'Tambah Produk';
- $labels->edit_item = 'Edit Produk';
- $labels->new_item = 'Produk';
- $labels->view_item = 'Lihat Produk';
- $labels->search_items = 'Cari Produk';
- $labels->not_found = 'Produk tidak ditemukan';
- $labels->not_found_in_trash = 'Tidak ada produk di tong sampah';
- $labels->all_items = 'Semua Produk';
- $labels->menu_name = 'Produk';
- $labels->name_admin_bar = 'Produk';
- }
- add_action( 'admin_menu', 'revcon_change_post_label' );
- add_action( 'init', 'revcon_change_post_object' );
- ?>
- <?php
- add_filter( 'gettext', 'change_media_to_gambar' );
- add_filter( 'ngettext', 'change_media_to_gambar' );
- function change_media_to_gambar( $translated )
- {
- $translated = str_replace( 'Media', 'GAMBAR', $translated );
- $translated = str_replace( 'Library', 'Galeri', $translated );
- $translated = str_replace( 'media', 'gambar', $translated );
- return $translated;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement