Pz-LinkCard - Version 2.0.8

Version Description

Download this release

Release Info

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

Code changes from version 2.0.7.2 to 2.0.8

img/link.png ADDED
Binary file
img/pin.png ADDED
Binary file
js/color-picker.js ADDED
@@ -0,0 +1 @@
 
1
+ (function($) { $('.color-picker').wpColorPicker(); })( jQuery );
js/mce-pz-lkc.js CHANGED
@@ -1,13 +1,21 @@
1
  (function() {
2
  tinymce.create('tinymce.plugins.pzlinkcard', {
3
  init: function(ed, url){
 
 
 
 
 
 
 
 
4
  ed.addButton('pz_linkcard',{
5
- title: 'リンクカード作成',
6
  image: url + '/button.png',
7
  cmd: 'insert_pz_linkcard'
8
  });
9
  ed.addCommand('insert_pz_linkcard', function() {
10
- var insert_tag = window.prompt('リンクカードを作成するURLを入力してください', 'http://');
11
  if (insert_tag !== null) {
12
  ed.execCommand('mceInsertContent', 0, '[blogcard url="' + insert_tag + '"]');
13
  }
1
  (function() {
2
  tinymce.create('tinymce.plugins.pzlinkcard', {
3
  init: function(ed, url){
4
+ var language = (window.navigator.userLanguage || window.navigator.language || window.navigator.browserLanguage).substr(0,2) == "ja" ? "ja" : "en";
5
+ if (language == "ja") {
6
+ var msg1 = 'リンクカード作成';
7
+ var msg2 = 'リンクカードを作成するURLを入力してください';
8
+ } else {
9
+ var msg1 = 'Make LinkCard';
10
+ var msg2 = 'Input URL';
11
+ }
12
  ed.addButton('pz_linkcard',{
13
+ title: msg1,
14
  image: url + '/button.png',
15
  cmd: 'insert_pz_linkcard'
16
  });
17
  ed.addCommand('insert_pz_linkcard', function() {
18
+ var insert_tag = window.prompt(msg2, 'http://');
19
  if (insert_tag !== null) {
20
  ed.execCommand('mceInsertContent', 0, '[blogcard url="' + insert_tag + '"]');
21
  }
lib/pz-linkcard-cacheman.php CHANGED
@@ -38,7 +38,7 @@ $cache_id = isset($_REQUEST['cache_id'] ) ? $_REQUEST['cache_id'] : null;
38
  $confirm = isset($_REQUEST['confirm'] ) ? $_REQUEST['confirm'] : null;
39
  $result_code = isset($_REQUEST['result_code'] ) ? $_REQUEST['result_code'] : null;
40
  $alive_result = isset($_REQUEST['alive_result'] ) ? $_REQUEST['alive_result'] : null;
41
- $paged = (isset($_REQUEST['paged'] ) ? $_REQUEST['paged'] : 1) - 0;
42
 
43
  $mydomain = null;
44
  if (preg_match('{https?://(.*)/}i', home_url().'/',$m)) {
38
  $confirm = isset($_REQUEST['confirm'] ) ? $_REQUEST['confirm'] : null;
39
  $result_code = isset($_REQUEST['result_code'] ) ? $_REQUEST['result_code'] : null;
40
  $alive_result = isset($_REQUEST['alive_result'] ) ? $_REQUEST['alive_result'] : null;
41
+ $paged = intval(isset($_REQUEST['paged'] ) ? $_REQUEST['paged'] : 1) - 0;
42
 
43
  $mydomain = null;
44
  if (preg_match('{https?://(.*)/}i', home_url().'/',$m)) {
lib/pz-linkcard-settings.php CHANGED
@@ -167,19 +167,19 @@
167
  <table class="form-table">
168
  <tr valign="top">
169
  <th scope="row"><?php _e('ShortCode 1', $this->text_domain); ?></th>
170
- <td>[<input name="properties[code1]" type="text" id="inputtext" value="<?php echo esc_attr($this->options['code1']); ?>" class="regular-text" style="width: 8em;" /> url="http://xxx" <span style="color: #aabbff; font-weight: bold;">title=</span><span style="color: #aabbff;">"xxxxxx"</span> <span style="color: #bbaaff; font-weight: bold;">content=</span><span style="color: #bbaaff;">"xxxxxx"</span>]
171
  <p><?php _e('Case-sensitive', $this->text_domain); ?></p></td>
172
  </tr>
173
  <tr valign="top">
174
  <th scope="row"><?php _e('Use inlinetext', $this->text_domain); ?></th>
175
  <td>
176
- [<span style="color: #888888;"><?php echo esc_attr($this->options['code1']); ?></span> url="http://xxx"]
177
  <select name="properties[use-inline]">
178
  <option value="" <?php if($this->options['use-inline'] == '') echo 'selected="selected"'; ?>><?php _e('No use', $this->text_domain); ?></option>
179
  <option value="1" <?php if($this->options['use-inline'] == '1') echo 'selected="selected"'; ?>><?php _e('Use to excerpt', $this->text_domain); ?></option>
180
  <option value="2" <?php if($this->options['use-inline'] == '2') echo 'selected="selected"'; ?>><?php _e('Use to title', $this->text_domain); ?></option>
181
  </select>
182
- [/<span style="color: #888888;"><?php echo esc_attr($this->options['code1']); ?></span>]
183
  <p><?php _e('This setting applies only to the Shortcode1', $this->text_domain); ?></p></td>
184
  </td>
185
  </tr>
@@ -201,7 +201,7 @@
201
  <tr valign="top">
202
  <th scope="row"><?php _e('Parameters', $this->text_domain); ?></th>
203
  <td>
204
- [<span style="color: #888888;"><?php echo esc_attr($this->options['code1']); ?></span> url="http://xxx" <span style="color: #4488ff; font-weight: bold;">title=</span>"xxxxxx" <span style="color: #8844ff; font-weight: bold;">content=</span>"xxxxxx"]<br>
205
  <?php _e('For any shortcode you can change the title and excerpt with `title` parameter and `content` parameter', $this->text_domain); ?>
206
  </ts>
207
  </tr>
167
  <table class="form-table">
168
  <tr valign="top">
169
  <th scope="row"><?php _e('ShortCode 1', $this->text_domain); ?></th>
170
+ <td>[<input name="properties[code1]" type="text" id="code1" value="<?php echo esc_attr($this->options['code1']); ?>" class="regular-text" style="width: 8em;" onKeyUp="document.getElementById('open1').innerText = document.getElementById('code1').value; document.getElementById('close1').innerText = document.getElementById('code1').value; document.getElementById('open2').innerText = document.getElementById('code1').value;" /> url="http://xxx" <span style="color: #aabbff; font-weight: bold;">title=</span><span style="color: #aabbff;">"xxxxxx"</span> <span style="color: #bbaaff; font-weight: bold;">content=</span><span style="color: #bbaaff;">"xxxxxx"</span>]
171
  <p><?php _e('Case-sensitive', $this->text_domain); ?></p></td>
172
  </tr>
173
  <tr valign="top">
174
  <th scope="row"><?php _e('Use inlinetext', $this->text_domain); ?></th>
175
  <td>
176
+ [<span style="color: #888888;" id="open1"><?php echo esc_attr($this->options['code1']); ?></span> url="http://xxx"]
177
  <select name="properties[use-inline]">
178
  <option value="" <?php if($this->options['use-inline'] == '') echo 'selected="selected"'; ?>><?php _e('No use', $this->text_domain); ?></option>
179
  <option value="1" <?php if($this->options['use-inline'] == '1') echo 'selected="selected"'; ?>><?php _e('Use to excerpt', $this->text_domain); ?></option>
180
  <option value="2" <?php if($this->options['use-inline'] == '2') echo 'selected="selected"'; ?>><?php _e('Use to title', $this->text_domain); ?></option>
181
  </select>
182
+ [/<span style="color: #888888;" id="close1"><?php echo esc_attr($this->options['code1']); ?></span>]
183
  <p><?php _e('This setting applies only to the Shortcode1', $this->text_domain); ?></p></td>
184
  </td>
185
  </tr>
201
  <tr valign="top">
202
  <th scope="row"><?php _e('Parameters', $this->text_domain); ?></th>
203
  <td>
204
+ [<span style="color: #888888;" id="open2"><?php echo esc_attr($this->options['code1']); ?></span> url="http://xxx" <span style="color: #4488ff; font-weight: bold;">title=</span>"xxxxxx" <span style="color: #8844ff; font-weight: bold;">content=</span>"xxxxxx"]<br>
205
  <?php _e('For any shortcode you can change the title and excerpt with `title` parameter and `content` parameter', $this->text_domain); ?>
206
  </ts>
207
  </tr>
lib/pz-linkcard-style.php CHANGED
@@ -109,7 +109,7 @@
109
  break;
110
  case 'pin': // Pushpin
111
  $file_text = str_replace('/*WRAP*/', 'position: relative;',$file_text );
112
- $file_text = str_replace('/*WRAP-AFTER*/', 'content: ""; display: block; position: absolute; background-image: url("'.$this->plugin_dir_url.'pin.png"); background-repeat: no-repeat; background-position: center; left: 0px; top: -40px; width: 100%; height: 100px; z-index: 2;', $file_text );
113
  break;
114
  case 'inN': // Neutral
115
  $file_text = str_replace('/*BORDER*/', 'border: 4px solid #59fbea;',$file_text );
109
  break;
110
  case 'pin': // Pushpin
111
  $file_text = str_replace('/*WRAP*/', 'position: relative;',$file_text );
112
+ $file_text = str_replace('/*WRAP-AFTER*/', 'content: ""; display: block; position: absolute; background-image: url("'.$this->plugin_dir_url.'img/pin.png"); background-repeat: no-repeat; background-position: center; left: 0px; top: -40px; width: 100%; height: 100px; z-index: 2;', $file_text );
113
  break;
114
  case 'inN': // Neutral
115
  $file_text = str_replace('/*BORDER*/', 'border: 4px solid #59fbea;',$file_text );
pz-linkcard.php CHANGED
@@ -1491,7 +1491,7 @@ class Pz_LinkCard {
1491
  // 管理画面時のスタイルシート、スクリプト設定
1492
  public function enqueue_admin($hook) {
1493
  wp_enqueue_style ('wp-color-picker');
1494
- wp_enqueue_script ('colorpicker-script', plugins_url('color-picker.js', __FILE__), array('wp-color-picker'), false, true);
1495
  // wp_enqueue_media();
1496
  // wp_enqueue_script ('media-uploader', plugins_url("media-uploader.js", __FILE__), array('jquery'), false, false);
1497
  }
1491
  // 管理画面時のスタイルシート、スクリプト設定
1492
  public function enqueue_admin($hook) {
1493
  wp_enqueue_style ('wp-color-picker');
1494
+ wp_enqueue_script ('colorpicker-script', plugins_url('js/color-picker.js', __FILE__), array('wp-color-picker'), false, true);
1495
  // wp_enqueue_media();
1496
  // wp_enqueue_script ('media-uploader', plugins_url("media-uploader.js", __FILE__), array('jquery'), false, false);
1497
  }
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: 4.9.2
6
  Stable tag: trunk
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -155,6 +155,14 @@ A5.
155
  5. "Write shortcode and url"
156
 
157
  == Changelog ==
 
 
 
 
 
 
 
 
158
  Ver2.0.7.2
159
  * WordPress 4.9.2 での動作確認。
160
  Compatible with WordPress 4.9.2
2
  Contributors: poporon
3
  Tags: post, internal link, external link, blogcard, linkcard
4
  Requires at least: 4.3
5
+ Tested up to: 4.9.4
6
  Stable tag: trunk
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
155
  5. "Write shortcode and url"
156
 
157
  == Changelog ==
158
+ Ver2.0.8
159
+ * WordPress 4.9.4 での動作確認。
160
+ Compatible with WordPress 4.9.4
161
+ * 設定画面のショートコードの表示を修正しました。
162
+ Fixed: Fixed so that the short code is displayed immediately on the setting screen.
163
+ * 管理画面でワーニングが出ていたのを修正しました。
164
+ Fixed: Fixed a bug.
165
+
166
  Ver2.0.7.2
167
  * WordPress 4.9.2 での動作確認。
168
  Compatible with WordPress 4.9.2