WP to Twitter - Version 3.4.9

Version Description

  • Clear a couple PHP notices.
  • Add styles for Pro.
Download this release

Release Info

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

Code changes from version 3.4.8 to 3.4.9

css/post-styles.css CHANGED
@@ -27,6 +27,12 @@
27
  border: 1px solid #eee;
28
  }
29
 
 
 
 
 
 
 
30
 
31
  .wp-to-twitter .panel-toggle {
32
  margin-bottom: 0;
27
  border: 1px solid #eee;
28
  }
29
 
30
+ #wpt_selected_image img {
31
+ width: 100%;
32
+ max-width: 100%;
33
+ height: auto;
34
+ }
35
+
36
 
37
  .wp-to-twitter .panel-toggle {
38
  margin-bottom: 0;
readme.txt CHANGED
@@ -3,11 +3,11 @@ Contributors: joedolson
3
  Donate link: http://www.joedolson.com/donate/
4
  Tags: twitter, microblogging, bitly, yourls, redirect, shortener, post, links, social, sharing, media, tweet
5
  Requires at least: 4.4
6
- Tested up to: 5.4
7
  Requires PHP: 5.6
8
  License: GPLv2 or later
9
  Text Domain: wp-to-twitter
10
- Stable tag: 3.4.8
11
 
12
  Posts a Twitter update when you update your WordPress blog or add a link, with your chosen URL shortening service.
13
 
@@ -63,6 +63,11 @@ Check out my <a href="https://github.com/joedolson/plugin-extensions/tree/master
63
 
64
  == Changelog ==
65
 
 
 
 
 
 
66
  = 3.4.8 =
67
 
68
  * Bug fix: Incorrect variable type in default tab assignment.
3
  Donate link: http://www.joedolson.com/donate/
4
  Tags: twitter, microblogging, bitly, yourls, redirect, shortener, post, links, social, sharing, media, tweet
5
  Requires at least: 4.4
6
+ Tested up to: 5.5
7
  Requires PHP: 5.6
8
  License: GPLv2 or later
9
  Text Domain: wp-to-twitter
10
+ Stable tag: 3.4.9
11
 
12
  Posts a Twitter update when you update your WordPress blog or add a link, with your chosen URL shortening service.
13
 
63
 
64
  == Changelog ==
65
 
66
+ = 3.4.9 =
67
+
68
+ * Clear a couple PHP notices.
69
+ * Add styles for Pro.
70
+
71
  = 3.4.8 =
72
 
73
  * Bug fix: Incorrect variable type in default tab assignment.
wp-to-twitter-manager.php CHANGED
@@ -891,6 +891,7 @@ function wpt_sidebar() {
891
  */
892
  function wpt_do_server_check( $test = false ) {
893
  $wpt_server_string = get_option( 'wpt_server_string' );
 
894
  if ( ! $wpt_server_string || isset( $_GET['refresh_wpt_server_string'] ) || true === $test ) {
895
  $server_time = gmdate( DATE_COOKIE );
896
  $response = wp_remote_get(
@@ -913,7 +914,7 @@ function wpt_do_server_check( $test = false ) {
913
  }
914
  $warning .= '</ul>';
915
  }
916
- $errors = '<li>' . $ssl . $warning . '</li>';
917
  } else {
918
  $date = gmdate( DATE_COOKIE, strtotime( $response['headers']['date'] ) );
919
  $errors = '';
891
  */
892
  function wpt_do_server_check( $test = false ) {
893
  $wpt_server_string = get_option( 'wpt_server_string' );
894
+ $date = '';
895
  if ( ! $wpt_server_string || isset( $_GET['refresh_wpt_server_string'] ) || true === $test ) {
896
  $server_time = gmdate( DATE_COOKIE );
897
  $response = wp_remote_get(
914
  }
915
  $warning .= '</ul>';
916
  }
917
+ $errors = '<li>' . $warning . '</li>';
918
  } else {
919
  $date = gmdate( DATE_COOKIE, strtotime( $response['headers']['date'] ) );
920
  $errors = '';
wp-to-twitter-shorteners.php CHANGED
@@ -258,7 +258,7 @@ if ( ! function_exists( 'wpt_shorten_url' ) ) {
258
  $shortener = get_option( 'jd_shortener' );
259
  // Don't store URLs if the not shortening is selected.
260
  if ( '3' === $shortener ) {
261
- return void;
262
  }
263
  if ( wpt_short_url( $post_ID ) !== $url && wpt_is_valid_url( $url ) ) {
264
  update_post_meta( $post_ID, '_wpt_short_url', $url );
258
  $shortener = get_option( 'jd_shortener' );
259
  // Don't store URLs if the not shortening is selected.
260
  if ( '3' === $shortener ) {
261
+ return;
262
  }
263
  if ( wpt_short_url( $post_ID ) !== $url && wpt_is_valid_url( $url ) ) {
264
  update_post_meta( $post_ID, '_wpt_short_url', $url );
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.4.8
21
  */
22
 
23
  /*
@@ -57,7 +57,7 @@ require_once( plugin_dir_path( __FILE__ ) . 'wpt-widget.php' );
57
  require_once( plugin_dir_path( __FILE__ ) . 'wpt-rate-limiting.php' );
58
 
59
  global $wpt_version;
60
- $wpt_version = '3.4.8';
61
 
62
  add_action( 'init', 'wpt_load_textdomain' );
63
  /**
@@ -1150,7 +1150,7 @@ function wpt_add_twitter_inner_box( $post ) {
1150
  if ( isset( $_REQUEST['message'] ) && '10' !== $_REQUEST['message'] ) {
1151
  // don't display when draft is updated or if no message.
1152
  if ( ! ( ( '1' === $_REQUEST['message'] ) && ( 'publish' === $status && '1' !== $options[ $type ]['post-edited-update'] ) ) && 'no' !== $tweet_this ) {
1153
- $log = wpt_log( 'wpt_status_message', $post_id );
1154
  $class = ( __( 'Tweet sent successfully.', 'wp-to-twitter' ) !== $log ) ? 'error' : 'updated';
1155
  if ( '' !== trim( $log ) ) {
1156
  echo "<div class='$class'><p>$log</p></div>";
@@ -1514,7 +1514,7 @@ function wpt_ajax_tweet() {
1514
  break;
1515
  }
1516
  // Translators: Full text of Tweet, time scheduled for.
1517
- $return = ( 'tweet' === $action ) ? wpt_log( 'wpt_status_message', $post_ID ) : sprintf( __( 'Tweet scheduled: %1$s for %2$s', 'wp-tweets-pro' ), '"' . $sentence . '"', $print_schedule );
1518
  echo $return;
1519
  if ( count( $authors ) > 1 ) {
1520
  echo '<br />';
17
  * License: GPL-2.0+
18
  * License URI: http://www.gnu.org/license/gpl-2.0.txt
19
  * Domain Path: lang
20
+ * Version: 3.4.9
21
  */
22
 
23
  /*
57
  require_once( plugin_dir_path( __FILE__ ) . 'wpt-rate-limiting.php' );
58
 
59
  global $wpt_version;
60
+ $wpt_version = '3.4.9';
61
 
62
  add_action( 'init', 'wpt_load_textdomain' );
63
  /**
1150
  if ( isset( $_REQUEST['message'] ) && '10' !== $_REQUEST['message'] ) {
1151
  // don't display when draft is updated or if no message.
1152
  if ( ! ( ( '1' === $_REQUEST['message'] ) && ( 'publish' === $status && '1' !== $options[ $type ]['post-edited-update'] ) ) && 'no' !== $tweet_this ) {
1153
+ $log = wpt_get_log( 'wpt_status_message', $post_id );
1154
  $class = ( __( 'Tweet sent successfully.', 'wp-to-twitter' ) !== $log ) ? 'error' : 'updated';
1155
  if ( '' !== trim( $log ) ) {
1156
  echo "<div class='$class'><p>$log</p></div>";
1514
  break;
1515
  }
1516
  // Translators: Full text of Tweet, time scheduled for.
1517
+ $return = ( 'tweet' === $action ) ? wpt_get_log( 'wpt_status_message', $post_ID ) : sprintf( __( 'Tweet scheduled: %1$s for %2$s', 'wp-tweets-pro' ), '"' . $sentence . '"', $print_schedule );
1518
  echo $return;
1519
  if ( count( $authors ) > 1 ) {
1520
  echo '<br />';
wpt-functions.php CHANGED
@@ -83,7 +83,7 @@ function wpt_set_log( $data, $id, $message ) {
83
  *
84
  * @return stored message.
85
  */
86
- function wpt_log( $data, $id ) {
87
  if ( 'test' === $id ) {
88
  $log = get_option( $data );
89
  } elseif ( 'last' === $id ) {
@@ -124,7 +124,7 @@ function wpt_check_functions() {
124
  if ( $testpost ) {
125
  $message .= '<li><strong>' . __( 'WP to Twitter successfully submitted a status update to Twitter.', 'wp-to-twitter' ) . '</strong></li>';
126
  } else {
127
- $error = wpt_log( 'wpt_status_message', 'test' );
128
  $message .= '<li class="error"><strong>' . __( 'WP to Twitter failed to submit an update to Twitter.', 'wp-to-twitter' ) . '</strong></li>';
129
  $message .= "<li class='error'>$error</li>";
130
  }
@@ -184,7 +184,7 @@ function wpt_settings_tabs() {
184
  */
185
  function wpt_show_last_tweet() {
186
  if ( apply_filters( 'wpt_show_last_tweet', true ) ) {
187
- $log = wpt_log( 'wpt_status_message', 'last' );
188
  if ( ! empty( $log ) && is_array( $log ) ) {
189
  $post_ID = $log[0];
190
  $post = get_post( $post_ID );
83
  *
84
  * @return stored message.
85
  */
86
+ function wpt_get_log( $data, $id ) {
87
  if ( 'test' === $id ) {
88
  $log = get_option( $data );
89
  } elseif ( 'last' === $id ) {
124
  if ( $testpost ) {
125
  $message .= '<li><strong>' . __( 'WP to Twitter successfully submitted a status update to Twitter.', 'wp-to-twitter' ) . '</strong></li>';
126
  } else {
127
+ $error = wpt_get_log( 'wpt_status_message', 'test' );
128
  $message .= '<li class="error"><strong>' . __( 'WP to Twitter failed to submit an update to Twitter.', 'wp-to-twitter' ) . '</strong></li>';
129
  $message .= "<li class='error'>$error</li>";
130
  }
184
  */
185
  function wpt_show_last_tweet() {
186
  if ( apply_filters( 'wpt_show_last_tweet', true ) ) {
187
+ $log = wpt_get_log( 'wpt_status_message', 'last' );
188
  if ( ! empty( $log ) && is_array( $log ) ) {
189
  $post_ID = $log[0];
190
  $post = get_post( $post_ID );