Pz-LinkCard - Version 1.6.2

Version Description

  • We have removed the tweet number acquisition restrictions.

  • 1120

Download this release

Release Info

Developer poporon
Plugin Icon 128x128 Pz-LinkCard
Version 1.6.2
Comparing to
See all releases

Code changes from version 1.6.1 to 1.6.2

Files changed (2) hide show
  1. pz-linkcard.php +12 -14
  2. readme.txt +5 -0
pz-linkcard.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Pz-LinkCard
4
  Plugin URI: http://poporon.poponet.jp/pz-linkcard
5
  Description: リンクをカード形式で表示します。
6
- Version: 1.6.1
7
  Author: poporon
8
  Author URI: http://poporon.poponet.jp
9
  License: GPLv2 or later
@@ -92,7 +92,7 @@ class Pz_LinkCard {
92
  'css-path' => null,
93
  'css-url' => null,
94
  'sns-position' => '2',
95
- 'sns-tw' => '1',
96
  'sns-fb' => '1',
97
  'sns-hb' => '1',
98
  'link-all' => '1',
@@ -100,7 +100,7 @@ class Pz_LinkCard {
100
  'nofollow' => null,
101
  'plugin-link' => null,
102
  'plugin-name' => 'Pz-LinkCard',
103
- 'plugin-version' => '1.6.1',
104
  'plugin-url' => 'http://poporon.poponet.jp/pz-linkcard',
105
  'pz-hbc-options' => null,
106
  'debug-time' => null
@@ -748,17 +748,15 @@ class Pz_LinkCard {
748
  $sns_renew = true;
749
  }
750
 
751
- if ($now < 1448031600) { // 2015年11月20日以降ツイッターの取得をしない
752
- if (isset($this->options['sns-tw']) && !is_null($this->options['sns-tw'])) {
753
- $count_before = intval(isset($data['sns_twitter']) ? $data['sns_twitter'] : -1);
754
- if ($sns_renew || $count_before < 0) {
755
- $result = wp_remote_get( 'http://urls.api.twitter.com/1/urls/count.json?url=' .rawurlencode($data['url']), $opt );
756
- if (isset($result) && !is_wp_error($result) && $result['response']['code'] == 200) {
757
- $count = intval(json_decode($result['body'])->count);
758
- if ($count <> $count_before) {
759
- $data['sns_twitter'] = $count;
760
- $update_cnt = true;
761
- }
762
  }
763
  }
764
  }
3
  Plugin Name: Pz-LinkCard
4
  Plugin URI: http://poporon.poponet.jp/pz-linkcard
5
  Description: リンクをカード形式で表示します。
6
+ Version: 1.6.2
7
  Author: poporon
8
  Author URI: http://poporon.poponet.jp
9
  License: GPLv2 or later
92
  'css-path' => null,
93
  'css-url' => null,
94
  'sns-position' => '2',
95
+ 'sns-tw' => null,
96
  'sns-fb' => '1',
97
  'sns-hb' => '1',
98
  'link-all' => '1',
100
  'nofollow' => null,
101
  'plugin-link' => null,
102
  'plugin-name' => 'Pz-LinkCard',
103
+ 'plugin-version' => '1.6.2',
104
  'plugin-url' => 'http://poporon.poponet.jp/pz-linkcard',
105
  'pz-hbc-options' => null,
106
  'debug-time' => null
748
  $sns_renew = true;
749
  }
750
 
751
+ if (isset($this->options['sns-tw']) && !is_null($this->options['sns-tw'])) {
752
+ $count_before = intval(isset($data['sns_twitter']) ? $data['sns_twitter'] : -1);
753
+ if ($sns_renew || $count_before < 0) {
754
+ $result = wp_remote_get( 'http://urls.api.twitter.com/1/urls/count.json?url=' .rawurlencode($data['url']), $opt );
755
+ if (isset($result) && !is_wp_error($result) && $result['response']['code'] == 200) {
756
+ $count = intval(json_decode($result['body'])->count);
757
+ if ($count <> $count_before) {
758
+ $data['sns_twitter'] = $count;
759
+ $update_cnt = true;
 
 
760
  }
761
  }
762
  }
readme.txt CHANGED
@@ -164,6 +164,11 @@ WordPressピンバックは記事中にリンクを直接記述しないと飛
164
 
165
  == Changelog ==
166
 
 
 
 
 
 
167
  = 1.6.1 =
168
  * Modefied: Deadline of Tweets number get me grew day.
169
 
164
 
165
  == Changelog ==
166
 
167
+ = 1.6.2 =
168
+ * We have removed the tweet number acquisition restrictions.
169
+
170
+ * サンフランシスコで11月20日を超えましたが、ツイート数が取得できているので、制限を外しました。
171
+
172
  = 1.6.1 =
173
  * Modefied: Deadline of Tweets number get me grew day.
174