[Plugin: WPMU Prefill Post] More and more backslashes are created
-
Hi,
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,
Cheerspublic 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'));
- The topic ‘[Plugin: WPMU Prefill Post] More and more backslashes are created’ is closed to new replies.