WordPress problem with htmlentities

It seems that the “convert_chars” filter is causing the trouble, try removing it by: remove_filter( ‘the_content’, ‘convert_chars’ ); Also try removing the richedit_pre hook (which formats the text for the rich text editor, also uses convert_chars function) by: remove_filter( ‘the_editor_content’, ‘wp_richedit_pre’ ); Hope that helps!

How to use get_option() without any filter?

I’m guessing that you are using language tags around ‘polish textdeutschland text’ i.e. <!–:pl–>polish text<!–:–><!–:de–>deutschland text<!–:–> but that they got ignored when you posted your answer. I’m pretty sure what you need to be doing is using the __() (which returns the translation for use in php code) and _e() (echo’s direct to screen) wordpress … Read more

Clean-up script tags

If you really want to do this, then it should already be possible. The global $wp_scripts is an instance of the WP_Scripts class, which is an instance of the WP_Dependencies class. So in theory (not tested), you should be able to do something like this: function alter_script_tags() { echo ‘<pre>’; print $GLOBALS[‘wp_scripts’]->print_html; echo ‘</pre>’; } … Read more

Close the media-upload thickbox right after upload is finished?

This was solved as simply as: Hooking a custom .js script to the media-upload thickbox, so that it runs inside the iFrame: function admin_styles_scripts_media_upload() { wp_register_script(‘mediajs’, get_template_directory_uri().’/js/button.js’, array(‘jquery’), true); wp_enqueue_script(‘mediajs’); } add_action(‘admin_print_scripts-media-upload-popup’,’admin_styles_scripts_media_upload’); ?> Use the script to replace the default Save button with a custom one, and call self.parent.tb_remove from that: jQuery(document).ready(function() { jQuery(‘<a href=”#” … Read more

Placing Ads after every 10th Post with Infinite Scroll

See this: http://infiniteajaxscroll.com/docs/events.html#rendered So, place all the ad code in an ajax function (http://codex.wordpress.org/Plugin_API/Action_Reference/wp_ajax_%28action%29) add_action( ‘wp_ajax_your_ad_fn’, ‘your_ad_fn’); add_action( ‘wp_ajax_nopriv_your_ad_fn’, ‘your_ad_fn’); function your_ad_fn(){ // your ad code here // if sending js, set Content-type header to application/javascript // if sending html, text/html } https://stackoverflow.com/questions/9664282/difference-between-application-x-javascript-and-text-javascript-content-types Then in your custom js, ias.on(‘rendered’, function(items) { var $items = $(items); … Read more