retrieve post language in back end
-
Hi i use this function
add_filter( 'default_content', 'my_editor_content', 10, 2 ); function my_editor_content( $content, $post ) { switch( $post->post_type ) { case 'corso': $content = ''; break; case 'olea': $content = ''; break; default: $content = "<br><br><br> [tab name='CARATTERISTICHE TECNICHE'] [/tab] [tab name='FUNZIONI AVANZATE'] [/tab] [tab name='IMMAGINI CLINICHE'] [/tab] [end_tabset] "; break; } return $content; }to add defaut text to the post… BUT i have two languages so if the new post is in English i need to show that text in english.
in front end with
<?php echo "lingua: ".pll_current_language(slug);?>
i retrieve the current post language
but in backend how can i retrieve the language of the new post?bye
Maurizio
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘retrieve post language in back end’ is closed to new replies.