Character Encoding for wp_options

I’ve been looking for a solution to my problem for a while now. Under my wp_options page I have the following serialized entry saved: a:17:{s:11:”date_format”;s:5:”d/m/Y”;s:15:”currency_symbol”;s:1:”$”;s:14:”recaptcha_lang”;s:2:”en”;s:13:”req_div_label”;s:0:””;s:16:”req_field_symbol”;s:1:”*”;s:15:”req_error_label”;s:81:”Por favor, certifique-se de que todos os campos obrigatórios estão preenchidos.”;s:15:”req_field_error”;s:29:”Este é um campo obrigatório”;s:10:”spam_error”;s:53:”Por favor responda a pergunta anti-spam corretamente.”;s:14:”honeypot_error”;s:41:”Por favor, deixar o campo spam em branco.”;s:18:”timed_submit_error”;s:47:”Por favor, aguarde a … Read more

Adding “ ” before the last word in multiple defined areas with a plugin

How would this be done with javascript or a plugin? This would prevent widows from happening in my WordPress posts. Shaun Inman has created a similar plugin for post titles, but not for actual posts. Can his plugin be modified to include posts? http://shauninman.com/archive/2006/08/22/widont_wordpress_plugin Here is a screenshot of my post with a widow: http://cl.ly/image/0A0j383H0Z2U … Read more

How to stop WordPress from changing ellipsis into a pre-composed triple-dot glyph?

When I type an ellipsis composed of three separate dots …, WordPress displays the pre-composed triple-dot glyph … instead. Is there any way to prevent WordPress from substitution the three dots? 5 Answers 5 Three dots are converted to the typographically correct ellipsis … in wptexturize(). You can disable it in many cases, see my … Read more

Divide Post content into separate divs for every 500 characters (or any other character counts)

What is the best method for intercepting the_content of a post (for a single post page) and dividing the_content into sections of 500 characters (or any other number of characters), and then outputting each 500-character section wrapped in its own div container? I understand that get_the_content() will return the post content as a string that … Read more

Remove empty lines ( ) when author updates their post

Whenever adding an empty line between paragraphs using TinyMCE, the   character entity is added. How can I strip the content of all instances of this character whenever an author updates their post (save_post)? 2 Answers 2 Figured it out, hooking into content_save_pre: function remove_empty_lines( $content ){ // replace empty lines $content = preg_replace(“/ /”, “”, … Read more

How can I stop wp_update_post messing up HTML example code?

I’m showing little pieces of example HTML/PHP code on the frontend (with syntax highlighting). The entries are displayed as FAQ custom posts, and have a plugin (CMS Tree page) to alter the menu order, at which these are displayed. Whenever I change the order, it calls a wp_update_post, updating ID, menu_order, post_parent, post_type. For debug, … Read more

strange characters in wordpress website displayed for visitors [closed]

Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for WordPress Development Stack Exchange. Closed 7 years ago. Improve this question Apparently a lot of people complain that they only see random letters and characters: My biggest problem is that I can’t … Read more

How can I stop TinyMCE from converting my HTML entities to characters?

Here’s the problem: I paste the HTML entity code for, let’s say, a service mark (℠) into the HTML view of the editor. As soon as I switch to the “visual” tab, my entity code is turned into an actual service mark character (I guess the corresponding UTF-8 character or something? I don’t know from … Read more