(Wordpress) How can i get the full content of a post with the html tags - unstripped
I'm using WordPress for my site with the qtranslate plugin and i'm trying to display language flags in each post.
Qtranslate inserts html tags to the content and title like "!--:en-->" for each language that i used in each post
So i need a conditional that checks which of these html tags are included in the content so i can print the specific flags
something like this:
function language_pick(){
$qt_dir = "http://localhost/MY-SITE/wp-content/plugins/qtranslate-xp/flags/";
$cr_url = "http://".$_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
$en_url = esc_html($cr_url."&lang=en");
$fr_url = esc_html($cr_url."&lang=fr");
$it_url = esc_html($cr_url."&lang=it");
$es_url = esc_html($cr_url."&lang=es");
$query = get_post(get_the_ID());
$content = apply_filters('the_content', $query->post_content);
if(get_permalink() != $cr_url) { echo '
'; }
if (strpos($content, '') === true) {
if(get_permalink() != $en_url) { echo '
'; } }
if(strpos($content,'') === true) {
if(get_permalink() != $fr_url) { echo '
'; } }
if(strpos($content,'') === true) {
if(get_permalink() != $it_url) { echo '
'; } }
if(strpos($content,'') === true) {
if(get_permalink() != $es_url) { echo '
'; } }
}