Version Description
Download this release
Release Info
Developer | poporon |
Plugin | Pz-LinkCard |
Version | 2.2.0 |
Comparing to | |
See all releases |
Code changes from version 2.1.9.1 to 2.2.0
- lib/pz-linkcard-cacheman-list.php +10 -2
- pz-linkcard.php +4 -4
- readme.txt +9 -1
lib/pz-linkcard-cacheman-list.php
CHANGED
@@ -107,7 +107,15 @@ if ( strpos($sql, 'UPDATE') || strpos($sql, 'UNION') ) { // 気持ち程度の
|
|
107 |
}
|
108 |
|
109 |
// データ抽出
|
110 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
$count_now = count($data_all);
|
112 |
|
113 |
// ページ数
|
@@ -127,7 +135,7 @@ if (isset($page_limit)) {
|
|
127 |
$sql .= ' LIMIT '.$page_top.' , '.$page_limit;
|
128 |
}
|
129 |
// データ抽出
|
130 |
-
|
131 |
|
132 |
// ドメイン一覧作成
|
133 |
$sql = "SELECT domain, site_name, count(*) as count FROM $this->db_name GROUP BY domain ASC";
|
107 |
}
|
108 |
|
109 |
// データ抽出
|
110 |
+
if ($key3) {
|
111 |
+
$data_all = $wpdb->get_results($wpdb->prepare($sql, $key1, $key2, $key3));
|
112 |
+
} elseif ($key2) {
|
113 |
+
$data_all = $wpdb->get_results($wpdb->prepare($sql, $key1, $key2));
|
114 |
+
} elseif ($key1) {
|
115 |
+
$data_all = $wpdb->get_results($wpdb->prepare($sql, $key1));
|
116 |
+
} else {
|
117 |
+
$data_all = $wpdb->get_results($sql);
|
118 |
+
}
|
119 |
$count_now = count($data_all);
|
120 |
|
121 |
// ページ数
|
135 |
$sql .= ' LIMIT '.$page_top.' , '.$page_limit;
|
136 |
}
|
137 |
// データ抽出
|
138 |
+
//$data_all = $wpdb->get_results($wpdb->prepare($sql, $key1, $key2, $key3));
|
139 |
|
140 |
// ドメイン一覧作成
|
141 |
$sql = "SELECT domain, site_name, count(*) as count FROM $this->db_name GROUP BY domain ASC";
|
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.
|
7 |
Author: poporon
|
8 |
Author URI: http://poporon.poponet.jp
|
9 |
License: GPLv2 or later
|
@@ -1055,7 +1055,7 @@ class Pz_LinkCard {
|
|
1055 |
if (!isset($data) || !is_array($data)) {
|
1056 |
return null;
|
1057 |
}
|
1058 |
-
if (!isset($data['url']) || is_null($data['url'])) {
|
1059 |
return null;
|
1060 |
}
|
1061 |
$url = $this->pz_TrimURL($data['url']);
|
@@ -1064,7 +1064,7 @@ class Pz_LinkCard {
|
|
1064 |
$data['url_key'] = hash( 'sha256', esc_url( $url ), true);
|
1065 |
}
|
1066 |
|
1067 |
-
if (!$data['regist_result']) { // 最初登録時情報
|
1068 |
$data['regist_title'] = $data['title'];
|
1069 |
$data['regist_excerpt'] = $data['excerpt'];
|
1070 |
$data['regist_charset'] = $data['charset'];
|
@@ -1526,7 +1526,7 @@ class Pz_LinkCard {
|
|
1526 |
$data['domain'] = $domain;
|
1527 |
$data['location'] = $location;
|
1528 |
$data['favicon'] = ( isset($favicon_url) ? $favicon_url : null );
|
1529 |
-
if (!$data['use_post_id1']) {
|
1530 |
$data['use_post_id1'] = get_the_ID();
|
1531 |
}
|
1532 |
$data['sns_twitter'] = (isset( $data['sns_twitter'] ) ? $data['sns_twitter'] : -1 );
|
3 |
Plugin Name: Pz-LinkCard
|
4 |
Plugin URI: http://poporon.poponet.jp/pz-linkcard
|
5 |
Description: リンクをカード形式で表示します。
|
6 |
+
Version: 2.2.0
|
7 |
Author: poporon
|
8 |
Author URI: http://poporon.poponet.jp
|
9 |
License: GPLv2 or later
|
1055 |
if (!isset($data) || !is_array($data)) {
|
1056 |
return null;
|
1057 |
}
|
1058 |
+
if (!isset($data['url']) || is_null($data['url']) || $data['result_code'] < 100) {
|
1059 |
return null;
|
1060 |
}
|
1061 |
$url = $this->pz_TrimURL($data['url']);
|
1064 |
$data['url_key'] = hash( 'sha256', esc_url( $url ), true);
|
1065 |
}
|
1066 |
|
1067 |
+
if (!isset($data['regist_result']) || !$data['regist_result']) { // 最初登録時情報
|
1068 |
$data['regist_title'] = $data['title'];
|
1069 |
$data['regist_excerpt'] = $data['excerpt'];
|
1070 |
$data['regist_charset'] = $data['charset'];
|
1526 |
$data['domain'] = $domain;
|
1527 |
$data['location'] = $location;
|
1528 |
$data['favicon'] = ( isset($favicon_url) ? $favicon_url : null );
|
1529 |
+
if (!isset($data['use_post_id1']) || !$data['use_post_id1']) {
|
1530 |
$data['use_post_id1'] = get_the_ID();
|
1531 |
}
|
1532 |
$data['sns_twitter'] = (isset( $data['sns_twitter'] ) ? $data['sns_twitter'] : -1 );
|
readme.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
Contributors: poporon
|
3 |
Tags: post, internal link, external link, blogcard, linkcard
|
4 |
Requires at least: 4.3
|
5 |
-
Tested up to:
|
6 |
Stable tag: trunk
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -163,6 +163,14 @@ A7.
|
|
163 |
5. "Write shortcode and url"
|
164 |
|
165 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
Ver2.1.9.1
|
167 |
* カード管理画面で警告エラーが発生していたのを修正しました。
|
168 |
Fixed: Fixed a bug.
|
2 |
Contributors: poporon
|
3 |
Tags: post, internal link, external link, blogcard, linkcard
|
4 |
Requires at least: 4.3
|
5 |
+
Tested up to: 5.0
|
6 |
Stable tag: trunk
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
163 |
5. "Write shortcode and url"
|
164 |
|
165 |
== Changelog ==
|
166 |
+
Ver2.2.0
|
167 |
+
* WordPress 5.0 での動作確認。
|
168 |
+
Compatible with WordPress 5.0.
|
169 |
+
* 存在しないURLを指定したときに警告エラーが発生していたのを修正しました。
|
170 |
+
Fixed: Fixed a bug.
|
171 |
+
* カード管理画面で警告エラーが発生していたのを修正しました。
|
172 |
+
Fixed: Fixed a bug.
|
173 |
+
|
174 |
Ver2.1.9.1
|
175 |
* カード管理画面で警告エラーが発生していたのを修正しました。
|
176 |
Fixed: Fixed a bug.
|