How can I stop a function encoding an entity?
-
I use the code below in my functions to pre-populate new posts.
It works fine, except if I use entities (example: »), which are converted (example: ») when I open the edit page for a new post.
I prefer to keep them unconverted.
add_filter( 'default_content', 'pu_default_editor_content' ); function pu_default_editor_content( $content ) { global $post_type; switch( $post_type ) { case 'post': $content = 'Default content for blog posts.'; break; } return $content; }
The topic ‘How can I stop a function encoding an entity?’ is closed to new replies.