diff --git a/README.md b/README.md
index ebcce9f..1e4896b 100644
--- a/README.md
+++ b/README.md
@@ -29,7 +29,6 @@ That's about it. Clicking Publish pushes the entry live instantly (or schedules
1. Install the bookmarklet provided on the `Settings > Linkmarklet` screen
1. Customize your installation using the `Settings > Linkmarklet` menu in the WordPress admin
-
## Usage
1. Install the bookmarklet provided on the `Settings > Linkmarklet` screen
@@ -46,6 +45,10 @@ That's about it. Clicking Publish pushes the entry live instantly (or schedules
## Changelog
+
+ - 0.7
+ - Fixed an issue where post Tags were set after the post was published which caused interference with other plugin processes
+
- 0.6
- Fixed an issue where Future Publish settings wouldn't properly unset after being set.
- Added autocomplete to Tags
diff --git a/index.php b/index.php
index c87874b..0b5c5d1 100644
--- a/index.php
+++ b/index.php
@@ -242,7 +242,7 @@ function linkmarklet_post()
// see if we need to process any images
$images = array();
- $markdown_pattern = "/(!\\[(.*?)\\]\\s?\\([ \\n]*(?:<(\\S*)>|(.*?))[ \\n]*(([\\'\"])(.*?)\\6[ \\n]*)?\\))/ui";
+ // $markdown_pattern = "/(!\\[(.*?)\\]\\s?\\([ \\n]*(?:<(\\S*)>|(.*?))[ \\n]*(([\\'\"])(.*?)\\6[ \\n]*)?\\))/ui";
$markdown_pattern = "/(!\\[(.*?)\\]\\s?\\([ \\n]*(?:<(\\S*)>|(.*?))[ \\n]*?\\))/ui";
preg_match_all( $markdown_pattern, $content, $images );
@@ -320,6 +320,15 @@ function linkmarklet_post()
// update what we've set
$post_ID = wp_update_post( $post );
+ // we also need to add our custom field link
+ $custom_field = isset( $settings['custom_field'] ) ? $settings['custom_field'] : '';
+ if( !empty( $custom_field ) )
+ update_post_meta( $post_ID, $custom_field, mysql_real_escape_string( $_POST['url'] ) );
+
+ // set our post tags if applicable
+ if( !empty( $settings['support_tags'] ) && !empty( $_POST['tags'] ) )
+ wp_set_post_tags( $post_ID, $_POST['tags'] );
+
// mark as published if that's the intention
if ( isset( $_POST['publish'] ) && current_user_can( 'publish_posts' ) )
{
@@ -349,15 +358,6 @@ function linkmarklet_post()
// our final update
$post_ID = wp_update_post( $post );
- // we also need to add our custom field link
- $custom_field = isset( $settings['custom_field'] ) ? $settings['custom_field'] : '';
- if( !empty( $custom_field ) )
- update_post_meta( $post_ID, $custom_field, mysql_real_escape_string( $_POST['url'] ) );
-
- // set our post tags if applicable
- if( !empty( $settings['support_tags'] ) && !empty( $_POST['tags'] ) )
- wp_set_post_tags( $post_ID, $_POST['tags'] );
-
return $post_ID;
}
diff --git a/linkmarklet.php b/linkmarklet.php
index 8ca5573..30f0552 100644
--- a/linkmarklet.php
+++ b/linkmarklet.php
@@ -1,17 +1,17 @@