WP to Twitter - Version 3.3.6

Version Description

  • Bug fix: Check for existing short URL should not run when parsing text of Tweets for URLs.
Download this release

Release Info

Developer joedolson
Plugin Icon 128x128 WP to Twitter
Version 3.3.6
Comparing to
See all releases

Code changes from version 3.3.5 to 3.3.6

Files changed (3) hide show
  1. readme.txt +5 -1
  2. wp-to-twitter-shorteners.php +1 -1
  3. wp-to-twitter.php +4 -4
readme.txt CHANGED
@@ -7,7 +7,7 @@ Tested up to: 4.9
7
  Requires PHP: 5.3
8
  License: GPLv2 or later
9
  Text Domain: wp-to-twitter
10
- Stable tag: 3.3.5
11
 
12
  Posts a Twitter update when you update your WordPress blog or add a link, with your chosen URL shortening service.
13
 
@@ -65,6 +65,10 @@ Check out my <a href="https://github.com/joedolson/plugin-extensions/tree/master
65
 
66
  == Changelog ==
67
 
 
 
 
 
68
  = 3.3.5 =
69
 
70
  * Bug fix: Assignment replaced with comparison in connection creation.
7
  Requires PHP: 5.3
8
  License: GPLv2 or later
9
  Text Domain: wp-to-twitter
10
+ Stable tag: 3.3.6
11
 
12
  Posts a Twitter update when you update your WordPress blog or add a link, with your chosen URL shortening service.
13
 
65
 
66
  == Changelog ==
67
 
68
+ = 3.3.6 =
69
+
70
+ * Bug fix: Check for existing short URL should not run when parsing text of Tweets for URLs.
71
+
72
  = 3.3.5 =
73
 
74
  * Bug fix: Assignment replaced with comparison in connection creation.
wp-to-twitter-shorteners.php CHANGED
@@ -33,7 +33,7 @@ if ( ! function_exists( 'wpt_shorten_url' ) ) {
33
  // filter link before sending to shortener or adding analytics.
34
  $shortener = get_option( 'jd_shortener' );
35
  // if the URL already exists, return it without processing.
36
- if ( wpt_short_url( $post_ID ) ) {
37
  $shrink = wpt_short_url( $post_ID );
38
 
39
  return $shrink;
33
  // filter link before sending to shortener or adding analytics.
34
  $shortener = get_option( 'jd_shortener' );
35
  // if the URL already exists, return it without processing.
36
+ if ( wpt_short_url( $post_ID ) && $store_urls ) {
37
  $shrink = wpt_short_url( $post_ID );
38
 
39
  return $shrink;
wp-to-twitter.php CHANGED
@@ -17,7 +17,7 @@
17
  * License: GPL-2.0+
18
  * License URI: http://www.gnu.org/license/gpl-2.0.txt
19
  * Domain Path: lang
20
- * Version: 3.3.5
21
  */
22
 
23
  /*
@@ -56,7 +56,7 @@ require_once( plugin_dir_path( __FILE__ ) . 'wpt-widget.php' );
56
  require_once( plugin_dir_path( __FILE__ ) . 'wpt-rate-limiting.php' );
57
 
58
  global $wpt_version;
59
- $wpt_version = '3.3.5';
60
 
61
  add_action( 'init', 'wpt_load_textdomain' );
62
  /**
@@ -620,7 +620,7 @@ function wpt_post_info( $post_ID ) {
620
  if ( '' == $thisposttitle && isset( $_POST['title'] ) ) {
621
  $thisposttitle = $_POST['title'];
622
  }
623
- $thisposttitle = strip_tags( apply_filters( 'the_title', stripcslashes( $thisposttitle ) ) );
624
  // These are common sequences that may not be fixed by html_entity_decode due to double encoding.
625
  $search = array( '&apos;', '&#039;', '&quot;', '&#034;', '&amp;', '&#038;' );
626
  $replace = array( "'", "'", '"', '"', '&', '&' );
@@ -656,7 +656,7 @@ function wpt_short_url( $post_id ) {
656
  $post_id = $post_ID;
657
  }
658
  $use_urls = ( get_option( 'wpt_use_stored_urls' ) == 'false' ) ? false : true;
659
- $short = ( $use_url ) ? get_post_meta( $post_id, '_wpt_short_url', true ) : false;
660
 
661
  return $short;
662
  }
17
  * License: GPL-2.0+
18
  * License URI: http://www.gnu.org/license/gpl-2.0.txt
19
  * Domain Path: lang
20
+ * Version: 3.3.6
21
  */
22
 
23
  /*
56
  require_once( plugin_dir_path( __FILE__ ) . 'wpt-rate-limiting.php' );
57
 
58
  global $wpt_version;
59
+ $wpt_version = '3.3.6';
60
 
61
  add_action( 'init', 'wpt_load_textdomain' );
62
  /**
620
  if ( '' == $thisposttitle && isset( $_POST['title'] ) ) {
621
  $thisposttitle = $_POST['title'];
622
  }
623
+ $thisposttitle = strip_tags( apply_filters( 'the_title', stripcslashes( $thisposttitle ), $post_ID ) );
624
  // These are common sequences that may not be fixed by html_entity_decode due to double encoding.
625
  $search = array( '&apos;', '&#039;', '&quot;', '&#034;', '&amp;', '&#038;' );
626
  $replace = array( "'", "'", '"', '"', '&', '&' );
656
  $post_id = $post_ID;
657
  }
658
  $use_urls = ( get_option( 'wpt_use_stored_urls' ) == 'false' ) ? false : true;
659
+ $short = ( $use_urls ) ? get_post_meta( $post_id, '_wpt_short_url', true ) : false;
660
 
661
  return $short;
662
  }