Search code examples
wordpresswpml

How to fix html output on this wpml function?


I'm using wpml plugin for translation on my WP site and I've a problem with this function wpml_element_link it doesn't render the html on the browser. it shows the html as plain text, could you please help me ?

$text = sprintf(__('Credit (s)' ,'mke'), 100);
apply_filters( 'wpml_element_link', 43772, 'page',__('<span class="my-credit">'. $text .'</span>') );

I want the html class be applied on my element.

Thank you


Solution

  • I resolved this issue by using html decode function and it works superb! thank you everyone for your help.