WPMU Prefill Post
More and more backslashes are created (1 post)

  1. dagobert24
    Posted 4 years ago #


    great Plugin.
    I encountered a problem with templates containing quotes. After having a look into the source code, I realized the problem. When adding a Template or updating it, you use the function addslashes. Theses slashes are never removed. Additionally, you do not need to use the function at all, because wordpress does the magic by itself, when writing ti the database.
    I added the fixed code at the end.

    I hope, you can release an update soon,

    public function updateTemplate($id,$post_title,$post_content,$post_excerpt){
    			return $wpdb->update($table_name, array('post_title' => $post_title,
    													'post_content' => $post_content,
    													'post_excerpt' => $post_excerpt
    											), array('ID' => $id),array('%s','%s','%s'), '%d');
    		public function addTemplate($post_title,$post_content,$post_excerpt){
    			return $wpdb->insert($table_name, array('post_title' => $post_title,
    													'post_content' => $post_content,
    													'post_excerpt' => $post_excerpt,
    													'post_author' => $user_ID
    											), array('%s','%s','%s','%d'));


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WPMU Prefill Post
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic