Pz-LinkCard - Version 2.0.7.1

Version Description

Download this release

Release Info

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

Code changes from version 2.0.7 to 2.0.7.1

languages/pz-linkcard-ja.mo CHANGED
Binary file
languages/pz-linkcard-ja.po CHANGED
@@ -4,8 +4,8 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: Pz-LinkCard\n"
6
  "Report-Msgid-Bugs-To: http://wppolyglots.wordpress.com\n"
7
- "POT-Creation-Date: 2017-11-22 20:11+0900\n"
8
- "PO-Revision-Date: 2017-11-22 20:11+0900\n"
9
  "Last-Translator: \n"
10
  "Language-Team: poporon\n"
11
  "Language: ja_JP\n"
@@ -19,71 +19,71 @@ msgstr ""
19
  "Plural-Forms: nplurals=1; plural=0;\n"
20
  "X-Poedit-SearchPath-0: ..\n"
21
 
22
- #: ../pz-linkcard.php:292
23
  msgid "Incorrect URL specification."
24
  msgstr ""
25
 
26
- #: ../pz-linkcard.php:1094
27
  msgid "Category"
28
  msgstr "カテゴリー"
29
 
30
- #: ../pz-linkcard.php:1094 ../pz-linkcard.php:1106
31
  msgid "‘"
32
  msgstr "「"
33
 
34
- #: ../pz-linkcard.php:1094 ../pz-linkcard.php:1106
35
  msgid "’"
36
  msgstr "」"
37
 
38
- #: ../pz-linkcard.php:1095 ../pz-linkcard.php:1107
39
  msgid "("
40
  msgstr "("
41
 
42
- #: ../pz-linkcard.php:1095 ../pz-linkcard.php:1107
43
  msgid "Count"
44
  msgstr "件数"
45
 
46
- #: ../pz-linkcard.php:1095 ../pz-linkcard.php:1107
47
  msgid ")"
48
  msgstr ")"
49
 
50
- #: ../pz-linkcard.php:1106
51
  msgid "Tag"
52
  msgstr "タグ"
53
 
54
- #: ../pz-linkcard.php:1499
55
  msgid "Linkcard"
56
  msgstr "リンクカード"
57
 
58
- #: ../pz-linkcard.php:1499
59
  msgid "Make Linkcard"
60
  msgstr "リンクカードのショートコードを挿入する"
61
 
62
- #: ../pz-linkcard.php:1506
63
  msgid "Invalid URL parameter in "
64
  msgstr "URLパラメーターの指定が無効です→"
65
 
66
- #: ../pz-linkcard.php:1533 ../lib/pz-linkcard-cacheman.php:6
67
  msgid "LinkCard cache manager"
68
  msgstr "リンクカード/DBキャッシュ管理"
69
 
70
- #: ../pz-linkcard.php:1533
71
  msgid "Pz LkC Cache"
72
  msgstr "Pz カード管理"
73
 
74
- #: ../pz-linkcard.php:1534 ../lib/pz-linkcard-settings.php:4
75
  msgid "LinkCard Settings"
76
  msgstr "リンクカード設定"
77
 
78
- #: ../pz-linkcard.php:1534
79
  msgid "Pz LinkCard"
80
  msgstr "Pz カード設定"
81
 
82
- #: ../pz-linkcard.php:1621
83
  msgid "Settings"
84
  msgstr "設定"
85
 
86
- #: ../pz-linkcard.php:1621
87
  msgid "Manage"
88
  msgstr "管理"
89
 
4
  msgstr ""
5
  "Project-Id-Version: Pz-LinkCard\n"
6
  "Report-Msgid-Bugs-To: http://wppolyglots.wordpress.com\n"
7
+ "POT-Creation-Date: 2017-12-16 19:30+0900\n"
8
+ "PO-Revision-Date: 2017-12-16 19:30+0900\n"
9
  "Last-Translator: \n"
10
  "Language-Team: poporon\n"
11
  "Language: ja_JP\n"
19
  "Plural-Forms: nplurals=1; plural=0;\n"
20
  "X-Poedit-SearchPath-0: ..\n"
21
 
22
+ #: ../pz-linkcard.php:293
23
  msgid "Incorrect URL specification."
24
  msgstr ""
25
 
26
+ #: ../pz-linkcard.php:1096
27
  msgid "Category"
28
  msgstr "カテゴリー"
29
 
30
+ #: ../pz-linkcard.php:1096 ../pz-linkcard.php:1109
31
  msgid "‘"
32
  msgstr "「"
33
 
34
+ #: ../pz-linkcard.php:1096 ../pz-linkcard.php:1109
35
  msgid "’"
36
  msgstr "」"
37
 
38
+ #: ../pz-linkcard.php:1097 ../pz-linkcard.php:1110
39
  msgid "("
40
  msgstr "("
41
 
42
+ #: ../pz-linkcard.php:1097 ../pz-linkcard.php:1110
43
  msgid "Count"
44
  msgstr "件数"
45
 
46
+ #: ../pz-linkcard.php:1097 ../pz-linkcard.php:1110
47
  msgid ")"
48
  msgstr ")"
49
 
50
+ #: ../pz-linkcard.php:1109
51
  msgid "Tag"
52
  msgstr "タグ"
53
 
54
+ #: ../pz-linkcard.php:1502
55
  msgid "Linkcard"
56
  msgstr "リンクカード"
57
 
58
+ #: ../pz-linkcard.php:1502
59
  msgid "Make Linkcard"
60
  msgstr "リンクカードのショートコードを挿入する"
61
 
62
+ #: ../pz-linkcard.php:1509
63
  msgid "Invalid URL parameter in "
64
  msgstr "URLパラメーターの指定が無効です→"
65
 
66
+ #: ../pz-linkcard.php:1536 ../lib/pz-linkcard-cacheman.php:6
67
  msgid "LinkCard cache manager"
68
  msgstr "リンクカード/DBキャッシュ管理"
69
 
70
+ #: ../pz-linkcard.php:1536
71
  msgid "Pz LkC Cache"
72
  msgstr "Pz カード管理"
73
 
74
+ #: ../pz-linkcard.php:1537 ../lib/pz-linkcard-settings.php:4
75
  msgid "LinkCard Settings"
76
  msgstr "リンクカード設定"
77
 
78
+ #: ../pz-linkcard.php:1537
79
  msgid "Pz LinkCard"
80
  msgstr "Pz カード設定"
81
 
82
+ #: ../pz-linkcard.php:1624
83
  msgid "Settings"
84
  msgstr "設定"
85
 
86
+ #: ../pz-linkcard.php:1624
87
  msgid "Manage"
88
  msgstr "管理"
89
 
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: 2.0.7
7
  Author: poporon
8
  Author URI: http://poporon.poponet.jp
9
  License: GPLv2 or later
@@ -141,7 +141,7 @@ class Pz_LinkCard {
141
  'invalid-time' => null,
142
  'plugin-link' => null,
143
  'plugin-name' => 'Pz-LinkCard',
144
- 'plugin-version' => '2.0.7',
145
  'plugin-url' => 'http://poporon.poponet.jp/pz-linkcard',
146
  'pz-hbc-options' => null,
147
  'debug-time' => null
@@ -258,6 +258,7 @@ class Pz_LinkCard {
258
  }
259
 
260
  // URL
 
261
  if (isset( $atts['url'] ) ) {
262
  $url = $atts['url'];
263
  } elseif (isset( $atts['href'] ) ) { // Aタグのようにhrefパラメータも有効にする
@@ -282,7 +283,7 @@ class Pz_LinkCard {
282
  echo '<!-- Pz-LkC ['.html_entity_decode(print_r($atts, true)).'] /-->'.PHP_EOL;
283
  }
284
  if (!$this->options['flg-invalid']) {
285
- if (!preg_match('/\/wp-admin/admin-ajax.php/i', $_SERVER["REQUEST_URI"])) {
286
  $this->options['flg-invalid'] = '1';
287
  $this->options['invalid-url'] = (empty($_SERVER["HTTPS"]) ? "http://" : "https://").$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"];
288
  $this->options['invalid-time'] = $this->now;
@@ -1047,7 +1048,7 @@ class Pz_LinkCard {
1047
  if ($this->options['debug-time']) {
1048
  echo '<!-- Pz-LkC [PID='.$post_id.'] /-->'.PHP_EOL;
1049
  }
1050
-
1051
  if ( !$post_id && isset($this->options['flg-get-pid']) ? true : false) {
1052
  $url = $this->Pz_GetRedirURL( $data ); // 本当の記事URLを取得
1053
  $post_id = url_to_postid($url ); // 記事IDを取得
@@ -1055,7 +1056,7 @@ class Pz_LinkCard {
1055
  echo '<!-- Pz-LkC [PID='.$post_id.'(REDIR)] /-->'.PHP_EOL;
1056
  }
1057
  }
1058
-
1059
  if ( $post_id ) {
1060
  $result_code = 200; // 外部取得と同じコードをセット
1061
  $post = get_post($post_id); // 記事情報
@@ -1085,7 +1086,8 @@ class Pz_LinkCard {
1085
  $result_code = '404';
1086
 
1087
  // カテゴリ ページの処理
1088
- $cat_url = home_url().'/category/';
 
1089
  $cat_len = mb_strlen($cat_url );
1090
  if (substr($url, 0, $cat_len ) == $cat_url ) {
1091
  $cat_slug = substr($url, $cat_len );
@@ -1098,7 +1100,8 @@ class Pz_LinkCard {
1098
  }
1099
  } else {
1100
  // タグ ページの処理
1101
- $cat_url = home_url().'/tag/';
 
1102
  $cat_len = mb_strlen($cat_url );
1103
  if (substr($url, 0, $cat_len ) == $cat_url ) {
1104
  $cat_slug = substr($url, $cat_len );
3
  Plugin Name: Pz-LinkCard
4
  Plugin URI: http://poporon.poponet.jp/pz-linkcard
5
  Description: リンクをカード形式で表示します。
6
+ Version: 2.0.7.1
7
  Author: poporon
8
  Author URI: http://poporon.poponet.jp
9
  License: GPLv2 or later
141
  'invalid-time' => null,
142
  'plugin-link' => null,
143
  'plugin-name' => 'Pz-LinkCard',
144
+ 'plugin-version' => '2.0.7.1',
145
  'plugin-url' => 'http://poporon.poponet.jp/pz-linkcard',
146
  'pz-hbc-options' => null,
147
  'debug-time' => null
258
  }
259
 
260
  // URL
261
+ $url = '';
262
  if (isset( $atts['url'] ) ) {
263
  $url = $atts['url'];
264
  } elseif (isset( $atts['href'] ) ) { // Aタグのようにhrefパラメータも有効にする
283
  echo '<!-- Pz-LkC ['.html_entity_decode(print_r($atts, true)).'] /-->'.PHP_EOL;
284
  }
285
  if (!$this->options['flg-invalid']) {
286
+ if (!preg_match('/\/wp-admin\/admin-ajax.php/i', $_SERVER["REQUEST_URI"])) {
287
  $this->options['flg-invalid'] = '1';
288
  $this->options['invalid-url'] = (empty($_SERVER["HTTPS"]) ? "http://" : "https://").$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"];
289
  $this->options['invalid-time'] = $this->now;
1048
  if ($this->options['debug-time']) {
1049
  echo '<!-- Pz-LkC [PID='.$post_id.'] /-->'.PHP_EOL;
1050
  }
1051
+
1052
  if ( !$post_id && isset($this->options['flg-get-pid']) ? true : false) {
1053
  $url = $this->Pz_GetRedirURL( $data ); // 本当の記事URLを取得
1054
  $post_id = url_to_postid($url ); // 記事IDを取得
1056
  echo '<!-- Pz-LkC [PID='.$post_id.'(REDIR)] /-->'.PHP_EOL;
1057
  }
1058
  }
1059
+
1060
  if ( $post_id ) {
1061
  $result_code = 200; // 外部取得と同じコードをセット
1062
  $post = get_post($post_id); // 記事情報
1086
  $result_code = '404';
1087
 
1088
  // カテゴリ ページの処理
1089
+ $cat_dir = get_option('category_base');
1090
+ $cat_url = home_url().'/'.($cat_dir ? $cat_dir : 'category').'/';
1091
  $cat_len = mb_strlen($cat_url );
1092
  if (substr($url, 0, $cat_len ) == $cat_url ) {
1093
  $cat_slug = substr($url, $cat_len );
1100
  }
1101
  } else {
1102
  // タグ ページの処理
1103
+ $cat_dir = get_option('tag_base');
1104
+ $cat_url = home_url().'/'.($cat_dir ? $cat_dir : 'tag').'/';
1105
  $cat_len = mb_strlen($cat_url );
1106
  if (substr($url, 0, $cat_len ) == $cat_url ) {
1107
  $cat_slug = substr($url, $cat_len );
readme.txt CHANGED
@@ -155,6 +155,10 @@ A5.
155
  5. "Write shortcode and url"
156
 
157
  == Changelog ==
 
 
 
 
158
  Ver2.0.7
159
  * WordPress 4.9 での動作確認。
160
  Compatible with WordPress 4.9
155
  5. "Write shortcode and url"
156
 
157
  == Changelog ==
158
+ Ver2.0.7.1
159
+ * バグ修正。
160
+ Fixed: Fixed a bug.
161
+
162
  Ver2.0.7
163
  * WordPress 4.9 での動作確認。
164
  Compatible with WordPress 4.9