Pz-LinkCard - Version 1.7.5

Version Description

  • Cleaning up garbage from the database at activation.
  • Modefied: Cleaned up the settings screen
  • Modefied: Add tips at settings screen
  • Modefied: Added setting. Height in letter.
  • Modefied: Added setting. Trailing slash.
  • Fixed: facebook API.
  • Fixed: bugfix.

  • Pz

  • Pz

  • Pz

  • URL

  • A

  • *

Download this release

Release Info

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

Code changes from version 1.7.4 to 1.7.5

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: 2016-07-30 11:21+0900\n"
8
- "PO-Revision-Date: 2016-07-30 11:22+0900\n"
9
  "Last-Translator: \n"
10
  "Language-Team: poporon\n"
11
  "Language: ja_JP\n"
@@ -19,765 +19,785 @@ msgstr ""
19
  "Plural-Forms: nplurals=1; plural=0;\n"
20
  "X-Poedit-SearchPath-0: ..\n"
21
 
22
- #: ../pz-linkcard-cacheman.php:6 ../pz-linkcard.php:1024
 
 
 
 
23
  msgid "LinkCard cache manager"
24
  msgstr "リンクカード/DBキャッシュ管理"
25
 
26
- #: ../pz-linkcard-cacheman.php:64
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  msgid "Updated cache"
28
  msgstr "キャッシュを更新しました"
29
 
30
- #: ../pz-linkcard-cacheman.php:66 ../pz-linkcard-cacheman.php:69
31
  msgid "Update failed"
32
  msgstr "キャッシュの更新に失敗しました"
33
 
34
- #: ../pz-linkcard-cacheman.php:74
35
  msgid "Social count renew"
36
  msgstr "ソーシャルカウントの再取得"
37
 
38
- #: ../pz-linkcard-cacheman.php:84 ../pz-linkcard-cacheman.php:97
 
39
  msgid "completed"
40
  msgstr "完了しました"
41
 
42
- #: ../pz-linkcard-cacheman.php:89
 
 
 
 
43
  msgid "Cache renew"
44
  msgstr "記事内容の再取得"
45
 
46
- #: ../pz-linkcard-cacheman.php:105
47
  msgid "Cache deleted"
48
  msgstr "キャッシュから削除しました"
49
 
50
- #: ../pz-linkcard-cacheman.php:211
51
  msgid "All"
52
  msgstr "すべて"
53
 
54
- #: ../pz-linkcard-cacheman.php:212
55
  msgid "Internal"
56
  msgstr "内部リンク"
57
 
58
- #: ../pz-linkcard-cacheman.php:213
59
  msgid "External"
60
  msgstr "外部リンク"
61
 
62
- #: ../pz-linkcard-cacheman.php:223
 
 
 
 
63
  msgid "Select batch"
64
  msgstr "一括処理を選択"
65
 
66
- #: ../pz-linkcard-cacheman.php:225 ../pz-linkcard-cacheman.php:295
67
  msgid "Select"
68
  msgstr "選択してください"
69
 
70
- #: ../pz-linkcard-cacheman.php:226
71
  msgid "Renew cache"
72
  msgstr "記事内容を再取得する"
73
 
74
- #: ../pz-linkcard-cacheman.php:227
75
  msgid "Renew SNS count"
76
  msgstr "ソーシャルカウントを再取得する"
77
 
78
- #: ../pz-linkcard-cacheman.php:228
 
 
 
 
79
  msgid "Delete from cache"
80
  msgstr "キャッシュから削除する"
81
 
82
- #: ../pz-linkcard-cacheman.php:230
83
  msgid "Submit"
84
  msgstr "適用"
85
 
86
- #: ../pz-linkcard-cacheman.php:234
87
  msgid "Select domain"
88
  msgstr "ドメインを選択"
89
 
90
- #: ../pz-linkcard-cacheman.php:236
91
  msgid "All domain"
92
  msgstr "すべてのドメイン"
93
 
94
- #: ../pz-linkcard-cacheman.php:249
95
  msgid "Refine search"
96
  msgstr "絞り込み検索"
97
 
98
- #: ../pz-linkcard-cacheman.php:254
99
  msgid "items"
100
  msgstr "項目"
101
 
102
- #: ../pz-linkcard-cacheman.php:271
103
  msgid "Select all"
104
  msgstr "すべて選択"
105
 
106
- #: ../pz-linkcard-cacheman.php:272 ../pz-linkcard-edit.php:13
107
  msgid "ID"
108
  msgstr ""
109
 
110
- #: ../pz-linkcard-cacheman.php:273 ../pz-linkcard-edit.php:17
111
  msgid "URL key"
112
  msgstr "URLキー"
113
 
114
- #: ../pz-linkcard-cacheman.php:274 ../pz-linkcard-edit.php:21
115
- #: ../pz-linkcard-settings.php:462
116
  msgid "URL"
117
  msgstr "URL"
118
 
119
- #: ../pz-linkcard-cacheman.php:275 ../pz-linkcard-edit.php:33
120
- #: ../pz-linkcard-settings.php:435
121
  msgid "Title"
122
  msgstr "タイトル"
123
 
124
- #: ../pz-linkcard-cacheman.php:276 ../pz-linkcard-edit.php:37
125
- #: ../pz-linkcard-settings.php:487
126
  msgid "Excerpt"
127
  msgstr "抜粋文"
128
 
129
- #: ../pz-linkcard-cacheman.php:277 ../pz-linkcard-edit.php:41
130
  msgid "Charset"
131
  msgstr "文字セット"
132
 
133
- #: ../pz-linkcard-cacheman.php:278 ../pz-linkcard-edit.php:29
134
  msgid "Domain"
135
  msgstr "ドメイン"
136
 
137
- #: ../pz-linkcard-cacheman.php:279 ../pz-linkcard-edit.php:63
138
  msgid "Tw"
139
  msgstr ""
140
 
141
- #: ../pz-linkcard-cacheman.php:280 ../pz-linkcard-edit.php:64
142
  msgid "fb"
143
  msgstr ""
144
 
145
- #: ../pz-linkcard-cacheman.php:281 ../pz-linkcard-edit.php:65
146
  msgid "B!"
147
  msgstr ""
148
 
149
- #: ../pz-linkcard-cacheman.php:282 ../pz-linkcard-edit.php:77
150
  msgid "Regist"
151
  msgstr "登録日時"
152
 
153
- #: ../pz-linkcard-cacheman.php:283 ../pz-linkcard-edit.php:57
154
  msgid "Post ID"
155
  msgstr "記事ID"
156
 
157
- #: ../pz-linkcard-cacheman.php:284 ../pz-linkcard-edit.php:53
158
  msgid "Result code"
159
  msgstr "結果コード"
160
 
161
- #: ../pz-linkcard-cacheman.php:314
 
 
 
 
162
  msgid "edit"
163
  msgstr "編集"
164
 
165
- #: ../pz-linkcard-cacheman.php:315 ../pz-linkcard-cacheman.php:316
166
  msgid "Are you sure?"
167
  msgstr "実行します。"
168
 
169
- #: ../pz-linkcard-cacheman.php:315
170
  msgid "renew"
171
  msgstr "再取得"
172
 
173
- #: ../pz-linkcard-cacheman.php:316
174
  msgid "delete"
175
  msgstr "削除"
176
 
177
- #: ../pz-linkcard-edit.php:25
 
 
 
 
178
  msgid "Site name"
179
  msgstr "サイト名称"
180
 
181
- #: ../pz-linkcard-edit.php:42
182
  msgid "->"
183
  msgstr "→"
184
 
185
- #: ../pz-linkcard-edit.php:45
186
  msgid "Thumbnail URL"
187
  msgstr "サムネイルURL"
188
 
189
- #: ../pz-linkcard-edit.php:49
190
  msgid "Favicon URL"
191
  msgstr "ファビコンURL"
192
 
193
- #: ../pz-linkcard-edit.php:61
194
  msgid "SNS"
195
  msgstr ""
196
 
197
- #: ../pz-linkcard-edit.php:69
198
  msgid "Uptime"
199
  msgstr "更新日時"
200
 
201
- #: ../pz-linkcard-edit.php:73
202
  msgid "Next update"
203
  msgstr "次回更新日時"
204
 
205
- #: ../pz-linkcard-edit.php:82
206
  msgid "Update"
207
  msgstr "更新"
208
 
209
- #: ../pz-linkcard-edit.php:82
210
  msgid "Cancel"
211
  msgstr "キャンセル"
212
 
213
- #: ../pz-linkcard-settings.php:4 ../pz-linkcard.php:1025
214
- msgid "LinkCard Settings"
215
- msgstr "リンクカード設定"
216
-
217
- #: ../pz-linkcard-settings.php:30
218
  msgid "Short code is not set."
219
  msgstr "ショートコードが指定されていません。"
220
 
221
- #: ../pz-linkcard-settings.php:69
222
  msgid "Changes saved."
223
  msgstr "設定を保存しました。"
224
 
225
- #: ../pz-linkcard-settings.php:71
226
  msgid "Not changed."
227
  msgstr "設定は変更されませんでした。"
228
 
229
- #: ../pz-linkcard-settings.php:83
230
- msgid "Basic"
231
- msgstr "基本設定"
232
-
233
- #: ../pz-linkcard-settings.php:86
234
- msgid "ShortCode1"
235
- msgstr "ショートコード 1"
236
-
237
- #: ../pz-linkcard-settings.php:88 ../pz-linkcard-settings.php:106
238
- #: ../pz-linkcard-settings.php:111 ../pz-linkcard-settings.php:116
239
- msgid "Case-sensitive"
240
- msgstr "大文字と小文字を区別します"
241
-
242
- #: ../pz-linkcard-settings.php:91
243
- msgid "Use inlinetext"
244
- msgstr "ショートコードで囲んだ文字列"
245
-
246
- #: ../pz-linkcard-settings.php:95
247
- msgid "No use"
248
- msgstr "使用しない"
249
-
250
- #: ../pz-linkcard-settings.php:96
251
- msgid "Use to excerpt"
252
- msgstr "抜粋文として使用"
253
-
254
- #: ../pz-linkcard-settings.php:97
255
- msgid "Use to title"
256
- msgstr "タイトルとして使用"
257
-
258
- #: ../pz-linkcard-settings.php:100
259
- msgid "This setting applies only to the Shortcode1"
260
- msgstr "ショートコード1にのみ適用されます"
261
-
262
- #: ../pz-linkcard-settings.php:104
263
- msgid "ShortCode 2"
264
- msgstr "ショートコード 2"
265
-
266
- #: ../pz-linkcard-settings.php:109
267
- msgid "ShortCode 3"
268
- msgstr "ショートコード 3"
269
-
270
- #: ../pz-linkcard-settings.php:114
271
- msgid "ShortCode 4"
272
- msgstr "ショートコード 4"
273
-
274
- #: ../pz-linkcard-settings.php:120
275
- msgid "Special Format"
276
  msgstr "定型書式"
277
 
278
- #: ../pz-linkcard-settings.php:123 ../pz-linkcard-settings.php:295
279
- #: ../pz-linkcard-settings.php:330 ../pz-linkcard-settings.php:351
280
- #: ../pz-linkcard-settings.php:390 ../pz-linkcard-settings.php:555
281
- #: ../pz-linkcard-settings.php:566 ../pz-linkcard-settings.php:580
282
- #: ../pz-linkcard-settings.php:603 ../pz-linkcard-settings.php:614
283
- #: ../pz-linkcard-settings.php:628
 
 
 
 
284
  msgid "None"
285
  msgstr "なし"
286
 
287
- #: ../pz-linkcard-settings.php:124
288
  msgid "Pz-LkC Default"
289
  msgstr "Pz リンクカード 標準書式"
290
 
291
- #: ../pz-linkcard-settings.php:125
292
  msgid "Cellophane tape \"center\""
293
  msgstr "セロハンテープ(中央)"
294
 
295
- #: ../pz-linkcard-settings.php:126
296
  msgid "Cellophane tape \"Top corner\""
297
  msgstr "セロハンテープ(左上と右上)"
298
 
299
- #: ../pz-linkcard-settings.php:127
300
  msgid "Cellophane tape \"long\""
301
  msgstr "セロハンテープ(長め)"
302
 
303
- #: ../pz-linkcard-settings.php:128
304
  msgid "Slanting"
305
  msgstr "斜め"
306
 
307
- #: ../pz-linkcard-settings.php:129
308
  msgid "3D Rotate"
309
  msgstr "3D回転"
310
 
311
- #: ../pz-linkcard-settings.php:130
312
  msgid "Curling paper"
313
  msgstr "紙がめくれた効果(テーマとの相性があります)"
314
 
315
- #: ../pz-linkcard-settings.php:131
316
  msgid "Taping and curling"
317
  msgstr "テープと紙めくれ(テーマとの相性があります)"
318
 
319
- #: ../pz-linkcard-settings.php:132
320
  msgid "Neutral"
321
  msgstr "ブルーグリーン(黒背景推奨)"
322
 
323
- #: ../pz-linkcard-settings.php:133
324
  msgid "Orange"
325
  msgstr "オレンジ(黒背景推奨)"
326
 
327
- #: ../pz-linkcard-settings.php:134
328
  msgid "Green"
329
  msgstr "グリーン(黒背景推奨)"
330
 
331
- #: ../pz-linkcard-settings.php:135
332
  msgid "Blue"
333
  msgstr "ブルー(黒背景推奨)"
334
 
335
- #: ../pz-linkcard-settings.php:137
336
- msgid "Will some of the parameters are forcibly changed"
337
- msgstr "選択した定型書式によって、一部の設定が無効になります。"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
338
 
339
- #: ../pz-linkcard-settings.php:143
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
340
  msgid "Style"
341
  msgstr "表示設定"
342
 
343
- #: ../pz-linkcard-settings.php:146
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
344
  msgid "Position"
345
  msgstr "配置設定"
346
 
347
- #: ../pz-linkcard-settings.php:153 ../pz-linkcard-settings.php:184
348
  msgid "Margin top"
349
  msgstr "上の余白"
350
 
351
- #: ../pz-linkcard-settings.php:155 ../pz-linkcard-settings.php:170
352
- #: ../pz-linkcard-settings.php:186 ../pz-linkcard-settings.php:200
353
- #: ../pz-linkcard-settings.php:212 ../pz-linkcard-settings.php:232
354
- #: ../pz-linkcard-settings.php:248 ../pz-linkcard-settings.php:265
355
  msgid "Not defined"
356
  msgstr "設定しない"
357
 
358
- #: ../pz-linkcard-settings.php:156 ../pz-linkcard-settings.php:171
359
- #: ../pz-linkcard-settings.php:192 ../pz-linkcard-settings.php:206
360
- #: ../pz-linkcard-settings.php:218 ../pz-linkcard-settings.php:238
361
- #: ../pz-linkcard-settings.php:249 ../pz-linkcard-settings.php:266
362
  msgid "0"
363
  msgstr ""
364
 
365
- #: ../pz-linkcard-settings.php:157 ../pz-linkcard-settings.php:172
366
- #: ../pz-linkcard-settings.php:187 ../pz-linkcard-settings.php:201
367
- #: ../pz-linkcard-settings.php:213 ../pz-linkcard-settings.php:233
368
- #: ../pz-linkcard-settings.php:250 ../pz-linkcard-settings.php:267
369
- #: ../pz-linkcard-settings.php:520 ../pz-linkcard-settings.php:521
370
  msgid "4px"
371
  msgstr ""
372
 
373
- #: ../pz-linkcard-settings.php:158 ../pz-linkcard-settings.php:173
374
- #: ../pz-linkcard-settings.php:188 ../pz-linkcard-settings.php:202
375
- #: ../pz-linkcard-settings.php:214 ../pz-linkcard-settings.php:234
376
- #: ../pz-linkcard-settings.php:251 ../pz-linkcard-settings.php:268
377
  msgid "8px"
378
  msgstr ""
379
 
380
- #: ../pz-linkcard-settings.php:159 ../pz-linkcard-settings.php:174
381
- #: ../pz-linkcard-settings.php:189 ../pz-linkcard-settings.php:203
382
- #: ../pz-linkcard-settings.php:215 ../pz-linkcard-settings.php:235
383
- #: ../pz-linkcard-settings.php:252 ../pz-linkcard-settings.php:269
384
- #: ../pz-linkcard-settings.php:442
385
  msgid "16px"
386
  msgstr ""
387
 
388
- #: ../pz-linkcard-settings.php:160 ../pz-linkcard-settings.php:175
389
- #: ../pz-linkcard-settings.php:190 ../pz-linkcard-settings.php:204
390
- #: ../pz-linkcard-settings.php:216 ../pz-linkcard-settings.php:236
391
- #: ../pz-linkcard-settings.php:253 ../pz-linkcard-settings.php:270
392
  msgid "32px"
393
  msgstr ""
394
 
395
- #: ../pz-linkcard-settings.php:161 ../pz-linkcard-settings.php:176
396
- #: ../pz-linkcard-settings.php:191 ../pz-linkcard-settings.php:205
397
- #: ../pz-linkcard-settings.php:217 ../pz-linkcard-settings.php:237
398
- #: ../pz-linkcard-settings.php:254 ../pz-linkcard-settings.php:271
399
  msgid "64px"
400
  msgstr ""
401
 
402
- #: ../pz-linkcard-settings.php:168 ../pz-linkcard-settings.php:198
403
  msgid "Margin left"
404
  msgstr "左の余白"
405
 
406
- #: ../pz-linkcard-settings.php:210 ../pz-linkcard-settings.php:246
407
  msgid "Margin right"
408
  msgstr "右の余白"
409
 
410
- #: ../pz-linkcard-settings.php:224
411
  msgid "Width"
412
  msgstr "カードの横幅"
413
 
414
- #: ../pz-linkcard-settings.php:225
 
 
415
  msgid "Height"
416
- msgstr "カードの高さ"
417
 
418
- #: ../pz-linkcard-settings.php:230 ../pz-linkcard-settings.php:263
419
  msgid "Margin bottom"
420
  msgstr "下の余白"
421
 
422
- #: ../pz-linkcard-settings.php:260
423
  msgid "Centering"
424
  msgstr "中央に寄せる"
425
 
426
- #: ../pz-linkcard-settings.php:282
427
- msgid "Link the whole"
428
- msgstr "カード全体をリンク"
429
-
430
- #: ../pz-linkcard-settings.php:286
431
- msgid "Enclose the entire card at anchor"
432
- msgstr ""
433
- "カード全体をAタグで囲って、どこをクリックしてもリンク先を開くようにします。"
434
-
435
- #: ../pz-linkcard-settings.php:292
436
  msgid "Border"
437
  msgstr "枠線の太さ"
438
 
439
- #: ../pz-linkcard-settings.php:296
440
  msgid "Gray thin"
441
  msgstr "薄い色/細い(1px)"
442
 
443
- #: ../pz-linkcard-settings.php:297
444
  msgid "Gray"
445
  msgstr "薄い色/普通(2px)"
446
 
447
- #: ../pz-linkcard-settings.php:298
448
  msgid "Gray thick"
449
  msgstr "薄い色/太い(4px)"
450
 
451
- #: ../pz-linkcard-settings.php:299
452
  msgid "Black thin"
453
  msgstr "黒/細い(1px)"
454
 
455
- #: ../pz-linkcard-settings.php:300
456
  msgid "Black"
457
  msgstr "黒/普通(2px)"
458
 
459
- #: ../pz-linkcard-settings.php:301
460
  msgid "Black thick"
461
  msgstr "黒/太い(4px)"
462
 
463
- #: ../pz-linkcard-settings.php:302
464
  msgid "Black frame"
465
  msgstr "黒/額縁(8px)"
466
 
467
- #: ../pz-linkcard-settings.php:303
468
  msgid "Dodgerblue"
469
  msgstr "ドジャー・ブルー(明るい青)"
470
 
471
- #: ../pz-linkcard-settings.php:304
472
  msgid "Mediumaquamarine"
473
  msgstr "ミディアム・アクアマリーン(明るい緑)"
474
 
475
- #: ../pz-linkcard-settings.php:305
476
  msgid "Hotpink"
477
  msgstr "ホット・ピンク(明るい赤)"
478
 
479
- #: ../pz-linkcard-settings.php:306
480
  msgid "Wheat"
481
  msgstr "小麦色(明るい茶色)"
482
 
483
- #: ../pz-linkcard-settings.php:307
484
  msgid "Double"
485
  msgstr "二重線"
486
 
487
- #: ../pz-linkcard-settings.php:308
488
  msgid "Dotted"
489
  msgstr "点線"
490
 
491
- #: ../pz-linkcard-settings.php:314
492
  msgid "Layout"
493
  msgstr "外観設定"
494
 
495
- #: ../pz-linkcard-settings.php:317
496
  msgid "Radius"
497
  msgstr "角を丸める"
498
 
499
- #: ../pz-linkcard-settings.php:328 ../pz-linkcard-settings.php:573
500
- #: ../pz-linkcard-settings.php:621 ../pz-linkcard-settings.php:667
501
  msgid "Site information"
502
  msgstr "サイト情報"
503
 
504
- #: ../pz-linkcard-settings.php:331
505
  msgid "Top"
506
  msgstr "上側"
507
 
508
- #: ../pz-linkcard-settings.php:332
509
  msgid "Bottom"
510
  msgstr "下側"
511
 
512
- #: ../pz-linkcard-settings.php:334
513
  msgid "Use SiteName"
514
  msgstr "サイト名称を使用"
515
 
516
- #: ../pz-linkcard-settings.php:339
517
  msgid "Separator line"
518
  msgstr "区切り線"
519
 
520
- #: ../pz-linkcard-settings.php:346
521
  msgid "Display URL"
522
  msgstr "リンク先のURLを表示する"
523
 
524
- #: ../pz-linkcard-settings.php:349 ../pz-linkcard-settings.php:552
525
- #: ../pz-linkcard-settings.php:600 ../pz-linkcard-settings.php:659
526
  msgid "Thumbnail"
527
  msgstr "サムネイル"
528
 
529
- #: ../pz-linkcard-settings.php:352
530
  msgid "Right"
531
  msgstr "右側"
532
 
533
- #: ../pz-linkcard-settings.php:353
534
  msgid "Left"
535
  msgstr "左側"
536
 
537
- #: ../pz-linkcard-settings.php:356 ../pz-linkcard-settings.php:383
538
  msgid "Shadow"
539
  msgstr "影を付ける"
540
 
541
- #: ../pz-linkcard-settings.php:358
542
- msgid "Resize"
543
- msgstr "幅に合わせて縮小"
544
-
545
- #: ../pz-linkcard-settings.php:363
546
  msgid "Hollow content area"
547
  msgstr "記事の情報に枠を付ける"
548
 
549
- #: ../pz-linkcard-settings.php:368
550
  msgid "Display excerpt"
551
  msgstr "抜粋文を表示する"
552
 
553
- #: ../pz-linkcard-settings.php:373
554
  msgid "Hollow"
555
  msgstr "内側に影を付ける"
556
 
557
- #: ../pz-linkcard-settings.php:387
 
 
 
 
 
 
 
 
 
558
  msgid "Display SNS Count"
559
  msgstr "シェア数を表示する"
560
 
561
- #: ../pz-linkcard-settings.php:391
562
  msgid "After Title"
563
  msgstr "タイトルの後ろ"
564
 
565
- #: ../pz-linkcard-settings.php:392
566
  msgid "After site-name"
567
  msgstr "サイト情報の後ろ"
568
 
569
- #: ../pz-linkcard-settings.php:394
570
  msgid "Twitter"
571
  msgstr "ツイッター"
572
 
573
- #: ../pz-linkcard-settings.php:395
574
  msgid "Facebook"
575
  msgstr "フェイスブック(シェア数)"
576
 
577
- #: ../pz-linkcard-settings.php:396
578
  msgid "Hatena"
579
  msgstr "はてなブックマーク"
580
 
581
- #: ../pz-linkcard-settings.php:397
582
  msgid ""
583
  "There is a possibility that the screen display is slow If you enable this "
584
  "setting."
585
  msgstr "有効にする取得APIによっては表示が遅くなる場合があります。"
586
 
587
- #: ../pz-linkcard-settings.php:403
588
  msgid "Letters"
589
  msgstr "文字設定"
590
 
591
- #: ../pz-linkcard-settings.php:406
592
  msgid "Site-info."
593
  msgstr "サイト情報"
594
 
595
- #: ../pz-linkcard-settings.php:408 ../pz-linkcard-settings.php:431
596
- #: ../pz-linkcard-settings.php:437 ../pz-linkcard-settings.php:458
597
- #: ../pz-linkcard-settings.php:464 ../pz-linkcard-settings.php:483
598
- #: ../pz-linkcard-settings.php:489 ../pz-linkcard-settings.php:510
599
- #: ../pz-linkcard-settings.php:516
600
  msgid "Color"
601
  msgstr "色"
602
 
603
- #: ../pz-linkcard-settings.php:411 ../pz-linkcard-settings.php:440
604
- #: ../pz-linkcard-settings.php:467 ../pz-linkcard-settings.php:492
605
- #: ../pz-linkcard-settings.php:519
606
  msgid "Size"
607
  msgstr "大きさ"
608
 
609
- #: ../pz-linkcard-settings.php:412 ../pz-linkcard-settings.php:468
610
- #: ../pz-linkcard-settings.php:493 ../pz-linkcard-settings.php:522
611
- msgid "9px"
612
- msgstr ""
613
-
614
- #: ../pz-linkcard-settings.php:413 ../pz-linkcard-settings.php:494
615
- msgid "11px"
616
- msgstr ""
617
-
618
- #: ../pz-linkcard-settings.php:414 ../pz-linkcard-settings.php:469
619
- #: ../pz-linkcard-settings.php:495
620
- msgid "12px"
621
- msgstr ""
622
-
623
- #: ../pz-linkcard-settings.php:415
624
- msgid "13px"
625
- msgstr ""
626
-
627
- #: ../pz-linkcard-settings.php:416 ../pz-linkcard-settings.php:441
628
- #: ../pz-linkcard-settings.php:470 ../pz-linkcard-settings.php:496
629
- msgid "14px"
630
- msgstr ""
631
-
632
- #: ../pz-linkcard-settings.php:417 ../pz-linkcard-settings.php:523
633
- msgid "60%"
634
- msgstr ""
635
-
636
- #: ../pz-linkcard-settings.php:418 ../pz-linkcard-settings.php:471
637
- #: ../pz-linkcard-settings.php:497
638
- msgid "70%"
639
- msgstr ""
640
-
641
- #: ../pz-linkcard-settings.php:419 ../pz-linkcard-settings.php:472
642
- #: ../pz-linkcard-settings.php:498
643
- msgid "80%"
644
- msgstr ""
645
-
646
- #: ../pz-linkcard-settings.php:420 ../pz-linkcard-settings.php:473
647
- #: ../pz-linkcard-settings.php:499
648
- msgid "90%"
649
- msgstr ""
650
-
651
- #: ../pz-linkcard-settings.php:421 ../pz-linkcard-settings.php:446
652
- #: ../pz-linkcard-settings.php:474 ../pz-linkcard-settings.php:500
653
- msgid "100%"
654
- msgstr ""
655
-
656
- #: ../pz-linkcard-settings.php:425 ../pz-linkcard-settings.php:452
657
- #: ../pz-linkcard-settings.php:504
658
  msgid "Length"
659
  msgstr "桁数"
660
 
661
- #: ../pz-linkcard-settings.php:428 ../pz-linkcard-settings.php:455
662
- #: ../pz-linkcard-settings.php:480 ../pz-linkcard-settings.php:507
663
  msgid "Outline"
664
  msgstr "縁取り"
665
 
666
- #: ../pz-linkcard-settings.php:443
667
- msgid "18px"
668
- msgstr ""
669
-
670
- #: ../pz-linkcard-settings.php:444
671
- msgid "20px"
672
- msgstr ""
673
-
674
- #: ../pz-linkcard-settings.php:445
675
- msgid "24px"
676
- msgstr ""
677
-
678
- #: ../pz-linkcard-settings.php:447
679
- msgid "120%"
680
- msgstr ""
681
-
682
- #: ../pz-linkcard-settings.php:448
683
- msgid "140%"
684
- msgstr ""
685
-
686
- #: ../pz-linkcard-settings.php:514
687
- msgid "Plugin link"
688
- msgstr "プラグインのページ"
689
 
690
- #: ../pz-linkcard-settings.php:532
691
- msgid "Plugin-link"
692
- msgstr "プラグイン名"
693
 
694
- #: ../pz-linkcard-settings.php:540
695
  msgid "External link"
696
  msgstr "外部リンク"
697
 
698
- #: ../pz-linkcard-settings.php:544 ../pz-linkcard-settings.php:592
699
- #: ../pz-linkcard-settings.php:651
700
  msgid "Background Color"
701
  msgstr "背景色"
702
 
703
- #: ../pz-linkcard-settings.php:548
704
  msgid "Background image"
705
  msgstr "背景画像"
706
 
707
- #: ../pz-linkcard-settings.php:556 ../pz-linkcard-settings.php:567
708
- #: ../pz-linkcard-settings.php:604 ../pz-linkcard-settings.php:615
709
  msgid "Direct"
710
  msgstr "直接取得する"
711
 
712
- #: ../pz-linkcard-settings.php:557 ../pz-linkcard-settings.php:568
713
- #: ../pz-linkcard-settings.php:605 ../pz-linkcard-settings.php:616
714
  msgid "Use WebAPI"
715
  msgstr "WebAPIを利用する"
716
 
717
- #: ../pz-linkcard-settings.php:558 ../pz-linkcard-settings.php:606
 
718
  msgid "Use WebAPI ,If can not direct"
719
  msgstr "直接取得できない場合、WebAPIを利用する"
720
 
721
- #: ../pz-linkcard-settings.php:563 ../pz-linkcard-settings.php:611
722
- #: ../pz-linkcard-settings.php:663
723
  msgid "Favicon"
724
  msgstr "サイトアイコン"
725
 
726
- #: ../pz-linkcard-settings.php:577 ../pz-linkcard-settings.php:625
727
- #: ../pz-linkcard-settings.php:671
728
  msgid "Open new window/tab"
729
  msgstr "新しいウィンドウで開く"
730
 
731
- #: ../pz-linkcard-settings.php:581 ../pz-linkcard-settings.php:629
732
  msgid "All client"
733
  msgstr "すべての端末"
734
 
735
- #: ../pz-linkcard-settings.php:582 ../pz-linkcard-settings.php:630
736
  msgid "Other than mobile"
737
  msgstr "モバイル端末以外"
738
 
739
- #: ../pz-linkcard-settings.php:589
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
740
  msgid "Internal link"
741
  msgstr "内部リンク"
742
 
743
- #: ../pz-linkcard-settings.php:596 ../pz-linkcard-settings.php:655
744
  msgid "Background Image"
745
  msgstr "背景画像"
746
 
747
- #: ../pz-linkcard-settings.php:635
748
- msgid "Get contents"
749
- msgstr "記事取得方法"
750
-
751
- #: ../pz-linkcard-settings.php:639
752
  msgid "Always get the latest from the content"
753
  msgstr "常に最新の記事内容から抜粋文を作成する"
754
 
755
- #: ../pz-linkcard-settings.php:640
756
  msgid "Always get the latest from the excerpt"
757
  msgstr "抜粋文が設定されている投稿はそちらを優先する"
758
 
759
- #: ../pz-linkcard-settings.php:641
760
- msgid "Initially acquired only from the content"
761
- msgstr "カード管理画面に記録されている内容から表示する"
762
-
763
- #: ../pz-linkcard-settings.php:648
764
  msgid "Same-page link"
765
  msgstr "同ページへのリンク"
766
 
767
- #: ../pz-linkcard-settings.php:660 ../pz-linkcard-settings.php:664
768
- #: ../pz-linkcard-settings.php:672
769
  msgid "It is common with setting Internal-link"
770
  msgstr "内部リンク用の設定が使用されます"
771
 
772
- #: ../pz-linkcard-settings.php:677
773
  msgid "Web-API"
774
  msgstr "画像取得APIの指定"
775
 
776
- #: ../pz-linkcard-settings.php:680
777
  msgid "Favicon API"
778
  msgstr "ファビコンの取得API"
779
 
780
- #: ../pz-linkcard-settings.php:682
781
  msgid ""
782
  "%DOMAIN% replace to domain name (ex. poporon.poponet.jp )<br>%DOMAIN_URL% "
783
  "replace to domain URL (ex. http://poporon.poponet.jp )"
@@ -786,168 +806,178 @@ msgstr ""
786
  "%DOMAIN_URL% と記述するとドメインのURL(例.http://poporon.poponet.jp)に置き"
787
  "換わります。"
788
 
789
- #: ../pz-linkcard-settings.php:685
 
 
 
 
 
 
 
 
790
  msgid "Thumbnail API"
791
  msgstr "サムネイル画像の取得API"
792
 
793
- #: ../pz-linkcard-settings.php:687
794
  msgid "%URL% replace to URL"
795
  msgstr "%URL% と記述するとURLに置き換わります"
796
 
797
- #: ../pz-linkcard-settings.php:692
798
- msgid "Debug"
799
- msgstr "詳しい人用(Debug)"
800
 
801
- #: ../pz-linkcard-settings.php:695
802
- msgid "Trailing slash"
803
- msgstr "末尾のスラッシュ"
804
 
805
- #: ../pz-linkcard-settings.php:696
806
- msgid "In the case of domain names, to ignore the trailing-slash."
807
- msgstr "ドメイン名のみのときに最後のスラッシュを除外する"
 
 
808
 
809
- #: ../pz-linkcard-settings.php:699
810
- msgid "Use blockquote tag"
811
- msgstr "BLOCKQUOTEをタグを使用する"
812
 
813
- #: ../pz-linkcard-settings.php:700
814
- msgid "without using DIV tag, and use BLOCKQUOTE tag"
815
- msgstr "&lt;BLOCKQUOTE&gt;で囲んで引用扱いにします"
816
 
817
- #: ../pz-linkcard-settings.php:703
818
- msgid "Set nofollow"
819
- msgstr "nofollowを付与する"
820
 
821
- #: ../pz-linkcard-settings.php:704
822
- msgid "In the case of an external site, it puts the \"nofollow\""
823
- msgstr "外部リンクのリンクを nofollow にする"
824
 
825
- #: ../pz-linkcard-settings.php:708
826
- msgid "Reset img style"
827
- msgstr "CSSリセット(img)"
828
 
829
- #: ../pz-linkcard-settings.php:709
830
- msgid ""
831
- "When unnecessary frame is displayed on the image, you can improve it by case"
832
- msgstr "画像がずれて表示されるときに改善される可能性が有ります(推奨)"
 
 
 
 
 
 
 
 
 
 
 
833
 
834
- #: ../pz-linkcard-settings.php:713
835
  msgid "specified CSS"
836
  msgstr "指定したCSSを使用"
837
 
838
- #: ../pz-linkcard-settings.php:714
839
  msgid "Use specified CSS file"
840
  msgstr "指定したCSSファイルを使用する"
841
 
842
- #: ../pz-linkcard-settings.php:717 ../pz-linkcard-settings.php:721
843
  msgid "CSS file"
844
  msgstr "CSSファイル名"
845
 
846
- #: ../pz-linkcard-settings.php:718
847
  msgid "(ex. http://exsample.com/style.css )"
848
  msgstr "例.http://exsample.com/style.css"
849
 
850
- #: ../pz-linkcard-settings.php:725
851
  msgid "CSS URL"
852
  msgstr "CSSファイルのURL"
853
 
854
- #: ../pz-linkcard-settings.php:730
855
  msgid "Class ID to be added(for PC)"
856
  msgstr "PCのときに追加するクラス名"
857
 
858
- #: ../pz-linkcard-settings.php:734
859
  msgid "Class ID to be added(for Mobile)"
860
  msgstr "モバイルのときに追加するクラス名"
861
 
862
- #: ../pz-linkcard-settings.php:739
863
- msgid "Use HatenaBlogCard"
864
- msgstr "はてなブログカードを利用する"
865
-
866
- #: ../pz-linkcard-settings.php:740
867
- msgid "External links will use Always HatenaBlogCard."
868
- msgstr "外部リンクは「はてなブログカード」を利用する"
869
-
870
- #: ../pz-linkcard-settings.php:740 ../pz-linkcard-settings.php:745
871
- msgid "(Not recommended)"
872
- msgstr "(非推奨)"
873
-
874
- #: ../pz-linkcard-settings.php:744
875
- msgid "SSL verification disabled"
876
- msgstr "SSL検証を無効"
877
-
878
- #: ../pz-linkcard-settings.php:745
879
- msgid "Try setting if the contents of the SSL site can not be acquired."
880
- msgstr ""
881
- "SSLサイトのタイトルや記事内容が取得できない場合に設定することで取得できる可能"
882
- "性があります。"
883
-
884
- #: ../pz-linkcard-settings.php:749
885
- msgid "Broken link checker"
886
- msgstr "リンク切れチェック"
887
-
888
- #: ../pz-linkcard-settings.php:750
889
- msgid "Alive confirmation of the link destination."
890
- msgstr "リンク先がアクセスできるか定期的に確認します。"
891
-
892
- #: ../pz-linkcard-settings.php:754
893
  msgid "Display link to author page"
894
  msgstr "プラグイン名を表示する"
895
 
896
- #: ../pz-linkcard-settings.php:758
897
  msgid "Plugin URL"
898
  msgstr "プラグインページURL"
899
 
900
- #: ../pz-linkcard-settings.php:762
901
  msgid "Plugin name"
902
  msgstr "プラグイン名"
903
 
904
- #: ../pz-linkcard-settings.php:766
905
  msgid "Plugin version"
906
  msgstr "プラグインバージョン"
907
 
908
- #: ../pz-linkcard-settings.php:770
909
  msgid "Saved datetime"
910
  msgstr "保存した日時"
911
 
912
- #: ../pz-linkcard-settings.php:775
913
  msgid "Display elapsed time"
914
  msgstr "実行時間の表示"
915
 
916
- #: ../pz-linkcard-settings.php:776
917
  msgid "Output the elapsed time to HTML comment."
918
  msgstr "作成にかかった時間をコメントとしてHTMLへ出力する"
919
 
920
- #: ../pz-linkcard-settings.php:782
921
  msgid "Initialize"
922
  msgstr "初期化"
923
 
924
- #: ../pz-linkcard-settings.php:785
925
  msgid "Return to the initial setting"
926
  msgstr "設定を初期状態へ戻す"
927
 
928
- #: ../pz-linkcard-style.php:386
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
929
  msgid "Style sheet saved."
930
  msgstr "設定を元にスタイルシートを自動生成しました。"
931
 
932
- #: ../pz-linkcard-style.php:388
933
  msgid "Style sheet failed."
934
  msgstr "スタイルシートの自動生成に失敗しました。"
935
 
936
- #: ../pz-linkcard.php:1024
937
- msgid "Pz LkC Cache"
938
- msgstr "Pz カード管理"
939
 
940
- #: ../pz-linkcard.php:1025
941
- msgid "Pz LinkCard"
942
- msgstr "Pz カード設定"
943
 
944
- #: ../pz-linkcard.php:1153
945
- msgid "Settings"
946
- msgstr "設定"
947
 
948
- #: ../pz-linkcard.php:1153
949
- msgid "Manage"
950
- msgstr "管理"
 
 
951
 
952
  #~ msgid "Direct & Use WebAPI"
953
  #~ msgstr "直接取得できない場合、WebAPI利用"
@@ -1034,9 +1064,6 @@ msgstr "管理"
1034
  #~ msgid "seconds"
1035
  #~ msgstr "秒"
1036
 
1037
- #~ msgid "sec"
1038
- #~ msgstr "秒"
1039
-
1040
  #~ msgid "Display elapsed time required to create"
1041
  #~ msgstr "作成にかかった時間を表示する"
1042
 
4
  msgstr ""
5
  "Project-Id-Version: Pz-LinkCard\n"
6
  "Report-Msgid-Bugs-To: http://wppolyglots.wordpress.com\n"
7
+ "POT-Creation-Date: 2017-01-15 18:21+0900\n"
8
+ "PO-Revision-Date: 2017-01-15 18:22+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:227
23
+ msgid "Incorrect URL specification."
24
+ msgstr "URLの指定が誤っています。"
25
+
26
+ #: ../pz-linkcard.php:1149 ../lib/pz-linkcard-cacheman.php:6
27
  msgid "LinkCard cache manager"
28
  msgstr "リンクカード/DBキャッシュ管理"
29
 
30
+ #: ../pz-linkcard.php:1149
31
+ msgid "Pz LkC Cache"
32
+ msgstr "Pz カード管理"
33
+
34
+ #: ../pz-linkcard.php:1150 ../lib/pz-linkcard-settings.php:4
35
+ msgid "LinkCard Settings"
36
+ msgstr "リンクカード設定"
37
+
38
+ #: ../pz-linkcard.php:1150
39
+ msgid "Pz LinkCard"
40
+ msgstr "Pz カード設定"
41
+
42
+ #: ../pz-linkcard.php:1235
43
+ msgid "Settings"
44
+ msgstr "設定"
45
+
46
+ #: ../pz-linkcard.php:1235
47
+ msgid "Manage"
48
+ msgstr "管理"
49
+
50
+ #: ../lib/pz-linkcard-cacheman.php:70
51
  msgid "Updated cache"
52
  msgstr "キャッシュを更新しました"
53
 
54
+ #: ../lib/pz-linkcard-cacheman.php:72 ../lib/pz-linkcard-cacheman.php:75
55
  msgid "Update failed"
56
  msgstr "キャッシュの更新に失敗しました"
57
 
58
+ #: ../lib/pz-linkcard-cacheman.php:80
59
  msgid "Social count renew"
60
  msgstr "ソーシャルカウントの再取得"
61
 
62
+ #: ../lib/pz-linkcard-cacheman.php:90 ../lib/pz-linkcard-cacheman.php:108
63
+ #: ../lib/pz-linkcard-cacheman.php:123
64
  msgid "completed"
65
  msgstr "完了しました"
66
 
67
+ #: ../lib/pz-linkcard-cacheman.php:96
68
+ msgid "Alive check"
69
+ msgstr "リンク先のチェック"
70
+
71
+ #: ../lib/pz-linkcard-cacheman.php:113
72
  msgid "Cache renew"
73
  msgstr "記事内容の再取得"
74
 
75
+ #: ../lib/pz-linkcard-cacheman.php:131
76
  msgid "Cache deleted"
77
  msgstr "キャッシュから削除しました"
78
 
79
+ #: ../lib/pz-linkcard-cacheman.php:243
80
  msgid "All"
81
  msgstr "すべて"
82
 
83
+ #: ../lib/pz-linkcard-cacheman.php:244
84
  msgid "Internal"
85
  msgstr "内部リンク"
86
 
87
+ #: ../lib/pz-linkcard-cacheman.php:245
88
  msgid "External"
89
  msgstr "外部リンク"
90
 
91
+ #: ../lib/pz-linkcard-cacheman.php:246
92
+ msgid "Modify"
93
+ msgstr "更新あり"
94
+
95
+ #: ../lib/pz-linkcard-cacheman.php:256
96
  msgid "Select batch"
97
  msgstr "一括処理を選択"
98
 
99
+ #: ../lib/pz-linkcard-cacheman.php:258 ../lib/pz-linkcard-cacheman.php:329
100
  msgid "Select"
101
  msgstr "選択してください"
102
 
103
+ #: ../lib/pz-linkcard-cacheman.php:259
104
  msgid "Renew cache"
105
  msgstr "記事内容を再取得する"
106
 
107
+ #: ../lib/pz-linkcard-cacheman.php:260
108
  msgid "Renew SNS count"
109
  msgstr "ソーシャルカウントを再取得する"
110
 
111
+ #: ../lib/pz-linkcard-cacheman.php:261
112
+ msgid "Check status"
113
+ msgstr "リンクが有効かチェックする"
114
+
115
+ #: ../lib/pz-linkcard-cacheman.php:262
116
  msgid "Delete from cache"
117
  msgstr "キャッシュから削除する"
118
 
119
+ #: ../lib/pz-linkcard-cacheman.php:264
120
  msgid "Submit"
121
  msgstr "適用"
122
 
123
+ #: ../lib/pz-linkcard-cacheman.php:268
124
  msgid "Select domain"
125
  msgstr "ドメインを選択"
126
 
127
+ #: ../lib/pz-linkcard-cacheman.php:270
128
  msgid "All domain"
129
  msgstr "すべてのドメイン"
130
 
131
+ #: ../lib/pz-linkcard-cacheman.php:283
132
  msgid "Refine search"
133
  msgstr "絞り込み検索"
134
 
135
+ #: ../lib/pz-linkcard-cacheman.php:288
136
  msgid "items"
137
  msgstr "項目"
138
 
139
+ #: ../lib/pz-linkcard-cacheman.php:305
140
  msgid "Select all"
141
  msgstr "すべて選択"
142
 
143
+ #: ../lib/pz-linkcard-cacheman.php:306 ../lib/pz-linkcard-edit.php:13
144
  msgid "ID"
145
  msgstr ""
146
 
147
+ #: ../lib/pz-linkcard-cacheman.php:307 ../lib/pz-linkcard-edit.php:17
148
  msgid "URL key"
149
  msgstr "URLキー"
150
 
151
+ #: ../lib/pz-linkcard-cacheman.php:308 ../lib/pz-linkcard-edit.php:21
152
+ #: ../lib/pz-linkcard-settings.php:518
153
  msgid "URL"
154
  msgstr "URL"
155
 
156
+ #: ../lib/pz-linkcard-cacheman.php:309 ../lib/pz-linkcard-edit.php:37
157
+ #: ../lib/pz-linkcard-settings.php:500
158
  msgid "Title"
159
  msgstr "タイトル"
160
 
161
+ #: ../lib/pz-linkcard-cacheman.php:310 ../lib/pz-linkcard-edit.php:41
162
+ #: ../lib/pz-linkcard-settings.php:535
163
  msgid "Excerpt"
164
  msgstr "抜粋文"
165
 
166
+ #: ../lib/pz-linkcard-cacheman.php:311 ../lib/pz-linkcard-edit.php:45
167
  msgid "Charset"
168
  msgstr "文字セット"
169
 
170
+ #: ../lib/pz-linkcard-cacheman.php:312 ../lib/pz-linkcard-edit.php:33
171
  msgid "Domain"
172
  msgstr "ドメイン"
173
 
174
+ #: ../lib/pz-linkcard-cacheman.php:313 ../lib/pz-linkcard-edit.php:67
175
  msgid "Tw"
176
  msgstr ""
177
 
178
+ #: ../lib/pz-linkcard-cacheman.php:314 ../lib/pz-linkcard-edit.php:68
179
  msgid "fb"
180
  msgstr ""
181
 
182
+ #: ../lib/pz-linkcard-cacheman.php:315 ../lib/pz-linkcard-edit.php:69
183
  msgid "B!"
184
  msgstr ""
185
 
186
+ #: ../lib/pz-linkcard-cacheman.php:316 ../lib/pz-linkcard-edit.php:81
187
  msgid "Regist"
188
  msgstr "登録日時"
189
 
190
+ #: ../lib/pz-linkcard-cacheman.php:317 ../lib/pz-linkcard-edit.php:61
191
  msgid "Post ID"
192
  msgstr "記事ID"
193
 
194
+ #: ../lib/pz-linkcard-cacheman.php:318 ../lib/pz-linkcard-edit.php:57
195
  msgid "Result code"
196
  msgstr "結果コード"
197
 
198
+ #: ../lib/pz-linkcard-cacheman.php:318
199
+ msgid "(last)"
200
+ msgstr ""
201
+
202
+ #: ../lib/pz-linkcard-cacheman.php:348
203
  msgid "edit"
204
  msgstr "編集"
205
 
206
+ #: ../lib/pz-linkcard-cacheman.php:349 ../lib/pz-linkcard-cacheman.php:350
207
  msgid "Are you sure?"
208
  msgstr "実行します。"
209
 
210
+ #: ../lib/pz-linkcard-cacheman.php:349
211
  msgid "renew"
212
  msgstr "再取得"
213
 
214
+ #: ../lib/pz-linkcard-cacheman.php:350
215
  msgid "delete"
216
  msgstr "削除"
217
 
218
+ #: ../lib/pz-linkcard-edit.php:25
219
+ msgid "Link type"
220
+ msgstr "外部/内部"
221
+
222
+ #: ../lib/pz-linkcard-edit.php:29
223
  msgid "Site name"
224
  msgstr "サイト名称"
225
 
226
+ #: ../lib/pz-linkcard-edit.php:46
227
  msgid "->"
228
  msgstr "→"
229
 
230
+ #: ../lib/pz-linkcard-edit.php:49
231
  msgid "Thumbnail URL"
232
  msgstr "サムネイルURL"
233
 
234
+ #: ../lib/pz-linkcard-edit.php:53
235
  msgid "Favicon URL"
236
  msgstr "ファビコンURL"
237
 
238
+ #: ../lib/pz-linkcard-edit.php:65
239
  msgid "SNS"
240
  msgstr ""
241
 
242
+ #: ../lib/pz-linkcard-edit.php:73
243
  msgid "Uptime"
244
  msgstr "更新日時"
245
 
246
+ #: ../lib/pz-linkcard-edit.php:77
247
  msgid "Next update"
248
  msgstr "次回更新日時"
249
 
250
+ #: ../lib/pz-linkcard-edit.php:86
251
  msgid "Update"
252
  msgstr "更新"
253
 
254
+ #: ../lib/pz-linkcard-edit.php:86
255
  msgid "Cancel"
256
  msgstr "キャンセル"
257
 
258
+ #: ../lib/pz-linkcard-settings.php:38
 
 
 
 
259
  msgid "Short code is not set."
260
  msgstr "ショートコードが指定されていません。"
261
 
262
+ #: ../lib/pz-linkcard-settings.php:126
263
  msgid "Changes saved."
264
  msgstr "設定を保存しました。"
265
 
266
+ #: ../lib/pz-linkcard-settings.php:128
267
  msgid "Not changed."
268
  msgstr "設定は変更されませんでした。"
269
 
270
+ #: ../lib/pz-linkcard-settings.php:137
271
+ msgid "Special format"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
272
  msgstr "定型書式"
273
 
274
+ #: ../lib/pz-linkcard-settings.php:140
275
+ msgid "Tiny format"
276
+ msgstr "かんたん書式設定"
277
+
278
+ #: ../lib/pz-linkcard-settings.php:143 ../lib/pz-linkcard-settings.php:366
279
+ #: ../lib/pz-linkcard-settings.php:402 ../lib/pz-linkcard-settings.php:423
280
+ #: ../lib/pz-linkcard-settings.php:465 ../lib/pz-linkcard-settings.php:574
281
+ #: ../lib/pz-linkcard-settings.php:586 ../lib/pz-linkcard-settings.php:601
282
+ #: ../lib/pz-linkcard-settings.php:638 ../lib/pz-linkcard-settings.php:649
283
+ #: ../lib/pz-linkcard-settings.php:664
284
  msgid "None"
285
  msgstr "なし"
286
 
287
+ #: ../lib/pz-linkcard-settings.php:144
288
  msgid "Pz-LkC Default"
289
  msgstr "Pz リンクカード 標準書式"
290
 
291
+ #: ../lib/pz-linkcard-settings.php:145
292
  msgid "Cellophane tape \"center\""
293
  msgstr "セロハンテープ(中央)"
294
 
295
+ #: ../lib/pz-linkcard-settings.php:146
296
  msgid "Cellophane tape \"Top corner\""
297
  msgstr "セロハンテープ(左上と右上)"
298
 
299
+ #: ../lib/pz-linkcard-settings.php:147
300
  msgid "Cellophane tape \"long\""
301
  msgstr "セロハンテープ(長め)"
302
 
303
+ #: ../lib/pz-linkcard-settings.php:148
304
  msgid "Slanting"
305
  msgstr "斜め"
306
 
307
+ #: ../lib/pz-linkcard-settings.php:149
308
  msgid "3D Rotate"
309
  msgstr "3D回転"
310
 
311
+ #: ../lib/pz-linkcard-settings.php:150
312
  msgid "Curling paper"
313
  msgstr "紙がめくれた効果(テーマとの相性があります)"
314
 
315
+ #: ../lib/pz-linkcard-settings.php:151
316
  msgid "Taping and curling"
317
  msgstr "テープと紙めくれ(テーマとの相性があります)"
318
 
319
+ #: ../lib/pz-linkcard-settings.php:152
320
  msgid "Neutral"
321
  msgstr "ブルーグリーン(黒背景推奨)"
322
 
323
+ #: ../lib/pz-linkcard-settings.php:153
324
  msgid "Orange"
325
  msgstr "オレンジ(黒背景推奨)"
326
 
327
+ #: ../lib/pz-linkcard-settings.php:154
328
  msgid "Green"
329
  msgstr "グリーン(黒背景推奨)"
330
 
331
+ #: ../lib/pz-linkcard-settings.php:155
332
  msgid "Blue"
333
  msgstr "ブルー(黒背景推奨)"
334
 
335
+ #: ../lib/pz-linkcard-settings.php:157
336
+ msgid "* It applies over other formatting settings."
337
+ msgstr "※ほかの項目よりも優先して適用されます。"
338
+
339
+ #: ../lib/pz-linkcard-settings.php:163
340
+ msgid "Shortcode"
341
+ msgstr "ショートコード "
342
+
343
+ #: ../lib/pz-linkcard-settings.php:166
344
+ msgid "ShortCode1"
345
+ msgstr "ショートコード 1"
346
+
347
+ #: ../lib/pz-linkcard-settings.php:168 ../lib/pz-linkcard-settings.php:186
348
+ #: ../lib/pz-linkcard-settings.php:191 ../lib/pz-linkcard-settings.php:196
349
+ msgid "Case-sensitive"
350
+ msgstr "大文字と小文字を区別します"
351
+
352
+ #: ../lib/pz-linkcard-settings.php:171
353
+ msgid "Use inlinetext"
354
+ msgstr "ショートコードで囲んだ文字列"
355
+
356
+ #: ../lib/pz-linkcard-settings.php:175
357
+ msgid "No use"
358
+ msgstr "使用しない"
359
+
360
+ #: ../lib/pz-linkcard-settings.php:176
361
+ msgid "Use to excerpt"
362
+ msgstr "抜粋文として使用"
363
+
364
+ #: ../lib/pz-linkcard-settings.php:177
365
+ msgid "Use to title"
366
+ msgstr "タイトルとして使用"
367
+
368
+ #: ../lib/pz-linkcard-settings.php:180
369
+ msgid "This setting applies only to the Shortcode1"
370
+ msgstr "ショートコード1にのみ適用されます"
371
+
372
+ #: ../lib/pz-linkcard-settings.php:184
373
+ msgid "ShortCode 2"
374
+ msgstr "ショートコード 2"
375
 
376
+ #: ../lib/pz-linkcard-settings.php:189
377
+ msgid "ShortCode 3"
378
+ msgstr "ショートコード 3"
379
+
380
+ #: ../lib/pz-linkcard-settings.php:194
381
+ msgid "ShortCode 4"
382
+ msgstr "ショートコード 4"
383
+
384
+ #: ../lib/pz-linkcard-settings.php:199
385
+ msgid "Parameters"
386
+ msgstr "パラメータ"
387
+
388
+ #: ../lib/pz-linkcard-settings.php:202
389
+ msgid ""
390
+ "For any shortcode you can change the title and excerpt with `title` "
391
+ "parameter and `content` parameter"
392
+ msgstr ""
393
+ "どのショートコードでも title パラメータと content パラメータでタイトルと抜粋"
394
+ "文を指定できます。"
395
+
396
+ #: ../lib/pz-linkcard-settings.php:208
397
  msgid "Style"
398
  msgstr "表示設定"
399
 
400
+ #: ../lib/pz-linkcard-settings.php:212
401
+ msgid "Use blockquote tag"
402
+ msgstr "BLOCKQUOTEをタグを使用する"
403
+
404
+ #: ../lib/pz-linkcard-settings.php:213
405
+ msgid "without using DIV tag, and use BLOCKQUOTE tag"
406
+ msgstr "&lt;BLOCKQUOTE&gt;で囲んで引用扱いにします"
407
+
408
+ #: ../lib/pz-linkcard-settings.php:217
409
+ msgid "Link the whole"
410
+ msgstr "カード全体をリンク"
411
+
412
+ #: ../lib/pz-linkcard-settings.php:221
413
+ msgid "Enclose the entire card at anchor"
414
+ msgstr ""
415
+ "カード全体をAタグで囲って、どこをクリックしてもリンク先を開くようにします。"
416
+
417
+ #: ../lib/pz-linkcard-settings.php:227
418
  msgid "Position"
419
  msgstr "配置設定"
420
 
421
+ #: ../lib/pz-linkcard-settings.php:234 ../lib/pz-linkcard-settings.php:265
422
  msgid "Margin top"
423
  msgstr "上の余白"
424
 
425
+ #: ../lib/pz-linkcard-settings.php:236 ../lib/pz-linkcard-settings.php:251
426
+ #: ../lib/pz-linkcard-settings.php:267 ../lib/pz-linkcard-settings.php:281
427
+ #: ../lib/pz-linkcard-settings.php:293 ../lib/pz-linkcard-settings.php:313
428
+ #: ../lib/pz-linkcard-settings.php:329 ../lib/pz-linkcard-settings.php:346
429
  msgid "Not defined"
430
  msgstr "設定しない"
431
 
432
+ #: ../lib/pz-linkcard-settings.php:237 ../lib/pz-linkcard-settings.php:252
433
+ #: ../lib/pz-linkcard-settings.php:273 ../lib/pz-linkcard-settings.php:287
434
+ #: ../lib/pz-linkcard-settings.php:299 ../lib/pz-linkcard-settings.php:319
435
+ #: ../lib/pz-linkcard-settings.php:330 ../lib/pz-linkcard-settings.php:347
436
  msgid "0"
437
  msgstr ""
438
 
439
+ #: ../lib/pz-linkcard-settings.php:238 ../lib/pz-linkcard-settings.php:253
440
+ #: ../lib/pz-linkcard-settings.php:268 ../lib/pz-linkcard-settings.php:282
441
+ #: ../lib/pz-linkcard-settings.php:294 ../lib/pz-linkcard-settings.php:314
442
+ #: ../lib/pz-linkcard-settings.php:331 ../lib/pz-linkcard-settings.php:348
 
443
  msgid "4px"
444
  msgstr ""
445
 
446
+ #: ../lib/pz-linkcard-settings.php:239 ../lib/pz-linkcard-settings.php:254
447
+ #: ../lib/pz-linkcard-settings.php:269 ../lib/pz-linkcard-settings.php:283
448
+ #: ../lib/pz-linkcard-settings.php:295 ../lib/pz-linkcard-settings.php:315
449
+ #: ../lib/pz-linkcard-settings.php:332 ../lib/pz-linkcard-settings.php:349
450
  msgid "8px"
451
  msgstr ""
452
 
453
+ #: ../lib/pz-linkcard-settings.php:240 ../lib/pz-linkcard-settings.php:255
454
+ #: ../lib/pz-linkcard-settings.php:270 ../lib/pz-linkcard-settings.php:284
455
+ #: ../lib/pz-linkcard-settings.php:296 ../lib/pz-linkcard-settings.php:316
456
+ #: ../lib/pz-linkcard-settings.php:333 ../lib/pz-linkcard-settings.php:350
 
457
  msgid "16px"
458
  msgstr ""
459
 
460
+ #: ../lib/pz-linkcard-settings.php:241 ../lib/pz-linkcard-settings.php:256
461
+ #: ../lib/pz-linkcard-settings.php:271 ../lib/pz-linkcard-settings.php:285
462
+ #: ../lib/pz-linkcard-settings.php:297 ../lib/pz-linkcard-settings.php:317
463
+ #: ../lib/pz-linkcard-settings.php:334 ../lib/pz-linkcard-settings.php:351
464
  msgid "32px"
465
  msgstr ""
466
 
467
+ #: ../lib/pz-linkcard-settings.php:242 ../lib/pz-linkcard-settings.php:257
468
+ #: ../lib/pz-linkcard-settings.php:272 ../lib/pz-linkcard-settings.php:286
469
+ #: ../lib/pz-linkcard-settings.php:298 ../lib/pz-linkcard-settings.php:318
470
+ #: ../lib/pz-linkcard-settings.php:335 ../lib/pz-linkcard-settings.php:352
471
  msgid "64px"
472
  msgstr ""
473
 
474
+ #: ../lib/pz-linkcard-settings.php:249 ../lib/pz-linkcard-settings.php:279
475
  msgid "Margin left"
476
  msgstr "左の余白"
477
 
478
+ #: ../lib/pz-linkcard-settings.php:291 ../lib/pz-linkcard-settings.php:327
479
  msgid "Margin right"
480
  msgstr "右の余白"
481
 
482
+ #: ../lib/pz-linkcard-settings.php:305
483
  msgid "Width"
484
  msgstr "カードの横幅"
485
 
486
+ #: ../lib/pz-linkcard-settings.php:306 ../lib/pz-linkcard-settings.php:488
487
+ #: ../lib/pz-linkcard-settings.php:506 ../lib/pz-linkcard-settings.php:524
488
+ #: ../lib/pz-linkcard-settings.php:541
489
  msgid "Height"
490
+ msgstr "高さ"
491
 
492
+ #: ../lib/pz-linkcard-settings.php:311 ../lib/pz-linkcard-settings.php:344
493
  msgid "Margin bottom"
494
  msgstr "下の余白"
495
 
496
+ #: ../lib/pz-linkcard-settings.php:341
497
  msgid "Centering"
498
  msgstr "中央に寄せる"
499
 
500
+ #: ../lib/pz-linkcard-settings.php:363
 
 
 
 
 
 
 
 
 
501
  msgid "Border"
502
  msgstr "枠線の太さ"
503
 
504
+ #: ../lib/pz-linkcard-settings.php:367
505
  msgid "Gray thin"
506
  msgstr "薄い色/細い(1px)"
507
 
508
+ #: ../lib/pz-linkcard-settings.php:368
509
  msgid "Gray"
510
  msgstr "薄い色/普通(2px)"
511
 
512
+ #: ../lib/pz-linkcard-settings.php:369
513
  msgid "Gray thick"
514
  msgstr "薄い色/太い(4px)"
515
 
516
+ #: ../lib/pz-linkcard-settings.php:370
517
  msgid "Black thin"
518
  msgstr "黒/細い(1px)"
519
 
520
+ #: ../lib/pz-linkcard-settings.php:371
521
  msgid "Black"
522
  msgstr "黒/普通(2px)"
523
 
524
+ #: ../lib/pz-linkcard-settings.php:372
525
  msgid "Black thick"
526
  msgstr "黒/太い(4px)"
527
 
528
+ #: ../lib/pz-linkcard-settings.php:373
529
  msgid "Black frame"
530
  msgstr "黒/額縁(8px)"
531
 
532
+ #: ../lib/pz-linkcard-settings.php:374
533
  msgid "Dodgerblue"
534
  msgstr "ドジャー・ブルー(明るい青)"
535
 
536
+ #: ../lib/pz-linkcard-settings.php:375
537
  msgid "Mediumaquamarine"
538
  msgstr "ミディアム・アクアマリーン(明るい緑)"
539
 
540
+ #: ../lib/pz-linkcard-settings.php:376
541
  msgid "Hotpink"
542
  msgstr "ホット・ピンク(明るい赤)"
543
 
544
+ #: ../lib/pz-linkcard-settings.php:377
545
  msgid "Wheat"
546
  msgstr "小麦色(明るい茶色)"
547
 
548
+ #: ../lib/pz-linkcard-settings.php:378
549
  msgid "Double"
550
  msgstr "二重線"
551
 
552
+ #: ../lib/pz-linkcard-settings.php:379
553
  msgid "Dotted"
554
  msgstr "点線"
555
 
556
+ #: ../lib/pz-linkcard-settings.php:385
557
  msgid "Layout"
558
  msgstr "外観設定"
559
 
560
+ #: ../lib/pz-linkcard-settings.php:388
561
  msgid "Radius"
562
  msgstr "角を丸める"
563
 
564
+ #: ../lib/pz-linkcard-settings.php:400 ../lib/pz-linkcard-settings.php:594
565
+ #: ../lib/pz-linkcard-settings.php:657 ../lib/pz-linkcard-settings.php:703
566
  msgid "Site information"
567
  msgstr "サイト情報"
568
 
569
+ #: ../lib/pz-linkcard-settings.php:403
570
  msgid "Top"
571
  msgstr "上側"
572
 
573
+ #: ../lib/pz-linkcard-settings.php:404
574
  msgid "Bottom"
575
  msgstr "下側"
576
 
577
+ #: ../lib/pz-linkcard-settings.php:406
578
  msgid "Use SiteName"
579
  msgstr "サイト名称を使用"
580
 
581
+ #: ../lib/pz-linkcard-settings.php:411
582
  msgid "Separator line"
583
  msgstr "区切り線"
584
 
585
+ #: ../lib/pz-linkcard-settings.php:418
586
  msgid "Display URL"
587
  msgstr "リンク先のURLを表示する"
588
 
589
+ #: ../lib/pz-linkcard-settings.php:421 ../lib/pz-linkcard-settings.php:571
590
+ #: ../lib/pz-linkcard-settings.php:635 ../lib/pz-linkcard-settings.php:695
591
  msgid "Thumbnail"
592
  msgstr "サムネイル"
593
 
594
+ #: ../lib/pz-linkcard-settings.php:424
595
  msgid "Right"
596
  msgstr "右側"
597
 
598
+ #: ../lib/pz-linkcard-settings.php:425
599
  msgid "Left"
600
  msgstr "左側"
601
 
602
+ #: ../lib/pz-linkcard-settings.php:428 ../lib/pz-linkcard-settings.php:453
603
  msgid "Shadow"
604
  msgstr "影を付ける"
605
 
606
+ #: ../lib/pz-linkcard-settings.php:433
 
 
 
 
607
  msgid "Hollow content area"
608
  msgstr "記事の情報に枠を付ける"
609
 
610
+ #: ../lib/pz-linkcard-settings.php:438
611
  msgid "Display excerpt"
612
  msgstr "抜粋文を表示する"
613
 
614
+ #: ../lib/pz-linkcard-settings.php:443
615
  msgid "Hollow"
616
  msgstr "内側に影を付ける"
617
 
618
+ #: ../lib/pz-linkcard-settings.php:457
619
+ msgid "Reset img style"
620
+ msgstr "CSSリセット(img)"
621
+
622
+ #: ../lib/pz-linkcard-settings.php:458
623
+ msgid ""
624
+ "When unnecessary frame is displayed on the image, you can improve it by case"
625
+ msgstr "画像がずれて表示されるときに改善される可能性が有ります(推奨)"
626
+
627
+ #: ../lib/pz-linkcard-settings.php:462
628
  msgid "Display SNS Count"
629
  msgstr "シェア数を表示する"
630
 
631
+ #: ../lib/pz-linkcard-settings.php:466
632
  msgid "After Title"
633
  msgstr "タイトルの後ろ"
634
 
635
+ #: ../lib/pz-linkcard-settings.php:467
636
  msgid "After site-name"
637
  msgstr "サイト情報の後ろ"
638
 
639
+ #: ../lib/pz-linkcard-settings.php:469
640
  msgid "Twitter"
641
  msgstr "ツイッター"
642
 
643
+ #: ../lib/pz-linkcard-settings.php:470
644
  msgid "Facebook"
645
  msgstr "フェイスブック(シェア数)"
646
 
647
+ #: ../lib/pz-linkcard-settings.php:471
648
  msgid "Hatena"
649
  msgstr "はてなブックマーク"
650
 
651
+ #: ../lib/pz-linkcard-settings.php:472
652
  msgid ""
653
  "There is a possibility that the screen display is slow If you enable this "
654
  "setting."
655
  msgstr "有効にする取得APIによっては表示が遅くなる場合があります。"
656
 
657
+ #: ../lib/pz-linkcard-settings.php:478
658
  msgid "Letters"
659
  msgstr "文字設定"
660
 
661
+ #: ../lib/pz-linkcard-settings.php:482
662
  msgid "Site-info."
663
  msgstr "サイト情報"
664
 
665
+ #: ../lib/pz-linkcard-settings.php:484 ../lib/pz-linkcard-settings.php:502
666
+ #: ../lib/pz-linkcard-settings.php:520 ../lib/pz-linkcard-settings.php:537
 
 
 
667
  msgid "Color"
668
  msgstr "色"
669
 
670
+ #: ../lib/pz-linkcard-settings.php:487 ../lib/pz-linkcard-settings.php:505
671
+ #: ../lib/pz-linkcard-settings.php:523 ../lib/pz-linkcard-settings.php:540
 
672
  msgid "Size"
673
  msgstr "大きさ"
674
 
675
+ #: ../lib/pz-linkcard-settings.php:491 ../lib/pz-linkcard-settings.php:509
676
+ #: ../lib/pz-linkcard-settings.php:544
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
677
  msgid "Length"
678
  msgstr "桁数"
679
 
680
+ #: ../lib/pz-linkcard-settings.php:494 ../lib/pz-linkcard-settings.php:512
681
+ #: ../lib/pz-linkcard-settings.php:529 ../lib/pz-linkcard-settings.php:547
682
  msgid "Outline"
683
  msgstr "縁取り"
684
 
685
+ #: ../lib/pz-linkcard-settings.php:552
686
+ msgid "Resize"
687
+ msgstr "幅に合わせて縮小"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
688
 
689
+ #: ../lib/pz-linkcard-settings.php:553
690
+ msgid "Adjust thumbnail and letter size according to width"
691
+ msgstr "画面幅に合わせて文字とサムネイルの大きさを調整します。"
692
 
693
+ #: ../lib/pz-linkcard-settings.php:559
694
  msgid "External link"
695
  msgstr "外部リンク"
696
 
697
+ #: ../lib/pz-linkcard-settings.php:563 ../lib/pz-linkcard-settings.php:627
698
+ #: ../lib/pz-linkcard-settings.php:687
699
  msgid "Background Color"
700
  msgstr "背景色"
701
 
702
+ #: ../lib/pz-linkcard-settings.php:567
703
  msgid "Background image"
704
  msgstr "背景画像"
705
 
706
+ #: ../lib/pz-linkcard-settings.php:575 ../lib/pz-linkcard-settings.php:587
707
+ #: ../lib/pz-linkcard-settings.php:639 ../lib/pz-linkcard-settings.php:650
708
  msgid "Direct"
709
  msgstr "直接取得する"
710
 
711
+ #: ../lib/pz-linkcard-settings.php:576 ../lib/pz-linkcard-settings.php:588
712
+ #: ../lib/pz-linkcard-settings.php:640 ../lib/pz-linkcard-settings.php:651
713
  msgid "Use WebAPI"
714
  msgstr "WebAPIを利用する"
715
 
716
+ #: ../lib/pz-linkcard-settings.php:577 ../lib/pz-linkcard-settings.php:589
717
+ #: ../lib/pz-linkcard-settings.php:641 ../lib/pz-linkcard-settings.php:652
718
  msgid "Use WebAPI ,If can not direct"
719
  msgstr "直接取得できない場合、WebAPIを利用する"
720
 
721
+ #: ../lib/pz-linkcard-settings.php:583 ../lib/pz-linkcard-settings.php:646
722
+ #: ../lib/pz-linkcard-settings.php:699
723
  msgid "Favicon"
724
  msgstr "サイトアイコン"
725
 
726
+ #: ../lib/pz-linkcard-settings.php:598 ../lib/pz-linkcard-settings.php:661
727
+ #: ../lib/pz-linkcard-settings.php:707
728
  msgid "Open new window/tab"
729
  msgstr "新しいウィンドウで開く"
730
 
731
+ #: ../lib/pz-linkcard-settings.php:602 ../lib/pz-linkcard-settings.php:665
732
  msgid "All client"
733
  msgstr "すべての端末"
734
 
735
+ #: ../lib/pz-linkcard-settings.php:603 ../lib/pz-linkcard-settings.php:666
736
  msgid "Other than mobile"
737
  msgstr "モバイル端末以外"
738
 
739
+ #: ../lib/pz-linkcard-settings.php:608 ../lib/pz-linkcard-settings.php:671
740
+ msgid "Get contents"
741
+ msgstr "記事取得方法"
742
+
743
+ #: ../lib/pz-linkcard-settings.php:610 ../lib/pz-linkcard-settings.php:677
744
+ msgid "Initially acquired only from the content"
745
+ msgstr "カード管理画面に記録されている内容から表示する"
746
+
747
+ #: ../lib/pz-linkcard-settings.php:614
748
+ msgid "Set nofollow"
749
+ msgstr "nofollowを付与する"
750
+
751
+ #: ../lib/pz-linkcard-settings.php:615
752
+ msgid "In the case of an external site, it puts the \"nofollow\""
753
+ msgstr "外部リンクのリンクを nofollow にする"
754
+
755
+ #: ../lib/pz-linkcard-settings.php:618
756
+ msgid "Use HatenaBlogCard"
757
+ msgstr "はてなブログカードを利用する"
758
+
759
+ #: ../lib/pz-linkcard-settings.php:619
760
+ msgid "External links will use Always HatenaBlogCard."
761
+ msgstr "外部リンクは「はてなブログカード」を利用する"
762
+
763
+ #: ../lib/pz-linkcard-settings.php:619 ../lib/pz-linkcard-settings.php:816
764
+ msgid "(Not recommended)"
765
+ msgstr "(非推奨)"
766
+
767
+ #: ../lib/pz-linkcard-settings.php:624
768
  msgid "Internal link"
769
  msgstr "内部リンク"
770
 
771
+ #: ../lib/pz-linkcard-settings.php:631 ../lib/pz-linkcard-settings.php:691
772
  msgid "Background Image"
773
  msgstr "背景画像"
774
 
775
+ #: ../lib/pz-linkcard-settings.php:675
 
 
 
 
776
  msgid "Always get the latest from the content"
777
  msgstr "常に最新の記事内容から抜粋文を作成する"
778
 
779
+ #: ../lib/pz-linkcard-settings.php:676
780
  msgid "Always get the latest from the excerpt"
781
  msgstr "抜粋文が設定されている投稿はそちらを優先する"
782
 
783
+ #: ../lib/pz-linkcard-settings.php:684
 
 
 
 
784
  msgid "Same-page link"
785
  msgstr "同ページへのリンク"
786
 
787
+ #: ../lib/pz-linkcard-settings.php:696 ../lib/pz-linkcard-settings.php:700
788
+ #: ../lib/pz-linkcard-settings.php:708
789
  msgid "It is common with setting Internal-link"
790
  msgstr "内部リンク用の設定が使用されます"
791
 
792
+ #: ../lib/pz-linkcard-settings.php:713
793
  msgid "Web-API"
794
  msgstr "画像取得APIの指定"
795
 
796
+ #: ../lib/pz-linkcard-settings.php:716
797
  msgid "Favicon API"
798
  msgstr "ファビコンの取得API"
799
 
800
+ #: ../lib/pz-linkcard-settings.php:719
801
  msgid ""
802
  "%DOMAIN% replace to domain name (ex. poporon.poponet.jp )<br>%DOMAIN_URL% "
803
  "replace to domain URL (ex. http://poporon.poponet.jp )"
806
  "%DOMAIN_URL% と記述するとドメインのURL(例.http://poporon.poponet.jp)に置き"
807
  "換わります。"
808
 
809
+ #: ../lib/pz-linkcard-settings.php:720 ../lib/pz-linkcard-settings.php:729
810
+ msgid "ex1."
811
+ msgstr "例1."
812
+
813
+ #: ../lib/pz-linkcard-settings.php:721 ../lib/pz-linkcard-settings.php:730
814
+ msgid "ex2."
815
+ msgstr "例2."
816
+
817
+ #: ../lib/pz-linkcard-settings.php:725
818
  msgid "Thumbnail API"
819
  msgstr "サムネイル画像の取得API"
820
 
821
+ #: ../lib/pz-linkcard-settings.php:728
822
  msgid "%URL% replace to URL"
823
  msgstr "%URL% と記述するとURLに置き換わります"
824
 
825
+ #: ../lib/pz-linkcard-settings.php:736
826
+ msgid "Link check"
827
+ msgstr "リンク先のチェック"
828
 
829
+ #: ../lib/pz-linkcard-settings.php:739
830
+ msgid "SSL verification disabled"
831
+ msgstr "SSL検証を無効"
832
 
833
+ #: ../lib/pz-linkcard-settings.php:740
834
+ msgid "Try setting if the contents of the SSL site can not be acquired."
835
+ msgstr ""
836
+ "SSLサイトのタイトルや記事内容が取得できない場合に設定することで取得できる可能"
837
+ "性があります。"
838
 
839
+ #: ../lib/pz-linkcard-settings.php:743
840
+ msgid "Follow location"
841
+ msgstr "リダイレクト処理"
842
 
843
+ #: ../lib/pz-linkcard-settings.php:744
844
+ msgid "Track when the link destination is redirected."
845
+ msgstr "リンク先がリダイレクトされている場合に追跡します。"
846
 
847
+ #: ../lib/pz-linkcard-settings.php:747
848
+ msgid "Broken link checker"
849
+ msgstr "リンク切れチェック"
850
 
851
+ #: ../lib/pz-linkcard-settings.php:748
852
+ msgid "Alive confirmation of the link destination."
853
+ msgstr "リンク先がアクセスできるか定期的に確認します。"
854
 
855
+ #: ../lib/pz-linkcard-settings.php:753
856
+ msgid "Debug"
857
+ msgstr "詳しい人用(Debug)"
858
 
859
+ #: ../lib/pz-linkcard-settings.php:756
860
+ msgid "Trailing slash"
861
+ msgstr "末尾のスラッシュ"
862
+
863
+ #: ../lib/pz-linkcard-settings.php:760
864
+ msgid "As it"
865
+ msgstr "そのまま"
866
+
867
+ #: ../lib/pz-linkcard-settings.php:761
868
+ msgid "When only domain name, remove"
869
+ msgstr "ドメイン名のみのときだけ削除"
870
+
871
+ #: ../lib/pz-linkcard-settings.php:762
872
+ msgid "Always remove"
873
+ msgstr "常に削除"
874
 
875
+ #: ../lib/pz-linkcard-settings.php:768
876
  msgid "specified CSS"
877
  msgstr "指定したCSSを使用"
878
 
879
+ #: ../lib/pz-linkcard-settings.php:769
880
  msgid "Use specified CSS file"
881
  msgstr "指定したCSSファイルを使用する"
882
 
883
+ #: ../lib/pz-linkcard-settings.php:772 ../lib/pz-linkcard-settings.php:776
884
  msgid "CSS file"
885
  msgstr "CSSファイル名"
886
 
887
+ #: ../lib/pz-linkcard-settings.php:773
888
  msgid "(ex. http://exsample.com/style.css )"
889
  msgstr "例.http://exsample.com/style.css"
890
 
891
+ #: ../lib/pz-linkcard-settings.php:780
892
  msgid "CSS URL"
893
  msgstr "CSSファイルのURL"
894
 
895
+ #: ../lib/pz-linkcard-settings.php:785
896
  msgid "Class ID to be added(for PC)"
897
  msgstr "PCのときに追加するクラス名"
898
 
899
+ #: ../lib/pz-linkcard-settings.php:789
900
  msgid "Class ID to be added(for Mobile)"
901
  msgstr "モバイルのときに追加するクラス名"
902
 
903
+ #: ../lib/pz-linkcard-settings.php:794
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
904
  msgid "Display link to author page"
905
  msgstr "プラグイン名を表示する"
906
 
907
+ #: ../lib/pz-linkcard-settings.php:798
908
  msgid "Plugin URL"
909
  msgstr "プラグインページURL"
910
 
911
+ #: ../lib/pz-linkcard-settings.php:802
912
  msgid "Plugin name"
913
  msgstr "プラグイン名"
914
 
915
+ #: ../lib/pz-linkcard-settings.php:806
916
  msgid "Plugin version"
917
  msgstr "プラグインバージョン"
918
 
919
+ #: ../lib/pz-linkcard-settings.php:810
920
  msgid "Saved datetime"
921
  msgstr "保存した日時"
922
 
923
+ #: ../lib/pz-linkcard-settings.php:815
924
  msgid "Display elapsed time"
925
  msgstr "実行時間の表示"
926
 
927
+ #: ../lib/pz-linkcard-settings.php:816
928
  msgid "Output the elapsed time to HTML comment."
929
  msgstr "作成にかかった時間をコメントとしてHTMLへ出力する"
930
 
931
+ #: ../lib/pz-linkcard-settings.php:822
932
  msgid "Initialize"
933
  msgstr "初期化"
934
 
935
+ #: ../lib/pz-linkcard-settings.php:825
936
  msgid "Return to the initial setting"
937
  msgstr "設定を初期状態へ戻す"
938
 
939
+ #: ../lib/pz-linkcard-settings.php:831
940
+ msgid "etc"
941
+ msgstr "その他"
942
+
943
+ #: ../lib/pz-linkcard-settings.php:834
944
+ msgid "Author's site"
945
+ msgstr "作者のサイト"
946
+
947
+ #: ../lib/pz-linkcard-settings.php:835
948
+ msgid "Popozure."
949
+ msgstr "ぽぽづれ。"
950
+
951
+ #: ../lib/pz-linkcard-settings.php:835
952
+ msgid "Poporon's PC daily diary"
953
+ msgstr "ぽぽろんのパソコンつれづれ(ズレズレ?)日記"
954
+
955
+ #: ../lib/pz-linkcard-settings.php:838
956
+ msgid "Plugin's page"
957
+ msgstr "プラグインのページ"
958
+
959
+ #: ../lib/pz-linkcard-style.php:396
960
  msgid "Style sheet saved."
961
  msgstr "設定を元にスタイルシートを自動生成しました。"
962
 
963
+ #: ../lib/pz-linkcard-style.php:398
964
  msgid "Style sheet failed."
965
  msgstr "スタイルシートの自動生成に失敗しました。"
966
 
967
+ #~ msgid "Basic"
968
+ #~ msgstr "基本設定"
 
969
 
970
+ #~ msgid "Will some of the parameters are forcibly changed"
971
+ #~ msgstr "選択した定型書式によって、一部の設定が無効になります。"
 
972
 
973
+ #~ msgid "In the case of domain names, to ignore the trailing-slash."
974
+ #~ msgstr "ドメイン名のみのときに最後のスラッシュを除外する"
 
975
 
976
+ #~ msgid "Plugin link"
977
+ #~ msgstr "プラグインのページ"
978
+
979
+ #~ msgid "Plugin-link"
980
+ #~ msgstr "プラグイン名"
981
 
982
  #~ msgid "Direct & Use WebAPI"
983
  #~ msgstr "直接取得できない場合、WebAPI利用"
1064
  #~ msgid "seconds"
1065
  #~ msgstr "秒"
1066
 
 
 
 
1067
  #~ msgid "Display elapsed time required to create"
1068
  #~ msgstr "作成にかかった時間を表示する"
1069
 
lib/pz-linkcard-cacheman.php CHANGED
@@ -40,6 +40,11 @@ $result_code = isset($_REQUEST['result_code'] ) ? $_REQUEST['result_code'] : nul
40
  $alive_result = isset($_REQUEST['alive_result'] ) ? $_REQUEST['alive_result'] : null;
41
  $paged = (isset($_REQUEST['paged'] ) ? $_REQUEST['paged'] : 1) - 0;
42
 
 
 
 
 
 
43
 
44
  global $wpdb;
45
 
@@ -85,6 +90,24 @@ if (isset($action)) {
85
  echo __('completed', $this->text_domain).'</strong></p></div>';
86
  }
87
  break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88
  case 'renew':
89
  if (isset($bulk_id) && is_array($bulk_id)) {
90
  echo '<div class="updated fade"><p><strong>'.__('Cache renew', $this->text_domain).'..';
@@ -123,6 +146,7 @@ case 'charset':
123
  case 'title':
124
  case 'excerpt':
125
  case 'result_code':
 
126
  case 'post_id':
127
  case 'sns_twitter':
128
  case 'sns_facebook':
@@ -145,10 +169,13 @@ $where = null;
145
  $link_type = strtolower($link_type);
146
  switch ($link_type) {
147
  case 'internal':
148
- $where = 'link_type<>0';
149
  break;
150
  case 'external':
151
- $where = 'link_type=0';
 
 
 
152
  break;
153
  default:
154
  $link_type = 'all';
@@ -203,17 +230,20 @@ $domain_list = $wpdb->get_results($sql); // テーブルデータ
203
  // SUB(CASE WHEN ... END) で一気に取れないぽい?
204
  $result = $wpdb->get_row("SELECT COUNT(*) AS count FROM $this->db_name");
205
  $count_all = $result->count;
206
- $result = $wpdb->get_row("SELECT COUNT(*) AS count FROM $this->db_name WHERE link_type<>0");
207
  $count_internal = $result->count;
208
- $result = $wpdb->get_row("SELECT COUNT(*) AS count FROM $this->db_name WHERE link_type=0");
209
  $count_external = $result->count;
 
 
210
 
211
  ?>
212
 
213
  <ul class='subsubsub'>
214
  <li class="all"><a href="?page=pz-linkcard-cache&link_type=all&orderby=regist&order=desc" <?php if ($link_type == 'all') echo 'class="current"'; ?>><?php _e('All', $this->text_domain); ?> <span class="count">(<?php echo $count_all; ?>)</span></a> |</li>
215
  <li class="all"><a href="?page=pz-linkcard-cache&link_type=internal&orderby=regist&order=desc" <?php if ($link_type == 'internal') echo 'class="current"'; ?>><?php _e('Internal', $this->text_domain); ?> <span class="count">(<?php echo $count_internal; ?>)</span></a> |</li>
216
- <li class="all"><a href="?page=pz-linkcard-cache&link_type=external&orderby=regist&order=desc" <?php if ($link_type == 'external') echo 'class="current"'; ?>><?php _e('External', $this->text_domain); ?> <span class="count">(<?php echo $count_external; ?>)</span></a></li>
 
217
  </ul>
218
 
219
  <form id="posts-filter" action="" method="post">
@@ -228,6 +258,7 @@ $count_external = $result->count;
228
  <option value="-1" selected="selected"><?php _e('Select', $this->text_domain); ?></option>
229
  <option value="renew"><?php _e('Renew cache', $this->text_domain); ?></option>
230
  <option value="renew_sns"><?php _e('Renew SNS count', $this->text_domain); ?></option>
 
231
  <option value="delete"><?php _e('Delete from cache', $this->text_domain); ?></option>
232
  </select>
233
  <input type="submit" id="doaction" class="button action" value="<?php _e('Submit', $this->text_domain); ?>" onclick="return confirm(\''.__('Are you sure?', $this->text_domain).'\');" />
@@ -307,7 +338,7 @@ foreach ($data_all as $data) {
307
  $title = htmlentities($data->title);
308
  echo ' <td colspan="2">';
309
  echo ' <div style="word-break: break-all; font-size: 60%;">';
310
- if ($data->link_type) {
311
  echo '<a href="'.$url.'">'.$url.'</a>';
312
  } else {
313
  echo $url;
@@ -338,9 +369,9 @@ foreach ($data_all as $data) {
338
  $sns_count = $data->sns_hatena;
339
  echo ' <td style="font-size: 60%;">'.(($sns_count >= 0) ? $sns_count : '-').'</td>';
340
 
341
- echo ' <td>'.$data->regist.'</td>';
342
  echo ' <td style="word-break: break-all;"><a href="'.get_permalink($data->post_id).'" target="_blank" title="'.get_the_title($data->post_id).'">'.$data->post_id.'</td>';
343
- echo ' <td>'.$data->result_code.'</td>';
344
  echo '</tr>';
345
  }
346
 
@@ -354,10 +385,11 @@ foreach ($data_all as $data) {
354
  function echo_PageButton($page_link, $page_now, $text, $class_name) {
355
  $orderby = isset($_REQUEST['orderby'] ) ? $_REQUEST['orderby'] : null;
356
  $order = isset($_REQUEST['order'] ) ? $_REQUEST['order'] : null;
 
357
  $link_type = isset($_REQUEST['link_type'] ) ? $_REQUEST['link_type'] : null;
358
 
359
  if ($page_link != $page_now && !is_null($page_link)) {
360
- echo '<a class="'.$class_name.'" href="?page=pz-linkcard-cache&link_type='.$link_type.'&orderby='.$orderby.'&order='.$order.'&paged='.$page_link.'">'.$text.'</a>';
361
  } else {
362
  echo '<span class="tablenav-pages-navspan">'.$text.'</span>';
363
  }
40
  $alive_result = isset($_REQUEST['alive_result'] ) ? $_REQUEST['alive_result'] : null;
41
  $paged = (isset($_REQUEST['paged'] ) ? $_REQUEST['paged'] : 1) - 0;
42
 
43
+ $domain = null;
44
+ if (preg_match('{https?://(.*)/}i', home_url().'/',$m)) {
45
+ $domain_url = $m[0];
46
+ $domain = $m[1];
47
+ }
48
 
49
  global $wpdb;
50
 
90
  echo __('completed', $this->text_domain).'</strong></p></div>';
91
  }
92
  break;
93
+ case 'alive':
94
+ if (isset($bulk_id) && is_array($bulk_id)) {
95
+ $now = current_time('timestamp');
96
+ echo '<div class="updated fade"><p><strong>'.__('Alive check', $this->text_domain).'...';
97
+ foreach ($bulk_id as $data_id) {
98
+ $data = $this->pz_GetCache(array('id' => $data_id));
99
+ if (isset($data) && is_array($data)) {
100
+ $data = $this->pz_GetCache($data);
101
+ $after = $this->pz_GetCURL($data);
102
+ $data['alive_result'] = $after['result_code'];
103
+ $data['alive_time'] = $now;
104
+ $data = $this->pz_SetCache($data);
105
+ }
106
+ echo '..';
107
+ }
108
+ echo __('completed', $this->text_domain).'</strong></p></div>';
109
+ }
110
+ break;
111
  case 'renew':
112
  if (isset($bulk_id) && is_array($bulk_id)) {
113
  echo '<div class="updated fade"><p><strong>'.__('Cache renew', $this->text_domain).'..';
146
  case 'title':
147
  case 'excerpt':
148
  case 'result_code':
149
+ case 'alive_result':
150
  case 'post_id':
151
  case 'sns_twitter':
152
  case 'sns_facebook':
169
  $link_type = strtolower($link_type);
170
  switch ($link_type) {
171
  case 'internal':
172
+ $where = "url LIKE '".get_bloginfo('url')."%'";
173
  break;
174
  case 'external':
175
+ $where = "url NOT LIKE '".get_bloginfo('url')."%'";
176
+ break;
177
+ case 'modify':
178
+ $where = "alive_result <> result_code";
179
  break;
180
  default:
181
  $link_type = 'all';
230
  // SUB(CASE WHEN ... END) で一気に取れないぽい?
231
  $result = $wpdb->get_row("SELECT COUNT(*) AS count FROM $this->db_name");
232
  $count_all = $result->count;
233
+ $result = $wpdb->get_row("SELECT COUNT(*) AS count FROM $this->db_name WHERE url LIKE '".get_bloginfo('url')."%'");
234
  $count_internal = $result->count;
235
+ $result = $wpdb->get_row("SELECT COUNT(*) AS count FROM $this->db_name WHERE url NOT LIKE '".get_bloginfo('url')."%'");
236
  $count_external = $result->count;
237
+ $result = $wpdb->get_row("SELECT COUNT(*) AS count FROM $this->db_name WHERE alive_result <> result_code");
238
+ $count_modify = $result->count;
239
 
240
  ?>
241
 
242
  <ul class='subsubsub'>
243
  <li class="all"><a href="?page=pz-linkcard-cache&link_type=all&orderby=regist&order=desc" <?php if ($link_type == 'all') echo 'class="current"'; ?>><?php _e('All', $this->text_domain); ?> <span class="count">(<?php echo $count_all; ?>)</span></a> |</li>
244
  <li class="all"><a href="?page=pz-linkcard-cache&link_type=internal&orderby=regist&order=desc" <?php if ($link_type == 'internal') echo 'class="current"'; ?>><?php _e('Internal', $this->text_domain); ?> <span class="count">(<?php echo $count_internal; ?>)</span></a> |</li>
245
+ <li class="all"><a href="?page=pz-linkcard-cache&link_type=external&orderby=regist&order=desc" <?php if ($link_type == 'external') echo 'class="current"'; ?>><?php _e('External', $this->text_domain); ?> <span class="count">(<?php echo $count_external; ?>)</span></a> |</li>
246
+ <li class="all"><a href="?page=pz-linkcard-cache&link_type=modify&orderby=regist&order=desc" <?php if ($link_type == 'modify') echo 'class="current"'; ?>><?php _e('Modify', $this->text_domain); ?> <span class="count">(<?php echo $count_modify; ?>)</span></a></li>
247
  </ul>
248
 
249
  <form id="posts-filter" action="" method="post">
258
  <option value="-1" selected="selected"><?php _e('Select', $this->text_domain); ?></option>
259
  <option value="renew"><?php _e('Renew cache', $this->text_domain); ?></option>
260
  <option value="renew_sns"><?php _e('Renew SNS count', $this->text_domain); ?></option>
261
+ <option value="alive"><?php _e('Check status', $this->text_domain); ?></option>
262
  <option value="delete"><?php _e('Delete from cache', $this->text_domain); ?></option>
263
  </select>
264
  <input type="submit" id="doaction" class="button action" value="<?php _e('Submit', $this->text_domain); ?>" onclick="return confirm(\''.__('Are you sure?', $this->text_domain).'\');" />
338
  $title = htmlentities($data->title);
339
  echo ' <td colspan="2">';
340
  echo ' <div style="word-break: break-all; font-size: 60%;">';
341
+ if ( $data->domain == $domain ) {
342
  echo '<a href="'.$url.'">'.$url.'</a>';
343
  } else {
344
  echo $url;
369
  $sns_count = $data->sns_hatena;
370
  echo ' <td style="font-size: 60%;">'.(($sns_count >= 0) ? $sns_count : '-').'</td>';
371
 
372
+ echo ' <td>'.$data->regist.'<br>'.date('Y-m-d H:i:s', $data->alive_time).'</td>';
373
  echo ' <td style="word-break: break-all;"><a href="'.get_permalink($data->post_id).'" target="_blank" title="'.get_the_title($data->post_id).'">'.$data->post_id.'</td>';
374
+ echo ' <td>'.$data->result_code.($data->result_code <> $data->alive_result ? '<br><span style="color:#f00;">('.$data->alive_result.')</span>' : '').'</td>';
375
  echo '</tr>';
376
  }
377
 
385
  function echo_PageButton($page_link, $page_now, $text, $class_name) {
386
  $orderby = isset($_REQUEST['orderby'] ) ? $_REQUEST['orderby'] : null;
387
  $order = isset($_REQUEST['order'] ) ? $_REQUEST['order'] : null;
388
+ $refine = isset($_REQUEST['refine'] ) ? $_REQUEST['refine'] : null;
389
  $link_type = isset($_REQUEST['link_type'] ) ? $_REQUEST['link_type'] : null;
390
 
391
  if ($page_link != $page_now && !is_null($page_link)) {
392
+ echo '<a class="'.$class_name.'" href="?page=pz-linkcard-cache&link_type='.$link_type.'&orderby='.$orderby.'&order='.$order.'&refine='.$refine.'&paged='.$page_link.'">'.$text.'</a>';
393
  } else {
394
  echo '<span class="tablenav-pages-navspan">'.$text.'</span>';
395
  }
lib/pz-linkcard-edit.php CHANGED
@@ -21,13 +21,17 @@
21
  <th><?php _e('URL', $this->text_domain) ?></th>
22
  <td><input name="data[url]" type="text" id="inputtext" value="<?php echo $data['url']; ?>" size="71" readonly="readonly" /></td>
23
  </tr>
 
 
 
 
24
  <tr>
25
  <th><?php _e('Site name', $this->text_domain) ?></th>
26
  <td><input name="data[site_name]" type="text" id="inputtext" value="<?php echo esc_attr($data['site_name']); ?>" size="71" /></td>
27
  </tr>
28
  <tr>
29
  <th><?php _e('Domain', $this->text_domain) ?></th>
30
- <td><input name="data[domain]" type="text" id="inputtext" value="<?php echo $data['domain']; ?>" size="71" readonly="readonly" /></td>
31
  </tr>
32
  <tr>
33
  <th><?php _e('Title', $this->text_domain) ?></th>
@@ -43,15 +47,15 @@
43
  </tr>
44
  <tr>
45
  <th><?php _e('Thumbnail URL', $this->text_domain) ?></th>
46
- <td><input name="data[thumbnail]" type="text" id="inputtext" value="<?php echo $data['thumbnail']; ?>" size="71" readonly="readonly" /></td>
47
  </tr>
48
  <tr>
49
  <th><?php _e('Favicon URL', $this->text_domain) ?></th>
50
- <td><input name="data[favicon]" type="text" id="inputtext" value="<?php echo $data['favicon']; ?>" size="71" readonly="readonly" /></td>
51
  </tr>
52
  <tr>
53
  <th><?php _e('Result code', $this->text_domain) ?></th>
54
- <td><input name="data[result_code]" type="text" id="inputtext" value="<?php echo $data['result_code']; ?>" size="5" readonly="readonly" /></td>
55
  </tr>
56
  <tr>
57
  <th><?php _e('Post ID', $this->text_domain) ?></th>
@@ -60,9 +64,9 @@
60
  <tr>
61
  <th><?php _e('SNS', $this->text_domain) ?></th>
62
  <td>
63
- <?php _e('Tw', $this->text_domain) ?>:<input name="data[sns_twitter]" type="text" id="inputtext" value="<?php echo $data['sns_twitter']; ?>" size="5" readonly="readonly" />
64
- <?php _e('fb', $this->text_domain) ?>:<input name="data[sns_facebook]" type="text" id="inputtext" value="<?php echo $data['sns_facebook']; ?>" size="5" readonly="readonly" />
65
- <?php _e('B!', $this->text_domain) ?>:<input name="data[sns_hatena]" type="text" id="inputtext" value="<?php echo $data['sns_hatena']; ?>" size="5" readonly="readonly" />
66
  </td>
67
  </tr>
68
  <tr>
21
  <th><?php _e('URL', $this->text_domain) ?></th>
22
  <td><input name="data[url]" type="text" id="inputtext" value="<?php echo $data['url']; ?>" size="71" readonly="readonly" /></td>
23
  </tr>
24
+ <tr>
25
+ <th><?php _e('Link type', $this->text_domain) ?></th>
26
+ <td><input name="data[link_type]" type="text" id="inputtext" value="<?php echo $data['link_type']; ?>" size="5" readonly="readonly" /></td>
27
+ </tr>
28
  <tr>
29
  <th><?php _e('Site name', $this->text_domain) ?></th>
30
  <td><input name="data[site_name]" type="text" id="inputtext" value="<?php echo esc_attr($data['site_name']); ?>" size="71" /></td>
31
  </tr>
32
  <tr>
33
  <th><?php _e('Domain', $this->text_domain) ?></th>
34
+ <td><input name="data[domain]" type="text" id="inputtext" value="<?php echo $data['domain']; ?>" size="71" readonly="readonly" ondblclick="this.readOnly=false;" /></td>
35
  </tr>
36
  <tr>
37
  <th><?php _e('Title', $this->text_domain) ?></th>
47
  </tr>
48
  <tr>
49
  <th><?php _e('Thumbnail URL', $this->text_domain) ?></th>
50
+ <td><input name="data[thumbnail]" type="text" id="inputtext" value="<?php echo $data['thumbnail']; ?>" size="71" readonly="readonly" ondblclick="this.readOnly=false;" /></td>
51
  </tr>
52
  <tr>
53
  <th><?php _e('Favicon URL', $this->text_domain) ?></th>
54
+ <td><input name="data[favicon]" type="text" id="inputtext" value="<?php echo $data['favicon']; ?>" size="71" readonly="readonly" ondblclick="this.readOnly=false;" /></td>
55
  </tr>
56
  <tr>
57
  <th><?php _e('Result code', $this->text_domain) ?></th>
58
+ <td><input name="data[result_code]" type="text" id="inputtext" value="<?php echo $data['result_code']; ?>" size="5" readonly="readonly" ondblclick="this.readOnly=false;" /></td>
59
  </tr>
60
  <tr>
61
  <th><?php _e('Post ID', $this->text_domain) ?></th>
64
  <tr>
65
  <th><?php _e('SNS', $this->text_domain) ?></th>
66
  <td>
67
+ <?php _e('Tw', $this->text_domain) ?>:<input name="data[sns_twitter]" type="text" id="inputtext" value="<?php echo $data['sns_twitter']; ?>" size="5" readonly="readonly" ondblclick="this.readOnly=false;" />
68
+ <?php _e('fb', $this->text_domain) ?>:<input name="data[sns_facebook]" type="text" id="inputtext" value="<?php echo $data['sns_facebook']; ?>" size="5" readonly="readonly" ondblclick="this.readOnly=false;" />
69
+ <?php _e('B!', $this->text_domain) ?>:<input name="data[sns_hatena]" type="text" id="inputtext" value="<?php echo $data['sns_hatena']; ?>" size="5" readonly="readonly" ondblclick="this.readOnly=false;" />
70
  </td>
71
  </tr>
72
  <tr>
lib/pz-linkcard-init.php ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if (!function_exists("get_option")) die; ?>
2
+ <?php
3
+
4
+ // if ( is_multisite() ) {
5
+ // global $current_site , $current_blog ;
6
+ // if ( !$blog_id ) {
7
+ // return;
8
+ // }
9
+ // }
10
+
11
+ $this->options = get_option( 'Pz_LinkCard_options', $this->defaults );
12
+ foreach( $this->defaults as $key => $value ) {
13
+ if ( !isset( $this->options[$key] ) ) {
14
+ $this->options[$key] = null;
15
+ }
16
+ }
17
+
18
+ $this->options['plugin-version'] = $this->defaults['plugin-version'];
19
+ update_option('Pz_LinkCard_options', $this->options);
20
+
21
+ $this->pz_SetStyle();
22
+
23
+ global $wpdb;
24
+ $wpdb->hide_errors();
25
+
26
+ require_once (ABSPATH.'wp-admin/includes/upgrade.php');
27
+ $sql = "CREATE TABLE ".$this->db_name." (
28
+ id INT UNSIGNED NOT NULL AUTO_INCREMENT,
29
+ url VARCHAR(2048) DEFAULT '',
30
+ scheme VARCHAR(16) DEFAULT '',
31
+ address VARCHAR(2048) DEFAULT '',
32
+ site_name VARCHAR(100) DEFAULT '',
33
+ domain VARCHAR(253) DEFAULT '',
34
+ title VARCHAR(200) DEFAULT '',
35
+ excerpt VARCHAR(500) DEFAULT '',
36
+ thumbnail VARCHAR(2048) DEFAULT '',
37
+ favicon VARCHAR(2048) DEFAULT '',
38
+ means VARCHAR(32) DEFAULT '',
39
+ charset VARCHAR(32) DEFAULT '',
40
+ sns_time BIGINT UNSIGNED NOT NULL DEFAULT 0,
41
+ sns_nexttime BIGINT UNSIGNED NOT NULL DEFAULT 0,
42
+ sns_twitter INT DEFAULT -1,
43
+ sns_facebook INT DEFAULT -1,
44
+ sns_hatena INT DEFAULT -1,
45
+ post_id INT UNSIGNED,
46
+ regist_time BIGINT UNSIGNED NOT NULL DEFAULT 0,
47
+ regist_result INT DEFAULT -1,
48
+ update_time BIGINT UNSIGNED NOT NULL DEFAULT 0,
49
+ update_result INT DEFAULT -1,
50
+ alive_time BIGINT UNSIGNED NOT NULL DEFAULT 0,
51
+ alive_result INT DEFAULT -1,
52
+ uptime BIGINT UNSIGNED NOT NULL DEFAULT 0,
53
+ nexttime BIGINT UNSIGNED NOT NULL DEFAULT 0,
54
+ link_type INT UNSIGNED,
55
+ result_code INT DEFAULT -1,
56
+ regist DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
57
+ PRIMARY KEY ( id ),
58
+ UNIQUE KEY ( url_key )
59
+ ) ".$wpdb->get_charset_collate()." ;";
60
+ dbDelta($sql);
61
+
62
+ // バグデータのメンテナンス
63
+ $result = (array) $wpdb->get_results("SELECT url,id FROM $this->db_name ORDER BY url,id");
64
+ $last_url = null;
65
+ $last_id = null;
66
+ if (isset($result) && is_array($result) && count($result) > 0) {
67
+ foreach($result as $data) {
68
+ if ($data->url == $last_url && $data->id <> $last_id) {
69
+ $after = $wpdb->delete($this->db_name, array('id' => $data->id), array('%d') );
70
+ }
71
+ $last_url = $data->url;
72
+ $last_id = $data->id;
73
+ }
74
+ }
75
+ // 生存確認用のデータ作成
76
+ $result = (array) $wpdb->get_results("SELECT * FROM $this->db_name WHERE alive_result IS NULL OR alive_result=0 OR result_code=0 ORDER BY url");
77
+ if (isset($result) && is_array($result) && count($result) > 0) {
78
+ foreach($result as $data) {
79
+ if ( $data->result_code == 0 ) {
80
+ $data->result_code = 200;
81
+ }
82
+ if ( $data->alive_result == 0 OR is_null($data->alive_result) ) {
83
+ $data->alive_result = $data->result_code;
84
+ }
85
+ $after = (array) $data;
86
+ $after = $wpdb->update( $this->db_name, $after, array( 'id' => $data->id ) );
87
+ }
88
+ }
89
+
90
+ wp_clear_scheduled_hook('pz_linkcard_check');
91
+ wp_clear_scheduled_hook('pz_linkcard_alive');
92
+ // wp_schedule_event(time() , 'hourly', 'pz_linkcard_check');
93
+ // wp_schedule_event(time() , 'hourly', 'pz_linkcard_alive');
lib/pz-linkcard-settings.php CHANGED
@@ -38,39 +38,88 @@
38
  echo '<div class="error fade"><p><strong>'.__('Short code is not set.', $this->text_domain).'</strong></p></div>';
39
  $result = false;
40
  }
 
41
  $width = $this->options['width'];
42
  if (substr($width, -1 ) == '%') {
43
  $this->options['width'] = preg_replace('/[^0-9]/', '', $width).'%';
44
  } else {
45
  $width = preg_replace('/[^0-9]/', '', $width);
46
  if ($width == '') {
47
- $this->options['width'] = '500px';
48
  } else {
49
  $this->options['width'] = $width.'px';
50
  }
51
  }
 
52
  $height = preg_replace('/[^0-9]/', '', $this->options['content-height']);
53
  if ($height == '') {
54
- $this->options['content-height'] = '108px';
55
  } else {
56
  $this->options['content-height'] = $height.'px';
57
  }
 
58
  $trim_count = preg_replace('/[^0-9]/', '', $this->options['trim-title']) - 0;
59
  if ($trim_count == 0) {
60
  $trim_count = $this->defaults['trim-title'];
61
  }
62
  $this->options['trim-title'] = $trim_count;
 
63
  $trim_count = preg_replace('/[^0-9]/', '', $this->options['trim-count']) - 0;
64
  if ($trim_count == 0) {
65
  $trim_count = $this->defaults['trim-count'];
66
  }
67
  $this->options['trim-count'] = $trim_count;
 
68
  $trim_count = preg_replace('/[^0-9]/', '', $this->options['trim-sitename']) - 0;
69
  if ($trim_count == 0) {
70
  $trim_count = $this->defaults['trim-sitename'];
71
  }
72
  $this->options['trim-sitename'] = $trim_count;
73
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  if ($result == true) {
75
  $result = update_option('Pz_LinkCard_options', $this->options);
76
  if ($result == true) {
@@ -81,14 +130,37 @@
81
  $this->pz_SetStyle();
82
  }
83
  }
84
- // if ((isset($this->options['sns-position']) ? $this->options['sns-position'] : null) && (isset($this->options['sns-tw']) ? $this->options['sns-tw'] : null)) {
85
- // echo '<div class="error fade"><p><strong>'.__('It was no longer able to tweet the number of acquisition of Twitter.', $this->text_domain).'</strong></p></div>';
86
- // }
87
  ?>
88
  <form action="" method="post">
89
  <?php wp_nonce_field('pz_options'); ?>
90
 
91
- <h3><?php _e('Basic', $this->text_domain); ?></h3>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
  <table class="form-table">
93
  <tr valign="top">
94
  <th scope="row"><?php _e('ShortCode1', $this->text_domain); ?></th>
@@ -98,13 +170,13 @@
98
  <tr valign="top">
99
  <th scope="row"><?php _e('Use inlinetext', $this->text_domain); ?></th>
100
  <td>
101
- [<?php echo esc_attr($this->options['code1']); ?> url="xxx"]
102
  <select name="properties[use-inline]">
103
  <option value="" <?php if($this->options['use-inline'] == '') echo 'selected="selected"'; ?>><?php _e('No use', $this->text_domain); ?></option>
104
  <option value="1" <?php if($this->options['use-inline'] == '1') echo 'selected="selected"'; ?>><?php _e('Use to excerpt', $this->text_domain); ?></option>
105
  <option value="2" <?php if($this->options['use-inline'] == '2') echo 'selected="selected"'; ?>><?php _e('Use to title', $this->text_domain); ?></option>
106
  </select>
107
- [/<?php echo esc_attr($this->options['code1']); ?>]
108
  <p><?php _e('This setting applies only to the Shortcode1', $this->text_domain); ?></p></td>
109
  </td>
110
  </tr>
@@ -123,37 +195,38 @@
123
  <td><input name="properties[code4]" type="text" id="inputtext" value="<?php echo esc_attr($this->options['code4']); ?>" class="regular-text" />
124
  <p><?php _e('Case-sensitive', $this->text_domain); ?></p></td>
125
  </tr>
126
-
127
  <tr valign="top">
128
- <th scope="row"><?php _e('Special Format', $this->text_domain); ?></th>
129
  <td>
130
- <select name="properties[special-format]">
131
- <option value="" <?php if($this->options['special-format'] == '') echo 'selected="selected"'; ?>><?php _e('None', $this->text_domain); ?></option>
132
- <option value="LkC" <?php if($this->options['special-format'] == 'LkC') echo 'selected="selected"'; ?>><?php _e('Pz-LkC Default', $this->text_domain); ?></option>
133
- <option value="ct1" <?php if($this->options['special-format'] == 'ct1') echo 'selected="selected"'; ?>><?php _e('Cellophane tape "center"', $this->text_domain); ?></option>
134
- <option value="ct2" <?php if($this->options['special-format'] == 'ct2') echo 'selected="selected"'; ?>><?php _e('Cellophane tape "Top corner"', $this->text_domain); ?></option>
135
- <option value="ct3" <?php if($this->options['special-format'] == 'ct3') echo 'selected="selected"'; ?>><?php _e('Cellophane tape "long"', $this->text_domain); ?></option>
136
- <option value="slt" <?php if($this->options['special-format'] == 'slt') echo 'selected="selected"'; ?>><?php _e('Slanting', $this->text_domain); ?></option>
137
- <option value="3Dr" <?php if($this->options['special-format'] == '3Dr') echo 'selected="selected"'; ?>><?php _e('3D Rotate', $this->text_domain); ?></option>
138
- <option value="ppc" <?php if($this->options['special-format'] == 'ppc') echo 'selected="selected"'; ?>><?php _e('Curling paper', $this->text_domain); ?></option>
139
- <option value="tac" <?php if($this->options['special-format'] == 'tac') echo 'selected="selected"'; ?>><?php _e('Taping and curling', $this->text_domain); ?></option>
140
- <option value="inN" <?php if($this->options['special-format'] == 'inN') echo 'selected="selected"'; ?>><?php _e('Neutral', $this->text_domain); ?></option>
141
- <option value="inI" <?php if($this->options['special-format'] == 'inI') echo 'selected="selected"'; ?>><?php _e('Orange', $this->text_domain); ?></option>
142
- <option value="inE" <?php if($this->options['special-format'] == 'inE') echo 'selected="selected"'; ?>><?php _e('Green', $this->text_domain); ?></option>
143
- <option value="inR" <?php if($this->options['special-format'] == 'inR') echo 'selected="selected"'; ?>><?php _e('Blue', $this->text_domain); ?></option>
144
- </select>
145
- <br><?php _e('Will some of the parameters are forcibly changed', $this->text_domain); ?></td>
146
- </td>
147
  </tr>
148
  </table>
149
  <?php submit_button(); ?>
150
 
151
  <h3><?php _e('Style', $this->text_domain); ?></h3>
152
  <table class="form-table">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
153
  <tr valign="top">
154
  <th scope="row"><?php _e('Position', $this->text_domain); ?></th>
155
  <td>
156
- <table style="border: 1px dashed #000; background-color: #eee;">
157
  <tr>
158
  <td>
159
  </td>
@@ -286,16 +359,6 @@
286
  </td>
287
  </tr>
288
 
289
- <tr valign="top">
290
- <th scope="row"><?php _e('Link the whole', $this->text_domain); ?></th>
291
- <td>
292
- <label>
293
- <input name="properties[link-all]" type="checkbox" id="check" value="1" <?php checked(isset($this->options['link-all']) ? $this->options['link-all'] : null, 1); ?> />
294
- <?php _e('Enclose the entire card at anchor', $this->text_domain); ?>
295
- </label>
296
- </td>
297
- </tr>
298
-
299
  <tr valign="top">
300
  <th scope="row"><?php _e('Border', $this->text_domain); ?></th>
301
  <td>
@@ -326,11 +389,12 @@
326
  </label>
327
  </td>
328
  </tr>
 
329
  <tr>
330
  <th scope="row"></th>
331
  <td>
332
 
333
- <table style="border: 1px solid #000; background-color: #fff;">
334
  <tr>
335
  <td colspan="2">
336
  <?php _e('Site information', $this->text_domain); ?>
@@ -362,8 +426,6 @@
362
  </select>
363
  <br>
364
  <label><input name="properties[thumbnail-shadow]" type="checkbox" id="check" value="1" <?php checked(isset($this->options['thumbnail-shadow']) ? $this->options['thumbnail-shadow'] : null, 1); ?> /><?php _e('Shadow', $this->text_domain); ?></label>
365
- <br>
366
- <label><input name="properties[thumbnail-resize]" type="checkbox" id="check" value="1" <?php checked(isset($this->options['thumbnail-resize']) ? $this->options['thumbnail-resize'] : null, 1); ?> /><?php _e('Resize', $this->text_domain); ?></label>
367
  </td>
368
  </tr>
369
  <tr>
@@ -391,6 +453,11 @@
391
  <td><label><input name="properties[shadow]" type="checkbox" id="check" value="1" <?php checked(isset($this->options['shadow']) ? $this->options['shadow'] : null, 1); ?> /><?php _e('Shadow', $this->text_domain); ?></label></td>
392
  </tr>
393
 
 
 
 
 
 
394
  <tr valign="top">
395
  <th scope="row"><?php _e('Display SNS Count', $this->text_domain); ?></th>
396
  <td>
@@ -408,139 +475,83 @@
408
  </table>
409
  <?php submit_button(); ?>
410
 
411
- <h3><?php _e('Letters', $this->text_domain); ?></h3>
412
- <table class="form-table" style="max-width: 920px;">
 
413
  <tr valign="top">
414
  <th scope="row"><?php _e('Site-info.', $this->text_domain); ?></th>
415
  <td>
416
  <?php _e('Color', $this->text_domain); ?><input name="properties[color-info]" type="text" class="color-picker" id="pickedcolor" value="<?php echo esc_attr($this->options['color-info']); ?>" />
417
  </td>
418
  <td>
419
- &nbsp;<?php _e('Size', $this->text_domain); ?><select name="properties[size-info]">
420
- <option value="9px" <?php if($this->options['size-info'] == '9px') echo 'selected="selected"'; ?>><?php _e('9px', $this->text_domain); ?></option>
421
- <option value="11px" <?php if($this->options['size-info'] == '11px') echo 'selected="selected"'; ?>><?php _e('11px', $this->text_domain); ?></option>
422
- <option value="12px" <?php if($this->options['size-info'] == '12px') echo 'selected="selected"'; ?>><?php _e('12px', $this->text_domain); ?></option>
423
- <option value="13px" <?php if($this->options['size-info'] == '13px') echo 'selected="selected"'; ?>><?php _e('13px', $this->text_domain); ?></option>
424
- <option value="14px" <?php if($this->options['size-info'] == '14px') echo 'selected="selected"'; ?>><?php _e('14px', $this->text_domain); ?></option>
425
- <option value="60%" <?php if($this->options['size-info'] == '60%') echo 'selected="selected"'; ?>><?php _e('60%', $this->text_domain); ?></option>
426
- <option value="70%" <?php if($this->options['size-info'] == '70%') echo 'selected="selected"'; ?>><?php _e('70%', $this->text_domain); ?></option>
427
- <option value="80%" <?php if($this->options['size-info'] == '80%') echo 'selected="selected"'; ?>><?php _e('80%', $this->text_domain); ?></option>
428
- <option value="90%" <?php if($this->options['size-info'] == '90%') echo 'selected="selected"'; ?>><?php _e('90%', $this->text_domain); ?></option>
429
- <option value="100%" <?php if($this->options['size-info'] == '100%') echo 'selected="selected"'; ?>><?php _e('100%', $this->text_domain); ?></option>
430
- </select>
431
  </td>
432
  <td>
433
- &nbsp;<?php _e('Length', $this->text_domain); ?><input name="properties[trim-sitename]" type="text" id="inputtext" value="<?php echo intval(isset($this->options['trim-sitename']) ? $this->options['trim-sitename'] : $this->defaults['trim-sitename']); ?>" style="width: 3em;" />
434
  </td>
435
  <td>
436
  <label><input name="properties[outline-info]" type="checkbox" id="check" value="1" <?php checked(isset($this->options['outline-info']) ? $this->options['outline-info'] : null, 1); ?> /><?php _e('Outline', $this->text_domain); ?></label>
437
- </td>
438
- <td>
439
- <?php _e('Color', $this->text_domain); ?><input name="properties[outline-color-info]" type="text" class="color-picker" id="pickedcolor" value="<?php echo esc_attr((isset($this->options['outline-color-info']) ? $this->options['outline-color-info'] : $this->defaults['outline-color-info'])); ?>" />
440
  </td>
441
  </tr>
 
442
  <tr valign="top">
443
  <th scope="row"><?php _e('Title', $this->text_domain); ?></th>
444
  <td>
445
  <?php _e('Color', $this->text_domain); ?><input name="properties[color-title]" type="text" class="color-picker" id="pickedcolor" value="<?php echo esc_attr($this->options['color-title']); ?>" />
446
  </td>
447
  <td>
448
- &nbsp;<?php _e('Size', $this->text_domain); ?><select name="properties[size-title]">
449
- <option value="14px" <?php if($this->options['size-title'] == '14px') echo 'selected="selected"'; ?>><?php _e('14px', $this->text_domain); ?></option>
450
- <option value="16px" <?php if($this->options['size-title'] == '16px') echo 'selected="selected"'; ?>><?php _e('16px', $this->text_domain); ?></option>
451
- <option value="18px" <?php if($this->options['size-title'] == '18px') echo 'selected="selected"'; ?>><?php _e('18px', $this->text_domain); ?></option>
452
- <option value="20px" <?php if($this->options['size-title'] == '20px') echo 'selected="selected"'; ?>><?php _e('20px', $this->text_domain); ?></option>
453
- <option value="24px" <?php if($this->options['size-title'] == '24px') echo 'selected="selected"'; ?>><?php _e('24px', $this->text_domain); ?></option>
454
- <option value="100%" <?php if($this->options['size-title'] == '100%') echo 'selected="selected"'; ?>><?php _e('100%', $this->text_domain); ?></option>
455
- <option value="120%" <?php if($this->options['size-title'] == '120%') echo 'selected="selected"'; ?>><?php _e('120%', $this->text_domain); ?></option>
456
- <option value="140%" <?php if($this->options['size-title'] == '140%') echo 'selected="selected"'; ?>><?php _e('140%', $this->text_domain); ?></option>
457
- </select>
458
  </td>
459
  <td>
460
- &nbsp;<?php _e('Length', $this->text_domain); ?><input name="properties[trim-title]" type="text" id="inputtext" value="<?php echo intval(isset($this->options['trim-title']) ? $this->options['trim-title'] : $this->defaults['trim-title']); ?>" style="width: 3em;" />
461
  </td>
462
  <td>
463
  <label><input name="properties[outline-title]" type="checkbox" id="check" value="1" <?php checked(isset($this->options['outline-title']) ? $this->options['outline-title'] : null, 1); ?> /><?php _e('Outline', $this->text_domain); ?></label>
464
- </td>
465
- <td>
466
- <?php _e('Color', $this->text_domain); ?><input name="properties[outline-color-title]" type="text" class="color-picker" id="pickedcolor" value="<?php echo esc_attr((isset($this->options['outline-color-title']) ? $this->options['outline-color-title'] : $this->defaults['outline-color-title'])); ?>" />
467
  </td>
468
  </tr>
 
469
  <tr valign="top">
470
  <th scope="row"><?php _e('URL', $this->text_domain); ?></th>
471
  <td>
472
  <?php _e('Color', $this->text_domain); ?><input name="properties[color-url]" type="text" class="color-picker" id="pickedcolor" value="<?php echo esc_attr($this->options['color-url']); ?>" />
473
  </td>
474
  <td>
475
- &nbsp;<?php _e('Size', $this->text_domain); ?><select name="properties[size-url]">
476
- <option value="9px" <?php if($this->options['size-url'] == '9px') echo 'selected="selected"'; ?>><?php _e('9px', $this->text_domain); ?></option>
477
- <option value="12px" <?php if($this->options['size-url'] == '12px') echo 'selected="selected"'; ?>><?php _e('12px', $this->text_domain); ?></option>
478
- <option value="14px" <?php if($this->options['size-url'] == '14px') echo 'selected="selected"'; ?>><?php _e('14px', $this->text_domain); ?></option>
479
- <option value="70%" <?php if($this->options['size-url'] == '70%') echo 'selected="selected"'; ?>><?php _e('70%', $this->text_domain); ?></option>
480
- <option value="80%" <?php if($this->options['size-url'] == '80%') echo 'selected="selected"'; ?>><?php _e('80%', $this->text_domain); ?></option>
481
- <option value="90%" <?php if($this->options['size-url'] == '90%') echo 'selected="selected"'; ?>><?php _e('90%', $this->text_domain); ?></option>
482
- <option value="100%" <?php if($this->options['size-url'] == '100%') echo 'selected="selected"'; ?>><?php _e('100%', $this->text_domain); ?></option>
483
- </select>
484
  </td>
485
  <td>
486
  </td>
487
  <td>
488
  <label><input name="properties[outline-url]" type="checkbox" id="check" value="1" <?php checked(isset($this->options['outline-url']) ? $this->options['outline-url'] : null, 1); ?> /><?php _e('Outline', $this->text_domain); ?></label>
489
- </td>
490
- <td>
491
- <?php _e('Color', $this->text_domain); ?><input name="properties[outline-color-url]" type="text" class="color-picker" id="pickedcolor" value="<?php echo esc_attr((isset($this->options['outline-color-url']) ? $this->options['outline-color-url'] : $this->defaults['outline-color-url'])); ?>" />
492
  </td>
493
  </tr>
 
494
  <tr valign="top">
495
  <th scope="row"><?php _e('Excerpt', $this->text_domain); ?></th>
496
  <td>
497
  <?php _e('Color', $this->text_domain); ?><input name="properties[color-excerpt]" type="text" class="color-picker" id="pickedcolor" value="<?php echo esc_attr($this->options['color-excerpt']); ?>" />
498
  </td>
499
  <td>
500
- &nbsp;<?php _e('Size', $this->text_domain); ?><select name="properties[size-excerpt]">
501
- <option value="9px" <?php if($this->options['size-excerpt'] == '9px') echo 'selected="selected"'; ?>><?php _e('9px', $this->text_domain); ?></option>
502
- <option value="11px" <?php if($this->options['size-excerpt'] == '11px') echo 'selected="selected"'; ?>><?php _e('11px', $this->text_domain); ?></option>
503
- <option value="12px" <?php if($this->options['size-excerpt'] == '12px') echo 'selected="selected"'; ?>><?php _e('12px', $this->text_domain); ?></option>
504
- <option value="14px" <?php if($this->options['size-excerpt'] == '14px') echo 'selected="selected"'; ?>><?php _e('14px', $this->text_domain); ?></option>
505
- <option value="70%" <?php if($this->options['size-excerpt'] == '70%') echo 'selected="selected"'; ?>><?php _e('70%', $this->text_domain); ?></option>
506
- <option value="80%" <?php if($this->options['size-excerpt'] == '80%') echo 'selected="selected"'; ?>><?php _e('80%', $this->text_domain); ?></option>
507
- <option value="90%" <?php if($this->options['size-excerpt'] == '90%') echo 'selected="selected"'; ?>><?php _e('90%', $this->text_domain); ?></option>
508
- <option value="100%" <?php if($this->options['size-excerpt'] == '100%') echo 'selected="selected"'; ?>><?php _e('100%', $this->text_domain); ?></option>
509
- </select>
510
  </td>
511
  <td>
512
- &nbsp;<?php _e('Length', $this->text_domain); ?><input name="properties[trim-count]" type="text" id="inputtext" value="<?php echo intval(isset($this->options['trim-count']) ? $this->options['trim-count'] : $this->defaults['trim-sount']); ?>" style="width: 3em;" />
513
  </td>
514
  <td>
515
  <label><input name="properties[outline-excerpt]" type="checkbox" id="check" value="1" <?php checked(isset($this->options['outline-excerpt']) ? $this->options['outline-excerpt'] : null, 1); ?> /><?php _e('Outline', $this->text_domain); ?></label>
516
- </td>
517
- <td>
518
- <?php _e('Color', $this->text_domain); ?><input name="properties[outline-color-excerpt]" type="text" class="color-picker" id="pickedcolor" value="<?php echo esc_attr((isset($this->options['outline-color-excerpt']) ? $this->options['outline-color-excerpt'] : $this->defaults['outline-color-excerpt'])); ?>" />
519
- </td>
520
- </tr>
521
- <tr valign="top" style="display: none;">
522
- <th scope="row"><?php _e('Plugin link', $this->text_domain); ?></th>
523
- <td valign="top">
524
- <?php _e('Color', $this->text_domain); ?><input name="properties[color-plugin]" type="text" class="color-picker" id="pickedcolor" value="<?php echo esc_attr($this->options['color-plugin']); ?>" />
525
- </td>
526
- <td>
527
- &nbsp;<?php _e('Size', $this->text_domain); ?><select name="properties[size-plugin]">
528
- <option value="4px" <?php if($this->options['size-info'] == '4px') echo 'selected="selected"'; ?>><?php _e('4px', $this->text_domain); ?></option>
529
- <option value="6px" <?php if($this->options['size-info'] == '6px') echo 'selected="selected"'; ?>><?php _e('4px', $this->text_domain); ?></option>
530
- <option value="9px" <?php if($this->options['size-info'] == '9px') echo 'selected="selected"'; ?>><?php _e('9px', $this->text_domain); ?></option>
531
- <option value="60%" <?php if($this->options['size-info'] == '60%') echo 'selected="selected"'; ?>><?php _e('60%', $this->text_domain); ?></option>
532
- </select>
533
- </td>
534
- <td>
535
- </td>
536
- <td>
537
  </td>
538
  </tr>
539
- <tr valign="top" style="display: none;">
540
- <th scope="row"><?php _e('Plugin-link', $this->text_domain); ?></th>
541
- <td><input name="properties[color-plugin]" type="text" class="color-picker" id="pickedcolor" value="<?php echo esc_attr($this->options['color-plugin']); ?>" /></td>
542
  </tr>
543
-
544
  </table>
545
  <?php submit_button(); ?>
546
 
@@ -565,6 +576,7 @@
565
  <option value="3" <?php if($this->options['ex-thumbnail'] == '3') echo 'selected="selected"'; ?>><?php _e('Use WebAPI', $this->text_domain); ?></option>
566
  <option value="13" <?php if($this->options['ex-thumbnail'] == '13') echo 'selected="selected"'; ?> disabled="disabled"><?php _e('Use WebAPI ,If can not direct', $this->text_domain); ?></option>
567
  </select>
 
568
  </td>
569
  </tr>
570
  <tr valign="top">
@@ -574,6 +586,7 @@
574
  <option value="" <?php if($this->options['ex-favicon'] == '') echo 'selected="selected"'; ?>><?php _e('None', $this->text_domain); ?></option>
575
  <option value="1" <?php if($this->options['ex-favicon'] == '1') echo 'selected="selected"'; ?> disabled="disabled"><?php _e('Direct', $this->text_domain); ?></option>
576
  <option value="3" <?php if($this->options['ex-favicon'] == '3') echo 'selected="selected"'; ?>><?php _e('Use WebAPI', $this->text_domain); ?></option>
 
577
  </select>
578
  </td>
579
  </tr>
@@ -591,7 +604,21 @@
591
  </select>
592
  </td>
593
  </tr>
594
- </table>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
595
  <?php submit_button(); ?>
596
 
597
  <h3><?php _e('Internal link', $this->text_domain); ?></h3>
@@ -608,7 +635,7 @@
608
  <th scope="row"><?php _e('Thumbnail', $this->text_domain); ?></th>
609
  <td>
610
  <select name="properties[in-thumbnail]">
611
- <option value="" <?php if($this->options['in-thumbnail'] == '') echo 'selected="selected"'; ?>><?php _e('None', $this->text_domain); ?></option>
612
  <option value="1" <?php if($this->options['in-thumbnail'] == '1') echo 'selected="selected"'; ?>><?php _e('Direct', $this->text_domain); ?></option>
613
  <option value="3" <?php if($this->options['in-thumbnail'] == '3') echo 'selected="selected"'; ?>><?php _e('Use WebAPI', $this->text_domain); ?></option>
614
  <option value="13" <?php if($this->options['in-thumbnail'] == '13') echo 'selected="selected"'; ?>><?php _e('Use WebAPI ,If can not direct', $this->text_domain); ?></option>
@@ -622,6 +649,7 @@
622
  <option value="" <?php if($this->options['in-favicon'] == '') echo 'selected="selected"'; ?>><?php _e('None', $this->text_domain); ?></option>
623
  <option value="1" <?php if($this->options['in-favicon'] == '1') echo 'selected="selected"'; ?> <?php if(!function_exists('has_site_icon') || !has_site_icon()) echo 'disabled="disabled"'; ?>><?php _e('Direct', $this->text_domain); ?></option>
624
  <option value="3" <?php if($this->options['in-favicon'] == '3') echo 'selected="selected"'; ?>><?php _e('Use WebAPI', $this->text_domain); ?></option>
 
625
  </select>
626
  </td>
627
  </tr>
@@ -643,10 +671,10 @@
643
  <th scope="row"><?php _e('Get contents', $this->text_domain); ?></th>
644
  <td>
645
  <select name="properties[in-get]">
646
- <?php $in_get = (isset($this->options['in-get']) ? $this->options['in-get'] : ''); ?>
647
- <option value="" <?php if($in_get == '') echo 'selected="selected"'; ?>><?php _e('Always get the latest from the content', $this->text_domain); ?></option>
648
- <option value="1" <?php if($in_get == '1') echo 'selected="selected"'; ?>><?php _e('Always get the latest from the excerpt', $this->text_domain); ?></option>
649
- <option value="2" <?php if($in_get == '2') echo 'selected="selected"'; ?>><?php _e('Initially acquired only from the content', $this->text_domain); ?></option>
650
  </select>
651
  </td>
652
  </tr>
@@ -686,42 +714,61 @@
686
  <table class="form-table"
687
  <tr valign="top">
688
  <th scope="row"><?php _e('Favicon API', $this->text_domain); ?></th>
689
- <td><input name="properties[favicon-api]" type="text" id="inputtext" value="<?php echo esc_attr($this->options['favicon-api']); ?>" size="80" />
690
- <p><?php _e('%DOMAIN% replace to domain name (ex. poporon.poponet.jp )<br>%DOMAIN_URL% replace to domain URL (ex. http://poporon.poponet.jp )', $this->text_domain); ?></p></td>
 
 
 
 
691
  </tr>
692
  <tr valign="top">
693
- <th scope="row"><?php _e('Thumbnail API', $this->text_domain); ?></th>
694
- <td><input name="properties[thumbnail-api]" type="text" id="inputtext" value="<?php echo esc_attr($this->options['thumbnail-api']); ?>" size="80" />
695
- <p><?php _e('%URL% replace to URL', $this->text_domain); ?></p></td>
 
 
 
 
696
  </tr>
697
  </table>
698
  <?php submit_button(); ?>
699
 
700
- <h3><?php _e('Debug', $this->text_domain); ?></h3>
701
  <table class="form-table">
702
  <tr valign="top">
703
- <th scope="row"><?php _e('Trailing slash', $this->text_domain); ?></th>
704
- <td><label><input name="properties[trail-slash]" type="checkbox" id="check" value="1" <?php checked(isset($this->options['trail-slash']) ? $this->options['trail-slash'] : null, 1); ?> /><?php _e('In the case of domain names, to ignore the trailing-slash.', $this->text_domain); ?></label></td>
705
  </tr>
706
  <tr valign="top">
707
- <th scope="row"><?php _e('Use blockquote tag', $this->text_domain); ?></th>
708
- <td><label><input name="properties[blockquote]" type="checkbox" id="check" value="1" <?php checked(isset($this->options['blockquote']) ? $this->options['blockquote'] : null, 1); ?> /><?php _e('without using DIV tag, and use BLOCKQUOTE tag', $this->text_domain); ?></label></td>
709
  </tr>
710
  <tr valign="top">
711
- <th scope="row"><?php _e('Set nofollow', $this->text_domain); ?></th>
712
- <td><label><input name="properties[nofollow]" type="checkbox" id="check" value="1" <?php checked(isset($this->options['nofollow']) ? $this->options['nofollow'] : null, 1); ?> /><?php _e('In the case of an external site, it puts the "nofollow"', $this->text_domain); ?></label></td>
713
  </tr>
 
 
714
 
 
 
715
  <tr valign="top">
716
- <th scope="row"><?php _e('Reset img style', $this->text_domain); ?></th>
717
- <td><label><input name="properties[style-reset-img]" type="checkbox" id="check" value="1" <?php checked(isset($this->options['style-reset-img']) ? $this->options['style-reset-img'] : null, 1); ?> /><?php _e('When unnecessary frame is displayed on the image, you can improve it by case', $this->text_domain); ?></label></td>
 
 
 
 
 
 
 
718
  </tr>
719
 
720
- <tr valign="top">
721
  <th scope="row"><?php _e('specified CSS', $this->text_domain); ?></th>
722
  <td><label><input name="properties[style]" type="checkbox" id="check" value="1" <?php checked(isset($this->options['style']) ? $this->options['style'] : null, 1); ?> /><?php _e('Use specified CSS file', $this->text_domain); ?></label></td>
723
  </tr>
724
- <tr valign="top">
725
  <th scope="row"><?php _e('CSS file', $this->text_domain); ?></th>
726
  <td><input name="properties[css-file]" type="text" id="inputtext" value="<?php echo esc_attr($this->options['css-file']); ?>" size="80" /><br><p><?php _e('(ex. http://exsample.com/style.css )', $this->text_domain); ?></p></td>
727
  </tr>
@@ -743,22 +790,7 @@
743
  <td><input name="properties[class-mobile]" type="text" id="inputtext" value="<?php echo (isset($this->options['class-mobile']) ? esc_attr($this->options['class-mobile']) : ''); ?>" size="40" /><br>
744
  </tr>
745
 
746
- <tr valign="top">
747
- <th scope="row"><?php _e('Use HatenaBlogCard', $this->text_domain); ?></th>
748
- <td><label><input name="properties[use-hatena]" type="checkbox" id="check" value="1" <?php checked(isset($this->options['use-hatena']) ? $this->options['use-hatena'] : null, 1); ?> /><?php _e('External links will use Always HatenaBlogCard.', $this->text_domain); _e('(Not recommended)', $this->text_domain); ?></label></td>
749
- </tr>
750
-
751
- <tr valign="top">
752
- <th scope="row"><?php _e('SSL verification disabled', $this->text_domain); ?></th>
753
- <td><label><input name="properties[flg-ssl]" type="checkbox" id="check" value="1" <?php checked(isset($this->options['flg-ssl']) ? $this->options['flg-ssl'] : null, 1); ?> /><?php _e('Try setting if the contents of the SSL site can not be acquired.', $this->text_domain); _e('(Not recommended)', $this->text_domain); ?></label></td>
754
- </tr>
755
-
756
- <tr valign="top">
757
- <th scope="row"><?php _e('Broken link checker', $this->text_domain); ?></th>
758
- <td><label><input name="properties[flg-alive]" type="checkbox" id="check" value="1" <?php checked(isset($this->options['flg-alive']) ? $this->options['flg-alive'] : null, 1); ?> /><?php _e('Alive confirmation of the link destination.', $this->text_domain); ?></label></td>
759
- </tr>
760
-
761
- <tr valign="top">
762
  <th scope="row"><?php _e('Display link to author page', $this->text_domain); ?></th>
763
  <td><input name="properties[plugin-link]" type="checkbox" id="check" value="1" <?php checked(isset($this->options['plugin-link']) ? $this->options['plugin-link'] : null, 1); ?> disabled="disabled" /><a href="<?php echo $this->options['plugin-url']; ?>" target="_blank"><?php echo $this->options['plugin-name']; ?></a></td>
764
  </tr>
@@ -781,7 +813,7 @@
781
 
782
  <tr valign="top">
783
  <th scope="row"><?php _e('Display elapsed time', $this->text_domain); ?></th>
784
- <td><label><input name="properties[debug-time]" type="checkbox" id="check" value="1" <?php checked(isset($this->options['debug-time']) ? $this->options['debug-time'] : null, 1); ?> /><?php _e('Output the elapsed time to HTML comment.', $this->text_domain); ?></label></td>
785
  </tr>
786
 
787
  </table>
@@ -796,6 +828,18 @@
796
  </table>
797
  <?php submit_button(); ?>
798
 
 
 
 
 
 
 
 
 
 
 
 
 
799
  </form>
800
  </div>
801
  </div>
38
  echo '<div class="error fade"><p><strong>'.__('Short code is not set.', $this->text_domain).'</strong></p></div>';
39
  $result = false;
40
  }
41
+
42
  $width = $this->options['width'];
43
  if (substr($width, -1 ) == '%') {
44
  $this->options['width'] = preg_replace('/[^0-9]/', '', $width).'%';
45
  } else {
46
  $width = preg_replace('/[^0-9]/', '', $width);
47
  if ($width == '') {
48
+ $this->options['width'] = $this->defaults['width'];
49
  } else {
50
  $this->options['width'] = $width.'px';
51
  }
52
  }
53
+
54
  $height = preg_replace('/[^0-9]/', '', $this->options['content-height']);
55
  if ($height == '') {
56
+ $this->options['content-height'] = $this->defaults['content-height'];
57
  } else {
58
  $this->options['content-height'] = $height.'px';
59
  }
60
+
61
  $trim_count = preg_replace('/[^0-9]/', '', $this->options['trim-title']) - 0;
62
  if ($trim_count == 0) {
63
  $trim_count = $this->defaults['trim-title'];
64
  }
65
  $this->options['trim-title'] = $trim_count;
66
+
67
  $trim_count = preg_replace('/[^0-9]/', '', $this->options['trim-count']) - 0;
68
  if ($trim_count == 0) {
69
  $trim_count = $this->defaults['trim-count'];
70
  }
71
  $this->options['trim-count'] = $trim_count;
72
+
73
  $trim_count = preg_replace('/[^0-9]/', '', $this->options['trim-sitename']) - 0;
74
  if ($trim_count == 0) {
75
  $trim_count = $this->defaults['trim-sitename'];
76
  }
77
  $this->options['trim-sitename'] = $trim_count;
78
 
79
+ $trim_count = preg_replace('/[^0-9]/', '', $this->options['size-title']) - 0;
80
+ if ($trim_count == 0) {
81
+ $trim_count = $this->defaults['size-title'];
82
+ }
83
+ $this->options['size-title'] = $trim_count.'px';
84
+ $trim_count = preg_replace('/[^0-9]/', '', $this->options['height-title']) - 0;
85
+ if ($trim_count == 0) {
86
+ $trim_count = $this->defaults['height-title'];
87
+ }
88
+ $this->options['height-title'] = $trim_count.'px';
89
+
90
+ $trim_count = preg_replace('/[^0-9]/', '', $this->options['size-url']) - 0;
91
+ if ($trim_count == 0) {
92
+ $trim_count = $this->defaults['size-url'];
93
+ }
94
+ $this->options['size-url'] = $trim_count.'px';
95
+ $trim_count = preg_replace('/[^0-9]/', '', $this->options['height-url']) - 0;
96
+ if ($trim_count == 0) {
97
+ $trim_count = $this->defaults['height-url'];
98
+ }
99
+ $this->options['height-url'] = $trim_count.'px';
100
+
101
+ $trim_count = preg_replace('/[^0-9]/', '', $this->options['size-excerpt']) - 0;
102
+ if ($trim_count == 0) {
103
+ $trim_count = $this->defaults['size-excerpt'];
104
+ }
105
+ $this->options['size-excerpt'] = $trim_count.'px';
106
+ $trim_count = preg_replace('/[^0-9]/', '', $this->options['height-excerpt']) - 0;
107
+ if ($trim_count == 0) {
108
+ $trim_count = $this->defaults['height-excerpt'];
109
+ }
110
+ $this->options['height-excerpt'] = $trim_count.'px';
111
+
112
+ $trim_count = preg_replace('/[^0-9]/', '', $this->options['size-info']) - 0;
113
+ if ($trim_count == 0) {
114
+ $trim_count = $this->defaults['size-info'];
115
+ }
116
+ $this->options['size-info'] = $trim_count.'px';
117
+ $trim_count = preg_replace('/[^0-9]/', '', $this->options['height-info']) - 0;
118
+ if ($trim_count == 0) {
119
+ $trim_count = $this->defaults['height-info'];
120
+ }
121
+ $this->options['height-info'] = $trim_count.'px';
122
+
123
  if ($result == true) {
124
  $result = update_option('Pz_LinkCard_options', $this->options);
125
  if ($result == true) {
130
  $this->pz_SetStyle();
131
  }
132
  }
 
 
 
133
  ?>
134
  <form action="" method="post">
135
  <?php wp_nonce_field('pz_options'); ?>
136
 
137
+ <h3><?php _e('Special format', $this->text_domain); ?></h3>
138
+ <table class="form-table">
139
+ <tr valign="top">
140
+ <th scope="row"><?php _e('Tiny format', $this->text_domain); ?></th>
141
+ <td>
142
+ <select name="properties[special-format]">
143
+ <option value="" <?php if($this->options['special-format'] == '') echo 'selected="selected"'; ?>><?php _e('None', $this->text_domain); ?></option>
144
+ <option value="LkC" <?php if($this->options['special-format'] == 'LkC') echo 'selected="selected"'; ?>><?php _e('Pz-LkC Default', $this->text_domain); ?></option>
145
+ <option value="ct1" <?php if($this->options['special-format'] == 'ct1') echo 'selected="selected"'; ?>><?php _e('Cellophane tape "center"', $this->text_domain); ?></option>
146
+ <option value="ct2" <?php if($this->options['special-format'] == 'ct2') echo 'selected="selected"'; ?>><?php _e('Cellophane tape "Top corner"', $this->text_domain); ?></option>
147
+ <option value="ct3" <?php if($this->options['special-format'] == 'ct3') echo 'selected="selected"'; ?>><?php _e('Cellophane tape "long"', $this->text_domain); ?></option>
148
+ <option value="slt" <?php if($this->options['special-format'] == 'slt') echo 'selected="selected"'; ?>><?php _e('Slanting', $this->text_domain); ?></option>
149
+ <option value="3Dr" <?php if($this->options['special-format'] == '3Dr') echo 'selected="selected"'; ?>><?php _e('3D Rotate', $this->text_domain); ?></option>
150
+ <option value="ppc" <?php if($this->options['special-format'] == 'ppc') echo 'selected="selected"'; ?>><?php _e('Curling paper', $this->text_domain); ?></option>
151
+ <option value="tac" <?php if($this->options['special-format'] == 'tac') echo 'selected="selected"'; ?>><?php _e('Taping and curling', $this->text_domain); ?></option>
152
+ <option value="inN" <?php if($this->options['special-format'] == 'inN') echo 'selected="selected"'; ?>><?php _e('Neutral', $this->text_domain); ?></option>
153
+ <option value="inI" <?php if($this->options['special-format'] == 'inI') echo 'selected="selected"'; ?>><?php _e('Orange', $this->text_domain); ?></option>
154
+ <option value="inE" <?php if($this->options['special-format'] == 'inE') echo 'selected="selected"'; ?>><?php _e('Green', $this->text_domain); ?></option>
155
+ <option value="inR" <?php if($this->options['special-format'] == 'inR') echo 'selected="selected"'; ?>><?php _e('Blue', $this->text_domain); ?></option>
156
+ </select>
157
+ <br><span style="color: #ff8844;"><?php _e('* It applies over other formatting settings.', $this->text_domain); ?></span>
158
+ </td>
159
+ </tr>
160
+ </table>
161
+ <?php submit_button(); ?>
162
+
163
+ <h3><?php _e('Shortcode', $this->text_domain); ?></h3>
164
  <table class="form-table">
165
  <tr valign="top">
166
  <th scope="row"><?php _e('ShortCode1', $this->text_domain); ?></th>
170
  <tr valign="top">
171
  <th scope="row"><?php _e('Use inlinetext', $this->text_domain); ?></th>
172
  <td>
173
+ [<span style="color: #888888;"><?php echo esc_attr($this->options['code1']); ?></span> url="xxx"]
174
  <select name="properties[use-inline]">
175
  <option value="" <?php if($this->options['use-inline'] == '') echo 'selected="selected"'; ?>><?php _e('No use', $this->text_domain); ?></option>
176
  <option value="1" <?php if($this->options['use-inline'] == '1') echo 'selected="selected"'; ?>><?php _e('Use to excerpt', $this->text_domain); ?></option>
177
  <option value="2" <?php if($this->options['use-inline'] == '2') echo 'selected="selected"'; ?>><?php _e('Use to title', $this->text_domain); ?></option>
178
  </select>
179
+ [/<span style="color: #888888;"><?php echo esc_attr($this->options['code1']); ?></span>]
180
  <p><?php _e('This setting applies only to the Shortcode1', $this->text_domain); ?></p></td>
181
  </td>
182
  </tr>
195
  <td><input name="properties[code4]" type="text" id="inputtext" value="<?php echo esc_attr($this->options['code4']); ?>" class="regular-text" />
196
  <p><?php _e('Case-sensitive', $this->text_domain); ?></p></td>
197
  </tr>
 
198
  <tr valign="top">
199
+ <th scope="row"><?php _e('Parameters', $this->text_domain); ?></th>
200
  <td>
201
+ [<span style="color: #888888;"><?php echo esc_attr($this->options['code1']); ?></span> url="xxx" <span style="color: #4488ff; font-weight: bold;">title=</span>"xxx" <span style="color: #4488ff; font-weight: bold;">content=</span>"xxx"]<br>
202
+ <?php _e('For any shortcode you can change the title and excerpt with `title` parameter and `content` parameter', $this->text_domain); ?>
203
+ </ts>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
204
  </tr>
205
  </table>
206
  <?php submit_button(); ?>
207
 
208
  <h3><?php _e('Style', $this->text_domain); ?></h3>
209
  <table class="form-table">
210
+
211
+ <tr valign="top">
212
+ <th scope="row"><?php _e('Use blockquote tag', $this->text_domain); ?></th>
213
+ <td><label><input name="properties[blockquote]" type="checkbox" id="check" value="1" <?php checked(isset($this->options['blockquote']) ? $this->options['blockquote'] : null, 1); ?> /><?php _e('without using DIV tag, and use BLOCKQUOTE tag', $this->text_domain); ?></label></td>
214
+ </tr>
215
+
216
+ <tr valign="top">
217
+ <th scope="row"><?php _e('Link the whole', $this->text_domain); ?></th>
218
+ <td>
219
+ <label>
220
+ <input name="properties[link-all]" type="checkbox" id="check" value="1" <?php checked(isset($this->options['link-all']) ? $this->options['link-all'] : null, 1); ?> />
221
+ <?php _e('Enclose the entire card at anchor', $this->text_domain); ?>
222
+ </label>
223
+ </td>
224
+ </tr>
225
+
226
  <tr valign="top">
227
  <th scope="row"><?php _e('Position', $this->text_domain); ?></th>
228
  <td>
229
+ <table style="border: 1px dashed #000; background-color: #eee; width: 600px;">
230
  <tr>
231
  <td>
232
  </td>
359
  </td>
360
  </tr>
361
 
 
 
 
 
 
 
 
 
 
 
362
  <tr valign="top">
363
  <th scope="row"><?php _e('Border', $this->text_domain); ?></th>
364
  <td>
389
  </label>
390
  </td>
391
  </tr>
392
+
393
  <tr>
394
  <th scope="row"></th>
395
  <td>
396
 
397
+ <table style="border: 1px solid #000; background-color: #fff; width: 500px;">
398
  <tr>
399
  <td colspan="2">
400
  <?php _e('Site information', $this->text_domain); ?>
426
  </select>
427
  <br>
428
  <label><input name="properties[thumbnail-shadow]" type="checkbox" id="check" value="1" <?php checked(isset($this->options['thumbnail-shadow']) ? $this->options['thumbnail-shadow'] : null, 1); ?> /><?php _e('Shadow', $this->text_domain); ?></label>
 
 
429
  </td>
430
  </tr>
431
  <tr>
453
  <td><label><input name="properties[shadow]" type="checkbox" id="check" value="1" <?php checked(isset($this->options['shadow']) ? $this->options['shadow'] : null, 1); ?> /><?php _e('Shadow', $this->text_domain); ?></label></td>
454
  </tr>
455
 
456
+ <tr valign="top">
457
+ <th scope="row"><?php _e('Reset img style', $this->text_domain); ?></th>
458
+ <td><label><input name="properties[style-reset-img]" type="checkbox" id="check" value="1" <?php checked(isset($this->options['style-reset-img']) ? $this->options['style-reset-img'] : null, 1); ?> /><?php _e('When unnecessary frame is displayed on the image, you can improve it by case', $this->text_domain); ?></label></td>
459
+ </tr>
460
+
461
  <tr valign="top">
462
  <th scope="row"><?php _e('Display SNS Count', $this->text_domain); ?></th>
463
  <td>
475
  </table>
476
  <?php submit_button(); ?>
477
 
478
+ <h3><?php _e('Letters', $this->text_domain); ?></h3>
479
+ <table class="form-table" style="max-width: 900px;">
480
+
481
  <tr valign="top">
482
  <th scope="row"><?php _e('Site-info.', $this->text_domain); ?></th>
483
  <td>
484
  <?php _e('Color', $this->text_domain); ?><input name="properties[color-info]" type="text" class="color-picker" id="pickedcolor" value="<?php echo esc_attr($this->options['color-info']); ?>" />
485
  </td>
486
  <td>
487
+ &nbsp;<?php _e('Size', $this->text_domain); ?><input name="properties[size-info]" type="text" id="inputtext" value="<?php echo (isset($this->options['size-info']) ? $this->options['size-info'] : $this->defaults['size-info']); ?>" style="width: 4em;" />
488
+ <br>&nbsp;<?php _e('Height', $this->text_domain); ?><input name="properties[height-info]" type="text" id="inputtext" value="<?php echo (isset($this->options['height-info']) ? $this->options['height-info'] : $this->defaults['height-info']); ?>" style="width: 4em;" />
 
 
 
 
 
 
 
 
 
 
489
  </td>
490
  <td>
491
+ &nbsp;<?php _e('Length', $this->text_domain); ?><input name="properties[trim-sitename]" type="text" id="inputtext" value="<?php echo (isset($this->options['trim-sitename']) ? $this->options['trim-sitename'] : $this->defaults['trim-sitename']); ?>" style="width: 3em;" />
492
  </td>
493
  <td>
494
  <label><input name="properties[outline-info]" type="checkbox" id="check" value="1" <?php checked(isset($this->options['outline-info']) ? $this->options['outline-info'] : null, 1); ?> /><?php _e('Outline', $this->text_domain); ?></label>
495
+ <br><input name="properties[outline-color-info]" type="text" class="color-picker" id="pickedcolor" value="<?php echo esc_attr((isset($this->options['outline-color-info']) ? $this->options['outline-color-info'] : $this->defaults['outline-color-info'])); ?>" />
 
 
496
  </td>
497
  </tr>
498
+
499
  <tr valign="top">
500
  <th scope="row"><?php _e('Title', $this->text_domain); ?></th>
501
  <td>
502
  <?php _e('Color', $this->text_domain); ?><input name="properties[color-title]" type="text" class="color-picker" id="pickedcolor" value="<?php echo esc_attr($this->options['color-title']); ?>" />
503
  </td>
504
  <td>
505
+ &nbsp;<?php _e('Size', $this->text_domain); ?><input name="properties[size-title]" type="text" id="inputtext" value="<?php echo (isset($this->options['size-title']) ? $this->options['size-title'] : $this->defaults['size-title']); ?>" style="width: 4em;" />
506
+ <br>&nbsp;<?php _e('Height', $this->text_domain); ?><input name="properties[height-title]" type="text" id="inputtext" value="<?php echo (isset($this->options['height-title']) ? $this->options['height-title'] : $this->defaults['height-title']); ?>" style="width: 4em;" />
 
 
 
 
 
 
 
 
507
  </td>
508
  <td>
509
+ &nbsp;<?php _e('Length', $this->text_domain); ?><input name="properties[trim-title]" type="text" id="inputtext" value="<?php echo (isset($this->options['trim-title']) ? $this->options['trim-title'] : $this->defaults['trim-title']); ?>" style="width: 3em;" />
510
  </td>
511
  <td>
512
  <label><input name="properties[outline-title]" type="checkbox" id="check" value="1" <?php checked(isset($this->options['outline-title']) ? $this->options['outline-title'] : null, 1); ?> /><?php _e('Outline', $this->text_domain); ?></label>
513
+ <br><input name="properties[outline-color-title]" type="text" class="color-picker" id="pickedcolor" value="<?php echo esc_attr((isset($this->options['outline-color-title']) ? $this->options['outline-color-title'] : $this->defaults['outline-color-title'])); ?>" />
 
 
514
  </td>
515
  </tr>
516
+
517
  <tr valign="top">
518
  <th scope="row"><?php _e('URL', $this->text_domain); ?></th>
519
  <td>
520
  <?php _e('Color', $this->text_domain); ?><input name="properties[color-url]" type="text" class="color-picker" id="pickedcolor" value="<?php echo esc_attr($this->options['color-url']); ?>" />
521
  </td>
522
  <td>
523
+ &nbsp;<?php _e('Size', $this->text_domain); ?><input name="properties[size-url]" type="text" id="inputtext" value="<?php echo (isset($this->options['size-url']) ? $this->options['size-url'] : $this->defaults['size-url']); ?>" style="width: 4em;" />
524
+ <br>&nbsp;<?php _e('Height', $this->text_domain); ?><input name="properties[height-url]" type="text" id="inputtext" value="<?php echo (isset($this->options['height-url']) ? $this->options['height-url'] : $this->defaults['height-url']); ?>" style="width: 4em;" />
 
 
 
 
 
 
 
525
  </td>
526
  <td>
527
  </td>
528
  <td>
529
  <label><input name="properties[outline-url]" type="checkbox" id="check" value="1" <?php checked(isset($this->options['outline-url']) ? $this->options['outline-url'] : null, 1); ?> /><?php _e('Outline', $this->text_domain); ?></label>
530
+ <br><input name="properties[outline-color-url]" type="text" class="color-picker" id="pickedcolor" value="<?php echo esc_attr((isset($this->options['outline-color-url']) ? $this->options['outline-color-url'] : $this->defaults['outline-color-url'])); ?>" />
 
 
531
  </td>
532
  </tr>
533
+
534
  <tr valign="top">
535
  <th scope="row"><?php _e('Excerpt', $this->text_domain); ?></th>
536
  <td>
537
  <?php _e('Color', $this->text_domain); ?><input name="properties[color-excerpt]" type="text" class="color-picker" id="pickedcolor" value="<?php echo esc_attr($this->options['color-excerpt']); ?>" />
538
  </td>
539
  <td>
540
+ &nbsp;<?php _e('Size', $this->text_domain); ?><input name="properties[size-excerpt]" type="text" id="inputtext" value="<?php echo (isset($this->options['size-excerpt']) ? $this->options['size-excerpt'] : $this->defaults['size-excerpt']); ?>" style="width: 4em;" />
541
+ <br>&nbsp;<?php _e('Height', $this->text_domain); ?><input name="properties[height-excerpt]" type="text" id="inputtext" value="<?php echo (isset($this->options['height-excerpt']) ? $this->options['height-excerpt'] : $this->defaults['height-excerpt']); ?>" style="width: 4em;" />
 
 
 
 
 
 
 
 
542
  </td>
543
  <td>
544
+ &nbsp;<?php _e('Length', $this->text_domain); ?><input name="properties[trim-count]" type="text" id="inputtext" value="<?php echo (isset($this->options['trim-count']) ? $this->options['trim-count'] : $this->defaults['trim-sount']); ?>" style="width: 3em;" />
545
  </td>
546
  <td>
547
  <label><input name="properties[outline-excerpt]" type="checkbox" id="check" value="1" <?php checked(isset($this->options['outline-excerpt']) ? $this->options['outline-excerpt'] : null, 1); ?> /><?php _e('Outline', $this->text_domain); ?></label>
548
+ <br><input name="properties[outline-color-excerpt]" type="text" class="color-picker" id="pickedcolor" value="<?php echo esc_attr((isset($this->options['outline-color-excerpt']) ? $this->options['outline-color-excerpt'] : $this->defaults['outline-color-excerpt'])); ?>" />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
549
  </td>
550
  </tr>
551
+ <tr valign="top">
552
+ <th scope="row"><?php _e('Resize', $this->text_domain); ?></th>
553
+ <td colspan="4"><label><input name="properties[thumbnail-resize]" type="checkbox" id="check" value="1" <?php checked(isset($this->options['thumbnail-resize']) ? $this->options['thumbnail-resize'] : null, 1); ?> /><?php _e('Adjust thumbnail and letter size according to width', $this->text_domain); ?></label></td>
554
  </tr>
 
555
  </table>
556
  <?php submit_button(); ?>
557
 
576
  <option value="3" <?php if($this->options['ex-thumbnail'] == '3') echo 'selected="selected"'; ?>><?php _e('Use WebAPI', $this->text_domain); ?></option>
577
  <option value="13" <?php if($this->options['ex-thumbnail'] == '13') echo 'selected="selected"'; ?> disabled="disabled"><?php _e('Use WebAPI ,If can not direct', $this->text_domain); ?></option>
578
  </select>
579
+
580
  </td>
581
  </tr>
582
  <tr valign="top">
586
  <option value="" <?php if($this->options['ex-favicon'] == '') echo 'selected="selected"'; ?>><?php _e('None', $this->text_domain); ?></option>
587
  <option value="1" <?php if($this->options['ex-favicon'] == '1') echo 'selected="selected"'; ?> disabled="disabled"><?php _e('Direct', $this->text_domain); ?></option>
588
  <option value="3" <?php if($this->options['ex-favicon'] == '3') echo 'selected="selected"'; ?>><?php _e('Use WebAPI', $this->text_domain); ?></option>
589
+ <option value="13" <?php if($this->options['ex-favicon'] == '13') echo 'selected="selected"'; ?> disabled="disabled"><?php _e('Use WebAPI ,If can not direct', $this->text_domain); ?></option>
590
  </select>
591
  </td>
592
  </tr>
604
  </select>
605
  </td>
606
  </tr>
607
+ <tr valign="top">
608
+ <th scope="row"><?php _e('Get contents', $this->text_domain); ?></th>
609
+ <td>
610
+ <?php _e('Initially acquired only from the content', $this->text_domain); ?>
611
+ </td>
612
+ </tr>
613
+ <tr valign="top">
614
+ <th scope="row"><?php _e('Set nofollow', $this->text_domain); ?></th>
615
+ <td><label><input name="properties[nofollow]" type="checkbox" id="check" value="1" <?php checked(isset($this->options['nofollow']) ? $this->options['nofollow'] : null, 1); ?> /><?php _e('In the case of an external site, it puts the "nofollow"', $this->text_domain); ?></label></td>
616
+ </tr>
617
+ <tr valign="top">
618
+ <th scope="row"><?php _e('Use HatenaBlogCard', $this->text_domain); ?></th>
619
+ <td><label><input name="properties[use-hatena]" type="checkbox" id="check" value="1" <?php checked(isset($this->options['use-hatena']) ? $this->options['use-hatena'] : null, 1); ?> /><?php _e('External links will use Always HatenaBlogCard.', $this->text_domain); _e('(Not recommended)', $this->text_domain); ?></label></td>
620
+ </tr>
621
+ </table>
622
  <?php submit_button(); ?>
623
 
624
  <h3><?php _e('Internal link', $this->text_domain); ?></h3>
635
  <th scope="row"><?php _e('Thumbnail', $this->text_domain); ?></th>
636
  <td>
637
  <select name="properties[in-thumbnail]">
638
+ <option value="" <?php if($this->options['in-thumbnail'] == '') echo 'selected="selected"'; ?>><?php _e('None', $this->text_domain); ?></option>
639
  <option value="1" <?php if($this->options['in-thumbnail'] == '1') echo 'selected="selected"'; ?>><?php _e('Direct', $this->text_domain); ?></option>
640
  <option value="3" <?php if($this->options['in-thumbnail'] == '3') echo 'selected="selected"'; ?>><?php _e('Use WebAPI', $this->text_domain); ?></option>
641
  <option value="13" <?php if($this->options['in-thumbnail'] == '13') echo 'selected="selected"'; ?>><?php _e('Use WebAPI ,If can not direct', $this->text_domain); ?></option>
649
  <option value="" <?php if($this->options['in-favicon'] == '') echo 'selected="selected"'; ?>><?php _e('None', $this->text_domain); ?></option>
650
  <option value="1" <?php if($this->options['in-favicon'] == '1') echo 'selected="selected"'; ?> <?php if(!function_exists('has_site_icon') || !has_site_icon()) echo 'disabled="disabled"'; ?>><?php _e('Direct', $this->text_domain); ?></option>
651
  <option value="3" <?php if($this->options['in-favicon'] == '3') echo 'selected="selected"'; ?>><?php _e('Use WebAPI', $this->text_domain); ?></option>
652
+ <option value="13" <?php if($this->options['in-favicon'] == '13') echo 'selected="selected"'; ?>><?php _e('Use WebAPI ,If can not direct', $this->text_domain); ?></option>
653
  </select>
654
  </td>
655
  </tr>
671
  <th scope="row"><?php _e('Get contents', $this->text_domain); ?></th>
672
  <td>
673
  <select name="properties[in-get]">
674
+ <?php $in_data = (isset($this->options['in-get']) ? $this->options['in-get'] : ''); ?>
675
+ <option value="" <?php if($in_data == '') echo 'selected="selected"'; ?>><?php _e('Always get the latest from the content', $this->text_domain); ?></option>
676
+ <option value="1" <?php if($in_data == '1') echo 'selected="selected"'; ?>><?php _e('Always get the latest from the excerpt', $this->text_domain); ?></option>
677
+ <option value="2" <?php if($in_data == '2') echo 'selected="selected"'; ?>><?php _e('Initially acquired only from the content', $this->text_domain); ?></option>
678
  </select>
679
  </td>
680
  </tr>
714
  <table class="form-table"
715
  <tr valign="top">
716
  <th scope="row"><?php _e('Favicon API', $this->text_domain); ?></th>
717
+ <td>
718
+ <input name="properties[favicon-api]" type="text" id="inputtext" value="<?php echo esc_attr($this->options['favicon-api']); ?>" size="80" onclick="this.select(0,this.value.length);" />
719
+ <p><?php _e('%DOMAIN% replace to domain name (ex. poporon.poponet.jp )<br>%DOMAIN_URL% replace to domain URL (ex. http://poporon.poponet.jp )', $this->text_domain); ?></p>
720
+ <p><?php _e('ex1.', $this->text_domain); ?><input name="" type="text" id="inputtext" value="https://www.google.com/s2/favicons?domain=%DOMAIN%" size="70" onclick="this.select(0,this.value.length);" readonly /></p>
721
+ <p><?php _e('ex2.', $this->text_domain); ?><input name="" type="text" id="inputtext" value="https://favicon.hatena.ne.jp/?url=%URL%" size="70" onclick="this.select(0,this.value.length);" readonly /></p>
722
+ </td>
723
  </tr>
724
  <tr valign="top">
725
+ <th scope="row" rowspan="3"><?php _e('Thumbnail API', $this->text_domain); ?></th>
726
+ <td>
727
+ <input name="properties[thumbnail-api]" type="text" id="inputtext" value="<?php echo esc_attr($this->options['thumbnail-api']); ?>" size="80" onclick="this.select(0,this.value.length);" />
728
+ <p><?php _e('%URL% replace to URL', $this->text_domain); ?></p>
729
+ <p><?php _e('ex1.', $this->text_domain); ?><input name="" type="text" id="inputtext" value="https://s.wordpress.com/mshots/v1/%URL%?w=100" size="70" onclick="this.select(0,this.value.length);" readonly /></p>
730
+ <p><?php _e('ex2.', $this->text_domain); ?><input name="" type="text" id="inputtext" value="http://capture.heartrails.com/100x100?%URL%" size="70" onclick="this.select(0,this.value.length);" readonly /></p>
731
+ </td>
732
  </tr>
733
  </table>
734
  <?php submit_button(); ?>
735
 
736
+ <h3><?php _e('Link check', $this->text_domain); ?></h3>
737
  <table class="form-table">
738
  <tr valign="top">
739
+ <th scope="row"><?php _e('SSL verification disabled', $this->text_domain); ?></th>
740
+ <td><label><input name="properties[flg-ssl]" type="checkbox" id="check" value="1" <?php checked(isset($this->options['flg-ssl']) ? $this->options['flg-ssl'] : null, 1); ?> /><?php _e('Try setting if the contents of the SSL site can not be acquired.', $this->text_domain); ?></label></td>
741
  </tr>
742
  <tr valign="top">
743
+ <th scope="row"><?php _e('Follow location', $this->text_domain); ?></th>
744
+ <td><label><input name="properties[flg-redir]" type="checkbox" id="check" value="1" <?php checked(isset($this->options['flg-redir']) ? $this->options['flg-redir'] : null, 1); ?> /><?php _e('Track when the link destination is redirected.', $this->text_domain); ?></label></td>
745
  </tr>
746
  <tr valign="top">
747
+ <th scope="row"><?php _e('Broken link checker', $this->text_domain); ?></th>
748
+ <td><label><input name="properties[flg-alive]" type="checkbox" id="check" value="1" <?php checked(isset($this->options['flg-alive']) ? $this->options['flg-alive'] : null, 1); ?> /><?php _e('Alive confirmation of the link destination.', $this->text_domain); ?></label></td>
749
  </tr>
750
+ </table>
751
+ <?php submit_button(); ?>
752
 
753
+ <h3><?php _e('Debug', $this->text_domain); ?></h3>
754
+ <table class="form-table">
755
  <tr valign="top">
756
+ <th scope="row"><?php _e('Trailing slash', $this->text_domain); ?></th>
757
+ <td>
758
+ <select name="properties[trail-slash]">
759
+ <?php $in_data = (isset($this->options['trail-slash']) ? $this->options['trail-slash'] : ''); ?>
760
+ <option value="" <?php if($in_data == '') echo 'selected="selected"'; ?>><?php _e('As it', $this->text_domain); ?></option>
761
+ <option value="1" <?php if($in_data == '1') echo 'selected="selected"'; ?>><?php _e('When only domain name, remove', $this->text_domain); ?></option>
762
+ <option value="2" <?php if($in_data == '2') echo 'selected="selected"'; ?>><?php _e('Always remove', $this->text_domain); ?></option>
763
+ </select>
764
+ </td>
765
  </tr>
766
 
767
+ <tr valign="top" style="display: none;">
768
  <th scope="row"><?php _e('specified CSS', $this->text_domain); ?></th>
769
  <td><label><input name="properties[style]" type="checkbox" id="check" value="1" <?php checked(isset($this->options['style']) ? $this->options['style'] : null, 1); ?> /><?php _e('Use specified CSS file', $this->text_domain); ?></label></td>
770
  </tr>
771
+ <tr valign="top" style="display: none;">
772
  <th scope="row"><?php _e('CSS file', $this->text_domain); ?></th>
773
  <td><input name="properties[css-file]" type="text" id="inputtext" value="<?php echo esc_attr($this->options['css-file']); ?>" size="80" /><br><p><?php _e('(ex. http://exsample.com/style.css )', $this->text_domain); ?></p></td>
774
  </tr>
790
  <td><input name="properties[class-mobile]" type="text" id="inputtext" value="<?php echo (isset($this->options['class-mobile']) ? esc_attr($this->options['class-mobile']) : ''); ?>" size="40" /><br>
791
  </tr>
792
 
793
+ <tr valign="top" style="display: none;">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
794
  <th scope="row"><?php _e('Display link to author page', $this->text_domain); ?></th>
795
  <td><input name="properties[plugin-link]" type="checkbox" id="check" value="1" <?php checked(isset($this->options['plugin-link']) ? $this->options['plugin-link'] : null, 1); ?> disabled="disabled" /><a href="<?php echo $this->options['plugin-url']; ?>" target="_blank"><?php echo $this->options['plugin-name']; ?></a></td>
796
  </tr>
813
 
814
  <tr valign="top">
815
  <th scope="row"><?php _e('Display elapsed time', $this->text_domain); ?></th>
816
+ <td><label><input name="properties[debug-time]" type="checkbox" id="check" value="1" <?php checked(isset($this->options['debug-time']) ? $this->options['debug-time'] : null, 1); ?> /><?php _e('Output the elapsed time to HTML comment.', $this->text_domain); _e('(Not recommended)', $this->text_domain); ?></label></td>
817
  </tr>
818
 
819
  </table>
828
  </table>
829
  <?php submit_button(); ?>
830
 
831
+ <h3><?php _e('etc', $this->text_domain); ?></h3>
832
+ <table class="form-table">
833
+ <tr valign="top">
834
+ <th scope="row"><?php _e("Author's site", $this->text_domain); ?></th>
835
+ <td><?php echo __('Popozure.', $this->text_domain).' ('.__("Poporon's PC daily diary", $this->text_domain).')'; ?><BR><A href="http://popozure.info" target="_blank">http://popozure.info</A></td>
836
+ </tr>
837
+ <tr valign="top">
838
+ <th scope="row"><?php _e("Plugin's page", $this->text_domain); ?></th>
839
+ <td><A href="http://popozure.info/pz-linkcard" target="_blank">http://popozure.info/pz-linkcard</A></td>
840
+ </tr>
841
+ </table>
842
+
843
  </form>
844
  </div>
845
  </div>
lib/pz-linkcard-style.php CHANGED
@@ -40,7 +40,7 @@
40
  case 'ct1': // Cellophane tape center
41
  $file_text = str_replace('/*WRAP*/', 'position: relative;',$file_text );
42
  $file_text = str_replace('/*WRAP-BEFORE*/', 'content: "";display: block;position: absolute;left: 40%;top: -16px;width: 95px;height: 25px;z-index: 2;background-color: rgba(243,245,228,0.5);border: 2px solid rgba(255,255,255,0.5);-webkit-box-shadow: 1px 1px 4px rgba(200,200,180,0.8);-moz-box-shadow: 1px 1px 4px rgba(200,200,180,0.8);box-shadow: 1px 1px 4px rgba(200,200,180,0.8);-webkit-transform: rotate(3deg);-moz-transform: rotate(3deg);-o-transform: rotate(3deg);', $file_text );
43
- $file_text = str_replace('/*SHADOW*/', 'box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2) , 0px 0px 8px rgba(0, 0, 0, 0.2) inset;', $file_text );
44
  break;
45
  case 'ct2': // Cellophane tape left right
46
  $file_text = str_replace('/*WRAP*/', 'position: relative;',$file_text );
@@ -48,14 +48,14 @@
48
  $file_text = str_replace('/*WRAP-BEFORE*/', 'content: "";display: block;position: absolute;left: -40px;top: -4px;width: 75px;height: 25px;z-index: 2;background-color: rgba(243,245,228,0.5);border: 2px solid rgba(255,255,255,0.5);-webkit-box-shadow: 1px 1px 4px rgba(200,200,180,0.8);-moz-box-shadow: 1px 1px 4px rgba(200,200,180,0.8);box-shadow: 1px 1px 4px rgba(200,200,180,0.8);-webkit-transform: rotate(-45deg);-moz-transform: rotate(-45deg);-o-transform: rotate(-45deg);', $file_text );
49
  $file_text = str_replace('/*WRAP-AFTER*/', 'content: "";display: block;position: absolute;right: -20px;top: -2px;width: 75px;height: 25px;z-index: 2;background-color: rgba(243,245,228,0.5);border: 2px solid rgba(255,255,255,0.5);-webkit-box-shadow: 1px 1px 4px rgba(200,200,180,0.8);-moz-box-shadow: 1px 1px 4px rgba(200,200,180,0.8);box-shadow: 1px 1px 4px rgba(200,200,180,0.8);-webkit-transform: rotate(16deg);-moz-transform: rotate(16deg);-o-transform: rotate(16deg);transform: rotate(16deg);', $file_text );
50
  $file_text = str_replace('/*MARGIN-RIGHT*/', 'margin-right: 25px;',$file_text );
51
- $file_text = str_replace('/*SHADOW*/', 'box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2) , 0px 0px 8px rgba(0, 0, 0, 0.2) inset;', $file_text );
52
  break;
53
  case 'ct3': // Cellophane long
54
  $file_text = str_replace('/*WRAP*/', 'position: relative;',$file_text );
55
  $file_text = str_replace('/*WRAP-BEFORE*/', 'content: "";display: block;position: absolute;left: -5%;top: -12px;width: 110%;height: 25px;z-index: 2;background-color: rgba(243,245,228,0.5);border: 2px solid rgba(255,255,255,0.5);-webkit-box-shadow: 1px 1px 4px rgba(200,200,180,0.8);-moz-box-shadow: 1px 1px 4px rgba(200,200,180,0.8);box-shadow: 1px 1px 4px rgba(200,200,180,0.8);-webkit-transform: rotate(-3deg);-moz-transform: rotate(-3deg);-o-transform: rotate(-3deg);', $file_text );
56
  $file_text = str_replace('/*MARGIN-LEFT*/', 'margin-left: 32px;',$file_text );
57
  $file_text = str_replace('/*MARGIN-RIGHT*/', 'margin-right: 32px;',$file_text );
58
- $file_text = str_replace('/*SHADOW*/', 'box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2) , 0px 0px 8px rgba(0, 0, 0, 0.2) inset;', $file_text );
59
  break;
60
  case 'slt': // Slanting
61
  $file_text = str_replace('/*WRAP*/', 'transform:skew(-10deg) rotate(1deg);-webkit-transform: skew(-10deg) rotate(1deg);-moz-transform:skew(-10deg) rotate(1deg);', $file_text );
@@ -69,7 +69,7 @@
69
  case 'ppc': // Paper Curling
70
  $file_text = str_replace('/*WRAP*/', 'position: relative;',$file_text );
71
  $file_text = str_replace('/*WRAP-AFTER*/', 'z-index: -1; content:""; height: 10px; width: 60%; position: absolute; right: 16px; bottom: 14px; left: auto; transform: skew(5deg) rotate(3deg); -webkit-transform: skew(5deg) rotate(3deg); -moz-transform: skew(5deg) rotate(3deg); box-shadow: 0 16px 16px rgba(0,0,0,1); -webkit-box-shadow: 0 16px 16px rgba(0,0,0,1); -moz-box-shadow: 0 16px 12px rgba(0,0,0,1);', $file_text );
72
- $file_text = str_replace('/*SHADOW*/', 'box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.8) , 0px 0px 12px rgba(0, 0, 0, 0.3) inset;', $file_text );
73
  $file_text = str_replace('/*OPTION*/', 'article { position: relative; z-index: 0; } article blockquote { position: relative; z-index: 0; }', $file_text );
74
  break;
75
  case 'tac': // Taping and curling
@@ -77,7 +77,7 @@
77
  $file_text = str_replace('/*WRAP-BEFORE*/', 'content: ""; display: block; position: absolute; left: -24px; top: 0px; width: 200px; height: 25px; z-index: 2; background-color: rgba(243,245,228,0.5); border: 2px solid rgba(255,255,255,0.5); -webkit-box-shadow: 1px 1px 4px rgba(200,200,180,0.8); -moz-box-shadow: 1px 1px 4px rgba(200,200,180,0.8); box-shadow: 1px 1px 4px rgba(200,200,180,0.8); -webkit-transform: rotate(-8deg); -moz-transform: rotate(-8deg); -o-transform: rotate(-8deg);', $file_text );
78
  $file_text = str_replace('/*WRAP-AFTER*/', 'z-index: -1; content:""; height: 10px; width: 60%; position: absolute; right: 16px; bottom: 14px; left: auto; transform: skew(5deg) rotate(3deg); -webkit-transform: skew(5deg) rotate(3deg); -moz-transform: skew(5deg) rotate(3deg); box-shadow: 0 16px 16px rgba(0,0,0,1); -webkit-box-shadow: 0 16px 16px rgba(0,0,0,1); -moz-box-shadow: 0 16px 12px rgba(0,0,0,1);', $file_text );
79
  $file_text = str_replace('/*MARGIN-LEFT*/', 'margin-left: 24px;',$file_text );
80
- $file_text = str_replace('/*SHADOW*/', 'box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.8) , 0px 0px 12px rgba(0, 0, 0, 0.3) inset;', $file_text );
81
  $file_text = str_replace('/*OPTION*/', 'article { position: relative; z-index: 0; } article blockquote { position: relative; z-index: 0; }', $file_text );
82
  break;
83
  case 'inN': // Neutral
@@ -140,6 +140,13 @@
140
  $file_text = str_replace('/*SIZE-INFO*/', 'font-size: '.$this->options['size-info'].';',$file_text );
141
  $file_text = str_replace('/*SIZE-PLUGIN*/', 'font-size: '.$this->options['size-plugin'].';',$file_text );
142
 
 
 
 
 
 
 
 
143
  // 文字の縁取り
144
  //
145
  if (isset($this->options['outline-title']) && $this->options['outline-title'] == '1') {
@@ -163,13 +170,13 @@
163
  $file_text = str_replace('/*MARGIN-TOP*/', 'margin-top: '.$this->options['margin-top'].';',$file_text );
164
  }
165
  if ($this->options['margin-right']) {
166
- $file_text = str_replace('/*MARGIN-RIGHT*/', 'margin-right: '.$this->options['margin-right'].';',$file_text );
167
  }
168
  if ($this->options['margin-bottom']) {
169
- $file_text = str_replace('/*MARGIN-BOTTOM*/', 'margin-bottom: '.$this->options['margin-bottom'].';',$file_text );
170
  }
171
  if ($this->options['margin-left']) {
172
- $file_text = str_replace('/*MARGIN-LEFT*/', 'margin-left: '.$this->options['margin-left'].';',$file_text );
173
  }
174
 
175
  // カードの余白等調整
40
  case 'ct1': // Cellophane tape center
41
  $file_text = str_replace('/*WRAP*/', 'position: relative;',$file_text );
42
  $file_text = str_replace('/*WRAP-BEFORE*/', 'content: "";display: block;position: absolute;left: 40%;top: -16px;width: 95px;height: 25px;z-index: 2;background-color: rgba(243,245,228,0.5);border: 2px solid rgba(255,255,255,0.5);-webkit-box-shadow: 1px 1px 4px rgba(200,200,180,0.8);-moz-box-shadow: 1px 1px 4px rgba(200,200,180,0.8);box-shadow: 1px 1px 4px rgba(200,200,180,0.8);-webkit-transform: rotate(3deg);-moz-transform: rotate(3deg);-o-transform: rotate(3deg);', $file_text );
43
+ $file_text = str_replace('/*SHADOW*/', 'box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);', $file_text );
44
  break;
45
  case 'ct2': // Cellophane tape left right
46
  $file_text = str_replace('/*WRAP*/', 'position: relative;',$file_text );
48
  $file_text = str_replace('/*WRAP-BEFORE*/', 'content: "";display: block;position: absolute;left: -40px;top: -4px;width: 75px;height: 25px;z-index: 2;background-color: rgba(243,245,228,0.5);border: 2px solid rgba(255,255,255,0.5);-webkit-box-shadow: 1px 1px 4px rgba(200,200,180,0.8);-moz-box-shadow: 1px 1px 4px rgba(200,200,180,0.8);box-shadow: 1px 1px 4px rgba(200,200,180,0.8);-webkit-transform: rotate(-45deg);-moz-transform: rotate(-45deg);-o-transform: rotate(-45deg);', $file_text );
49
  $file_text = str_replace('/*WRAP-AFTER*/', 'content: "";display: block;position: absolute;right: -20px;top: -2px;width: 75px;height: 25px;z-index: 2;background-color: rgba(243,245,228,0.5);border: 2px solid rgba(255,255,255,0.5);-webkit-box-shadow: 1px 1px 4px rgba(200,200,180,0.8);-moz-box-shadow: 1px 1px 4px rgba(200,200,180,0.8);box-shadow: 1px 1px 4px rgba(200,200,180,0.8);-webkit-transform: rotate(16deg);-moz-transform: rotate(16deg);-o-transform: rotate(16deg);transform: rotate(16deg);', $file_text );
50
  $file_text = str_replace('/*MARGIN-RIGHT*/', 'margin-right: 25px;',$file_text );
51
+ $file_text = str_replace('/*SHADOW*/', 'box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);', $file_text );
52
  break;
53
  case 'ct3': // Cellophane long
54
  $file_text = str_replace('/*WRAP*/', 'position: relative;',$file_text );
55
  $file_text = str_replace('/*WRAP-BEFORE*/', 'content: "";display: block;position: absolute;left: -5%;top: -12px;width: 110%;height: 25px;z-index: 2;background-color: rgba(243,245,228,0.5);border: 2px solid rgba(255,255,255,0.5);-webkit-box-shadow: 1px 1px 4px rgba(200,200,180,0.8);-moz-box-shadow: 1px 1px 4px rgba(200,200,180,0.8);box-shadow: 1px 1px 4px rgba(200,200,180,0.8);-webkit-transform: rotate(-3deg);-moz-transform: rotate(-3deg);-o-transform: rotate(-3deg);', $file_text );
56
  $file_text = str_replace('/*MARGIN-LEFT*/', 'margin-left: 32px;',$file_text );
57
  $file_text = str_replace('/*MARGIN-RIGHT*/', 'margin-right: 32px;',$file_text );
58
+ $file_text = str_replace('/*SHADOW*/', 'box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);', $file_text );
59
  break;
60
  case 'slt': // Slanting
61
  $file_text = str_replace('/*WRAP*/', 'transform:skew(-10deg) rotate(1deg);-webkit-transform: skew(-10deg) rotate(1deg);-moz-transform:skew(-10deg) rotate(1deg);', $file_text );
69
  case 'ppc': // Paper Curling
70
  $file_text = str_replace('/*WRAP*/', 'position: relative;',$file_text );
71
  $file_text = str_replace('/*WRAP-AFTER*/', 'z-index: -1; content:""; height: 10px; width: 60%; position: absolute; right: 16px; bottom: 14px; left: auto; transform: skew(5deg) rotate(3deg); -webkit-transform: skew(5deg) rotate(3deg); -moz-transform: skew(5deg) rotate(3deg); box-shadow: 0 16px 16px rgba(0,0,0,1); -webkit-box-shadow: 0 16px 16px rgba(0,0,0,1); -moz-box-shadow: 0 16px 12px rgba(0,0,0,1);', $file_text );
72
+ $file_text = str_replace('/*SHADOW*/', 'box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.8);', $file_text );
73
  $file_text = str_replace('/*OPTION*/', 'article { position: relative; z-index: 0; } article blockquote { position: relative; z-index: 0; }', $file_text );
74
  break;
75
  case 'tac': // Taping and curling
77
  $file_text = str_replace('/*WRAP-BEFORE*/', 'content: ""; display: block; position: absolute; left: -24px; top: 0px; width: 200px; height: 25px; z-index: 2; background-color: rgba(243,245,228,0.5); border: 2px solid rgba(255,255,255,0.5); -webkit-box-shadow: 1px 1px 4px rgba(200,200,180,0.8); -moz-box-shadow: 1px 1px 4px rgba(200,200,180,0.8); box-shadow: 1px 1px 4px rgba(200,200,180,0.8); -webkit-transform: rotate(-8deg); -moz-transform: rotate(-8deg); -o-transform: rotate(-8deg);', $file_text );
78
  $file_text = str_replace('/*WRAP-AFTER*/', 'z-index: -1; content:""; height: 10px; width: 60%; position: absolute; right: 16px; bottom: 14px; left: auto; transform: skew(5deg) rotate(3deg); -webkit-transform: skew(5deg) rotate(3deg); -moz-transform: skew(5deg) rotate(3deg); box-shadow: 0 16px 16px rgba(0,0,0,1); -webkit-box-shadow: 0 16px 16px rgba(0,0,0,1); -moz-box-shadow: 0 16px 12px rgba(0,0,0,1);', $file_text );
79
  $file_text = str_replace('/*MARGIN-LEFT*/', 'margin-left: 24px;',$file_text );
80
+ $file_text = str_replace('/*SHADOW*/', 'box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.8);', $file_text );
81
  $file_text = str_replace('/*OPTION*/', 'article { position: relative; z-index: 0; } article blockquote { position: relative; z-index: 0; }', $file_text );
82
  break;
83
  case 'inN': // Neutral
140
  $file_text = str_replace('/*SIZE-INFO*/', 'font-size: '.$this->options['size-info'].';',$file_text );
141
  $file_text = str_replace('/*SIZE-PLUGIN*/', 'font-size: '.$this->options['size-plugin'].';',$file_text );
142
 
143
+ // 行の高さ
144
+ $file_text = str_replace('/*HEIGHT-TITLE*/', 'line-height: '.$this->options['height-title'].';',$file_text );
145
+ $file_text = str_replace('/*HEIGHT-URL*/', 'line-height: '.$this->options['height-url'].';',$file_text );
146
+ $file_text = str_replace('/*HEIGHT-EXCERPT*/', 'line-height: '.$this->options['height-excerpt'].';',$file_text );
147
+ $file_text = str_replace('/*HEIGHT-INFO*/', 'line-height: '.$this->options['height-info'].';',$file_text );
148
+ $file_text = str_replace('/*HEIGHT-PLUGIN*/', 'line-height: '.$this->options['height-plugin'].';',$file_text );
149
+
150
  // 文字の縁取り
151
  //
152
  if (isset($this->options['outline-title']) && $this->options['outline-title'] == '1') {
170
  $file_text = str_replace('/*MARGIN-TOP*/', 'margin-top: '.$this->options['margin-top'].';',$file_text );
171
  }
172
  if ($this->options['margin-right']) {
173
+ $file_text = str_replace('/*MARGIN-RIGHT*/', 'margin-right: '.$this->options['margin-right'].';',$file_text );
174
  }
175
  if ($this->options['margin-bottom']) {
176
+ $file_text = str_replace('/*MARGIN-BOTTOM*/', 'margin-bottom: '.$this->options['margin-bottom'].';',$file_text );
177
  }
178
  if ($this->options['margin-left']) {
179
+ $file_text = str_replace('/*MARGIN-LEFT*/', 'margin-left: '.$this->options['margin-left'].';',$file_text );
180
  }
181
 
182
  // カードの余白等調整
pz-linkcard.php CHANGED
@@ -21,6 +21,7 @@ class Pz_LinkCard {
21
  public $plugin_dir_path;
22
  public $plugin_dir_url;
23
  public $plugin_link; // link to plugin page
 
24
  private $db_name;
25
 
26
  public $options;
@@ -31,12 +32,12 @@ class Pz_LinkCard {
31
  'code4' => null,
32
  'trail-slash' => '1',
33
  'border' => '1bk',
34
- 'width' => '500px',
35
- 'content-height' => '108px',
36
- 'margin-top' => '4px',
37
- 'margin-right' => '16px',
38
- 'margin-bottom' => '16px',
39
- 'margin-left' => '4px',
40
  'card-top' => null,
41
  'card-right' => null,
42
  'card-bottom' => null,
@@ -51,16 +52,21 @@ class Pz_LinkCard {
51
  'use-hatena' => null,
52
  'display-url' => '1',
53
  'display-excerpt' => '1',
54
- 'trim-title' => 200,
55
  'trim-count' => 250,
56
- 'trim-sitename' => 50,
57
  'info-position' => '1',
58
  'separator' => null,
59
  'size-title' => '16px',
60
- 'size-url' => '9px',
61
  'size-excerpt' => '11px',
62
  'size-info' => '12px',
63
- 'size-plugin' => '9px',
 
 
 
 
 
64
  'color-title' => '#111111',
65
  'color-url' => '#4466ff',
66
  'color-excerpt' => '#333333',
@@ -87,13 +93,14 @@ class Pz_LinkCard {
87
  'in-thumbnail' => '1',
88
  'ex-favicon' => '3',
89
  'in-favicon' => '1',
90
- 'favicon-api' => 'http://www.google.com/s2/favicons?domain=%DOMAIN%',
91
- 'thumbnail-api' => 'http://s.wordpress.com/mshots/v1/%URL%?w=100',
92
  'thumbnail-position'=> '2',
93
  'thumbnail-shadow' => '1',
94
  'thumbnail-resize' => '1',
95
  'cache-time' => 31536000,
96
- 'flg-alive' => null,
 
97
  'flg-ssl' => '1',
98
  'style-reset-img' => '1',
99
  'style' => null,
@@ -112,7 +119,7 @@ class Pz_LinkCard {
112
  'presence' => null,
113
  'plugin-link' => null,
114
  'plugin-name' => 'Pz-LinkCard',
115
- 'plugin-version' => '1.7.4',
116
  'plugin-url' => 'http://poporon.poponet.jp/pz-linkcard',
117
  'pz-hbc-options' => null,
118
  'debug-time' => null
@@ -141,11 +148,11 @@ class Pz_LinkCard {
141
 
142
  // バージョンが違っていたら、DBとオプションを更新する
143
  if ($this->options['plugin-version'] <> $this->defaults['plugin-version']) {
144
- $this->activation();
145
  }
146
 
147
  // CSS URLが空だったら生成
148
- if (isset($this->options['style']) && isset($this->options['style']) == '1' && !isset($this->options['css-url'])) {
149
  $this->pz_SetStyle();
150
  }
151
 
@@ -166,12 +173,12 @@ class Pz_LinkCard {
166
  // 管理画面のとき
167
  if (is_admin()) {
168
  load_plugin_textdomain ($this->text_domain, false, $this->slug.'/languages'); // 管理画面のみ日本語化
169
- register_activation_hook (__FILE__, array($this, 'activation')); // 有効化したときの処理
170
- register_deactivation_hook (__FILE__, array($this, 'deactivation')); // 無効化したときの処理
171
  add_action ('admin_menu', array($this, 'add_menu')); // 設定メニュー
172
  add_action ('admin_enqueue_scripts', array($this, 'enqueue_admin')); // 設定メニュー用スクリプト
173
  add_filter ('plugin_action_links_'.$this->plugin_basename, array($this, 'action_links')); // プラグイン画面
174
-
175
  if ((isset($this->options['style']) ? $this->options['style'] : '') == '') {
176
  if (is_null($this->options['css-path']) || !file_exists($this->options['css-path'])) {
177
  $this->pz_SetStyle();
@@ -217,7 +224,7 @@ class Pz_LinkCard {
217
  $atts['url'] = $url;
218
  }
219
  if ( is_null( $url ) ) {
220
- return 'Pz-LinkCard: URLの指定が誤っています';
221
  }
222
 
223
  // パラメータ
@@ -264,6 +271,13 @@ class Pz_LinkCard {
264
  return null;
265
  }
266
 
 
 
 
 
 
 
 
267
  // リンク先URLからドメイン名を抽出
268
  if (preg_match('{https?://(.+?)/}i', $url.'/',$m)) {
269
  $domain_url = $m[0];
@@ -274,13 +288,6 @@ class Pz_LinkCard {
274
  $error = true;
275
  }
276
 
277
- // モバイルチェック
278
- if (function_exists('wp_is_mobile') && wp_is_mobile()) {
279
- $is_mobile = true;
280
- } else {
281
- $is_mobile = false;
282
- }
283
-
284
  // 自サイトチェック
285
  if (preg_match('{'.home_url().'\/.*?}', $url.'/')) {
286
  if (get_permalink() == $url) {
@@ -288,22 +295,8 @@ class Pz_LinkCard {
288
  } else {
289
  $link_type = 2; // 自サイト内
290
  }
291
- $target = ''; // 同ページに開く
292
- if (isset($this->options['in-target'])) {
293
- if ($this->options['in-target'] == '1' || ($this->options['in-target'] == '2' && !$is_mobile)) {
294
- $target = ' target="_blank"'; // 新しいページで開く
295
- }
296
- }
297
- $nofollow = '';
298
  } else {
299
  $link_type = 0; // 外部サイト
300
- $target = ''; // 同ページに開く
301
- if (isset($this->options['ex-target'])) {
302
- if ($this->options['ex-target'] == '1' || ($this->options['ex-target'] == '2' && !$is_mobile)) {
303
- $target = ' target="_blank"'; // 新しいページで開く
304
- }
305
- }
306
- $nofollow = isset($this->options['nofollow']) ? ' rel="nofollow"' : '';
307
  }
308
 
309
  // モバイルかPCかのクラス名を追加
@@ -314,46 +307,68 @@ class Pz_LinkCard {
314
  $class_id .= ' '.$this->options['class-pc'];
315
  }
316
 
317
- $update = false;
 
318
  $data = array();
319
  $data['url'] = $url;
320
  $result = $this->pz_GetCache( $data );
321
  if (isset($result) && is_array($result) && isset($result['url'])) {
322
  $data = $result;
323
- if (isset($atts['force']) && $atts['force'] == true) {
324
- $data_id = $data['id'];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
325
  $result = $this->pz_GetCURL( $data );
326
- if (isset($result) && is_array($result) && isset($result['url'])) {
327
  $data = $result;
328
- $data['id'] = $data_id;
329
- $update = true;
330
  }
331
  }
332
- } else {
333
- $result = $this->pz_GetCURL( $data );
334
- if (isset($result) && is_array($result) && isset($result['url'])) {
335
- $data = $result;
336
- $update = true;
337
- }
338
  }
339
 
340
- $data_id = $data['id'];
341
- $url_key = $data['url_key'];
342
- $site_name = $data['site_name'];
343
- $title = $data['title'];
344
- $excerpt = $data['excerpt'];
345
- $charset = $data['charset'];
346
- $thumbnail_url = $data['thumbnail'];
347
- $favicon_url = $data['favicon'];
348
- $result_code = $data['result_code'];
349
- $post_id = $data['post_id'];
350
- $sns_tw = $data['sns_twitter'];
351
- $sns_fb = $data['sns_facebook'];
352
- $sns_hb = $data['sns_hatena'];
353
- $uptime = $data['uptime'];
354
- $nexttime = $data['nexttime'];
355
- $alive_time = $data['alive_time'];
356
- $alive_result = $data['alive_result'];
357
 
358
  $thumbnail = null;
359
  $favicon = null;
@@ -364,8 +379,8 @@ class Pz_LinkCard {
364
  $wrap_op = '<div class="lkc-this-wrap">';
365
  $wrap_cl = '</div>';
366
  $info = isset($this->options['th-info']) ? $this->options['th-info'] : '' ;
367
- $sw_thumbnail = isset($this->options['th-thumbnail']) ? $this->options['th-thumbnail'] : '0' ;
368
- $sw_favicon = isset($this->options['th-favicon']) ? $this->options['th-favicon'] : '0' ;
369
  break;
370
  case '2':
371
  $wrap_op = '<div class="lkc-internal-wrap">';
@@ -383,54 +398,6 @@ class Pz_LinkCard {
383
  break;
384
  }
385
 
386
- // 内部リンクかつ、キャッシュが無いもしくは内部リンクは最新優先の場合
387
- if ( $link_type && ( is_null($data_id) || $this->options['in-get'] <> 2 ) ) {
388
- $site_name = get_bloginfo('name'); // サイト名
389
- $post_id = url_to_postid($url); // 記事ID
390
- if ($post_id) {
391
- if (is_null($data_id)) {
392
- $update = true;
393
- }
394
- $result_code = 200; // 外部取得と同じコードをセット
395
- $post = get_post($post_id); // 記事情報
396
- if ( $this->options['in-get'] ) {
397
- $title = $post->post_title; // 記事タイトル
398
- $excerpt = $post->post_content; // 記事内容から抜粋
399
- } else {
400
- $title = $post->post_title; // 記事タイトル
401
- $excerpt = $post->post_excerpt; // 抜粋文優先
402
- if ($excerpt == '') {
403
- $excerpt = $post->post_content; // 抜粋文が無かったら記事
404
- }
405
- }
406
- $sw_thumbnail = isset($this->options['in-thumbnail']) ? $this->options['in-thumbnail'] : '0' ;
407
- if ($sw_thumbnail == '1' || $sw_thumbnail == '13') {
408
- $thumbnail = get_the_post_thumbnail($post_id, 'thumbnail' , array('class' => 'lkc-thumbnail-img'));
409
- if ($sw_thumbnail == '13' && $thumbnail == '') {
410
- $sw_thumbnail = '3';
411
- }
412
- }
413
- $sw_favicon = isset($this->options['in-favicon']) ? $this->options['in-favicon'] : '0' ;
414
- if ($sw_favicon == '1') {
415
- if (function_exists('has_site_icon') && has_site_icon()) {
416
- $favicon = '<img class="lkc-favicon" src="'.get_site_icon_url(16, '', 0).'" alt="" />';
417
- } else {
418
- $sw_favicon = isset($this->options['ex-favicon']) ? $this->options['ex-favicon'] : '0' ;
419
- }
420
- }
421
- } else {
422
- $result_code = 404; // 404 Not Found
423
- if (!$title) {
424
- $title = get_bloginfo('name'); // サイト名
425
- if (!$excerpt) {
426
- $excerpt = get_bloginfo('description'); // サイト概要
427
- }
428
- }
429
- $sw_thumbnail = 0;
430
- $sw_favicon = 0;
431
- }
432
- }
433
-
434
  // 外部リンクの処理
435
  if ( !$link_type && isset($this->options['use-hatena']) && !is_null($this->options['use-hatena'] ) ) {
436
  // 「はてなブログカード」をそのまま利用する
@@ -443,44 +410,19 @@ class Pz_LinkCard {
443
  return $tag;
444
  }
445
 
446
- // タイトル整形
447
- if (isset($title)) {
448
- $str = $title;
449
- $str = strip_tags($str); // タグの除去
450
- $str = str_replace(array("\r", "\n"), '', $str); // 改行削除
451
- $str = esc_html($str); // 念のためエスケープ
452
- $str = mb_strimwidth($str, 0, 200, '...'); // 保管用のタイトルは200文字で切る
453
- $title = $str;
454
- }
455
-
456
- // 抜粋文整形
457
- if (isset($excerpt)) {
458
- $str = $excerpt;
459
- $str = strip_tags($str); // タグの除去
460
- $str = preg_replace('/<!--more-->.+/is', '', $str); // moreタグ以降削除
461
- $str = preg_replace('/\[[^]]*\]/', '', $str); // ショートコードすべて除去
462
- $str = str_replace(array("\r", "\n"), '', $str); // 改行削除
463
- $str = esc_html($str); // 念のためエスケープ
464
- $str = mb_strimwidth($str, 0, 500, '...'); // 保管用の記事内容は500文字で切る
465
- $excerpt = $str;
466
- }
467
-
468
- // 更新あり
469
- if ( $update ) {
470
- $data = $this->pz_SetCache( $data );
471
- wp_schedule_single_event(time() + 1, 'pz_linkcard_check');
472
-
473
- if (isset($data['id'])) {
474
- $update = false;
475
- }
476
- }
477
-
478
  // サムネイル取得
479
  if ( !$this->options['thumbnail-position'] || ( $result_code <> 0 && $result_code <> 200 ) ) {
480
  $thumbnail = null;
481
  } else {
 
 
 
 
 
 
 
482
  if ($sw_thumbnail == '3') {
483
- // 画像取得
484
  if (isset($this->options['thumbnail-api'])) {
485
  $thumbnail = preg_replace('/%DOMAIN_URL%/', $domain_url, $this->options['thumbnail-api'] );
486
  $thumbnail = preg_replace('/%DOMAIN%/', $domain, $thumbnail);
@@ -489,13 +431,20 @@ class Pz_LinkCard {
489
  }
490
  }
491
  }
492
-
493
  // ファビコン取得
494
  if (!isset($this->options['info-position'])) {
495
  $favicon = null;
496
  } else{
 
 
 
 
 
 
 
497
  if ($sw_favicon == '3') {
498
- // サイトアイコン取得
499
  if (isset($this->options['favicon-api'])) {
500
  $favicon = preg_replace('/%DOMAIN_URL%/', $domain_url, $this->options['favicon-api'] );
501
  $favicon = preg_replace('/%DOMAIN%/', $domain, $favicon);
@@ -567,16 +516,28 @@ class Pz_LinkCard {
567
  }
568
 
569
  // リンク先URL
570
- $a_op = '<a class="no_icon" href="'.$url.'"'.$target.$nofollow.'>';
571
- $a_cl = '</a>';
572
- if ((isset($this->options['link-all']) ? $this->options['link-all'] : null) == '1') {
573
- $a_op_all = $a_op;
574
- $a_cl_all = $a_cl;
575
  $a_op = '';
576
  $a_cl = '';
 
 
 
 
 
 
 
 
 
577
  } else {
578
  $a_op_all = '';
579
  $a_cl_all = '';
 
 
 
 
580
  }
581
 
582
  // ソーシャルカウントの表示
@@ -625,18 +586,18 @@ class Pz_LinkCard {
625
  $domain_info = '<div class="lkc-info">'.$a_op.'<span class="lkc-domain"'.$site_title.'>'.$favicon.'&nbsp;'.$site_name.$info.'</span>'.$a_cl.'&nbsp;'.$sns_info.$this->plugin_link.'</div>';
626
 
627
  // 記事内容
628
- $content = '<div class="lkc-content">'.$a_op.$thumbnail.'<span class="lkc-title">'.$title.'</span>'.$a_cl.$sns_title.'<div class="lkc-url"><cite>'.$a_op.$url.$a_cl.'</cite></div><div class="lkc-excerpt">'.$excerpt.'</div></div>';
629
 
630
  // HTMLタグ作成
631
  switch (isset($this->options['info-position']) ? $this->options['info-position'] : null) {
632
  case '1':
633
- $tag = $a_op_all.$wrap_op.'<div class="lkc-card">'.$domain_info.$content.'<div class="clear"></div></div>'.$wrap_cl.$a_cl_all;
634
  break;
635
  case '2':
636
- $tag = $a_op_all.$wrap_op.'<div class="lkc-card">'.$content.$domain_info.'<div class="clear"></div></div>'.$wrap_cl.$a_cl_all;
637
  break;
638
  default:
639
- $tag = $a_op_all.$wrap_op.'<div class="lkc-card">'.$content.'<div class="clear"></div></div>'.$wrap_cl.$a_cl_all;
640
  }
641
 
642
  // 引用文扱い
@@ -655,17 +616,21 @@ class Pz_LinkCard {
655
  $url = null;
656
  return $url;
657
  }
658
-
659
  if (isset($url) && $url <> '') {
660
  $url = html_entity_decode($url);
661
  $url = preg_replace('/^[\s \'\"‘’“”″]*(.*?)[\s \'\"‘’“”″]*$/u', '\1', $url);
662
- $url = strip_tags($url);
663
- $url = htmlentities($url);
664
  $url = esc_url($url); // プロトコル除外など
665
- $array_url = parse_url($url);
666
- if ((isset($this->options['trail-slash']) ? $this->options['trail-slash'] : null) && (!isset($array_url['path']) || $array_url['path'] == '/')) {
667
- // URLがドメイン名だけの場合、最後のスラッシュを除外する
668
- $url = preg_replace('/\/$/u', '', $url);
 
 
 
 
 
 
669
  }
670
  }
671
  return $url;
@@ -697,7 +662,7 @@ class Pz_LinkCard {
697
  if ($now > $data['nexttime'] && $data['result_code'] <= 200 ) {
698
  $sns_renew = true;
699
  }
700
-
701
  // Twitter count.json 2015/11/21 非公式サービス終了に伴い停止→代替APIへ変更
702
  if (isset($this->options['sns-tw']) && !is_null($this->options['sns-tw'])) {
703
  $count_before = isset($data['sns_twitter']) ? $data['sns_twitter'] : -1;
@@ -706,7 +671,6 @@ class Pz_LinkCard {
706
  $result = wp_remote_get( 'http://jsoon.digitiminimi.com/twitter/count.json?url=' .rawurlencode($data['url']), $opt );
707
  if (isset($result) && !is_wp_error($result) && $result['response']['code'] == 200) {
708
  $count = intval(json_decode($result['body'])->count);
709
- // if ($count <> $count_before) {
710
  if ($count > $count_before) {
711
  $data['sns_twitter'] = $count;
712
  $update_cnt = true;
@@ -721,8 +685,8 @@ class Pz_LinkCard {
721
  $result = wp_remote_get( 'http://graph.facebook.com/?id=' .rawurlencode($data['url']), $opt );
722
  if (isset($result) && !is_wp_error($result) && $result['response']['code'] == 200) {
723
  $json = json_decode($result['body']);
724
- $count = intval(isset($json->shares) ? $json->shares : 0);
725
- if ($count <> $count_before) {
726
  $data['sns_facebook'] = $count;
727
  $update_cnt = true;
728
  }
@@ -736,7 +700,7 @@ class Pz_LinkCard {
736
  $result = wp_remote_get( 'http://api.b.st-hatena.com/entry.count?url=' .rawurlencode($data['url']), $opt );
737
  if (isset($result) && !is_wp_error($result) && $result['response']['code'] == 200) {
738
  $count = intval($result['body']);
739
- if ($count <> $count_before) {
740
  $data['sns_hatena'] = $count;
741
  $update_cnt = true;
742
  }
@@ -766,7 +730,7 @@ class Pz_LinkCard {
766
  'nexttime' => $nexttime
767
  ),
768
  array(
769
- 'url_key' => $data['url_key']
770
  )
771
  );
772
  return $data;
@@ -810,13 +774,23 @@ class Pz_LinkCard {
810
  $data['uptime'] = current_time('timestamp'); // 最終更新日時
811
 
812
  // 更新してみる
813
- $result = $wpdb->update(
814
- $this->db_name,
815
- $data,
816
- array(
817
- 'url_key' => $data['url_key']
818
- )
819
- );
 
 
 
 
 
 
 
 
 
 
820
  if (!$result) {
821
  $data['regist'] = current_time('mysql'); // 登録日
822
  // 更新できなかったら挿入
@@ -839,38 +813,103 @@ class Pz_LinkCard {
839
  if (!isset($data) || !is_array($data)) {
840
  return null;
841
  }
842
- if (isset($data['url']) && !is_null($data['url'])) {
843
- $url = $this->pz_TrimURL($data['url']);
844
- $result = $wpdb->delete($this->db_name, array('url' => $url), array('%s') );
845
- return $result;
846
- } elseif (isset($data['id']) && !is_null($data['id'])) {
847
  $data_id = intval($data['id']);
848
  $result = $wpdb->delete($this->db_name, array('id' => $data_id), array('%d') );
849
  return $result;
 
 
 
 
850
  }
851
  return null;
852
  }
853
 
854
- // TITLEとMETAタグを分解
855
- function pz_GetMeta($html, $tags = null, $clear = false) {
856
- if ($clear == true || !isset($tags)) {
857
- $tags = null;
858
- $tags = array('none' => 'none');
 
 
 
 
 
 
 
859
  }
860
 
861
- // TITLEタグ
862
- if (preg_match('/<\s*title\s*[^>]*>\s*(.*)\s*<\s*\/title\s*[^>]*>/si', $html, $m)) {
863
- $tags['title'] = esc_html($m[1]);
 
 
864
  }
865
 
866
- // metaタグ パース
867
- $match = null;
868
- preg_match_all('/<\s*meta\s(?=[^>]*?\b(?:name|property)\s*=\s*(?|"\s*([^"]*?)\s*"|\'\s*([^\']*?)\s*\'|([^"\'>]*?)(?=\s*\/?\s*>|\s\w+\s*=)))[^>]*?\bcontent\s*=\s*(?|"\s*([^"]*?)\s*"|\'\s*([^\']*?)\s*\'|([^"\'>]*?)(?=\s*\/?\s*>|\s\w+\s*=))[^>]*>/is', $html, $match);
869
- if (isset($match) && is_array($match) && count($match) == 3 && count($match[1]) > 0) {
870
- $tags += array_combine($match[1], $match[2]);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
871
  }
872
 
873
- return $tags;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
874
  }
875
 
876
  // 外部サイト取得
@@ -884,6 +923,7 @@ class Pz_LinkCard {
884
  $html = null;
885
  $error = true;
886
 
 
887
  $site_name = null;
888
  $title = null;
889
  $excerpt = null;
@@ -892,6 +932,7 @@ class Pz_LinkCard {
892
 
893
  $data['id'] = (isset( $data['id'] ) ? $data['id'] : null );
894
  $data['url_key'] = (isset( $data['url_key'] ) ? $data['url_key'] : null );
 
895
  $data['site_name'] = (isset( $data['site_name'] ) ? $data['site_name'] : null );
896
  $data['title'] = (isset( $data['title'] ) ? $data['title'] : null );
897
  $data['excerpt'] = (isset( $data['excerpt'] ) ? $data['excerpt'] : null );
@@ -907,7 +948,10 @@ class Pz_LinkCard {
907
  $data['nexttime'] = (isset( $data['nexttime'] ) ? $data['nexttime'] : 0 );
908
  $data['alive_time'] = (isset( $data['alive_time'] ) ? $data['alive_time'] : 0 );
909
  $data['alive_result'] = (isset( $data['alive_result'] ) ? $data['alive_result'] : 0 );
910
- if ( !isset( $data['domain'] ) ) {
 
 
 
911
  if (preg_match('{https?://(.+?)/}i', $url.'/',$m)) {
912
  $domain_url = $m[0];
913
  $domain = $m[1];
@@ -917,16 +961,20 @@ class Pz_LinkCard {
917
  }
918
  }
919
 
920
- if ( function_exists( 'curl_init' ) ) { // cURLを使用する
921
  $result_code = 0;
922
  $ch = curl_init($url);
923
- curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true ); // データで取得
924
- curl_setopt( $ch, CURLOPT_TIMEOUT, 8 ); // タイムアウト
925
  curl_setopt( $ch, CURLOPT_USERAGENT, esc_html( $_SERVER['HTTP_USER_AGENT'] ) ); // ユーザーエージェント
926
- curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true ); // リダイレクトを処理する
927
- curl_setopt( $ch, CURLOPT_MAXREDIRS, 8 ); // リダイレクトを処理する階層
928
- curl_setopt( $ch, CURLOPT_AUTOREFERER, true ); // リダイレクト用リファラを自動セット
929
- curl_setopt( $ch, CURLOPT_COOKIESESSION, true ); // セッションCOOKIEを使用する
 
 
 
 
930
  curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, (isset($this->options['flg-ssl']) ? false : true) ); // SSL検証
931
  $html = curl_exec($ch);
932
  $errno = intval( curl_errno( $ch ) );
@@ -983,32 +1031,55 @@ class Pz_LinkCard {
983
  }
984
 
985
  // タイトル
986
- if (isset( $tags['og:title'] ) && $tags['og:title'] ) {
987
- $title = $tags['og:title'] ;
988
- } elseif (isset( $tags['title'] ) && $tags['title'] ) {
989
- $title = $tags['title'] ;
 
 
990
  }
991
 
992
  // 抜粋文・概要文
993
- if (isset( $tags['og:description'] ) && $tags['og:description'] ) {
994
- $excerpt = $tags['og:description'] ;
995
- } elseif (isset( $tags['description'] ) && $tags['description'] ) {
996
- $excerpt = $tags['description'] ;
 
 
997
  }
998
 
999
- // // OGPから画像URL取得
1000
- if (isset( $tags['og:image'] ) && $tags['og:image'] ) {
1001
- $thumbnail_url = $tags['og:image'];
1002
- // if ( $sw_thumbnail == '1' ) {
1003
- // $thumbnail = '<img class="lkc-thumbnail-img" src="'.$thumbnail_url.'" alt="" />';
1004
- // }
1005
  }
1006
 
1007
  // サイト名
1008
  if (isset( $tags['og:site_name'] ) && $tags['og:site_name'] ) {
1009
  $site_name = $tags['og:site_name'] ;
1010
  }
1011
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1012
  // データセット
1013
  if (isset($data_id) && !is_null($data_id)) {
1014
  $data['id'] = $data_id;
@@ -1027,12 +1098,35 @@ class Pz_LinkCard {
1027
  $data['url'] = $url;
1028
  $data['thumbnail'] = ( isset($thumbnail_url) ? $thumbnail_url : null );
1029
  $data['result_code'] = $result_code;
 
1030
  $data['domain'] = $domain;
1031
- // $data['favicon'] = $favicon_url;
1032
 
1033
  return $data;
1034
  }
1035
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1036
  // 管理画面時のスタイルシート、スクリプト設定
1037
  public function enqueue_admin($hook) {
1038
  wp_enqueue_style ('wp-color-picker');
@@ -1088,24 +1182,37 @@ class Pz_LinkCard {
1088
 
1089
  global $wpdb;
1090
  $now = current_time('timestamp');
1091
- $result = (array) $wpdb->get_results($wpdb->prepare("SELECT url,alive_time FROM $this->db_name WHERE alive_time<%d ORDER BY alive_time ASC", $now));
1092
  $i = 0;
1093
- // if (isset($result) && is_array($result) && count($result) > 0) {
1094
- // foreach($result as $data) {
1095
- // $i++;
1096
- // if ($i > 5) {
1097
- // wp_schedule_single_event(time() + 10, 'pz_linkcard_alive');
1098
- // break;
1099
- // }
1100
- // if (isset($data) && isset($data->url)) {
1101
- // $before = array( 'url' => $data->url );
1102
- // $before = $this->pz_GetCache( $before );
1103
- // $before['alive_result'] = $before['result_code'];
1104
- // $before['alive_time'] = $now;
1105
- // $after = $this->pz_SetCache( $before );
1106
- // }
1107
- // }
1108
- // }
 
 
 
 
 
 
 
 
 
 
 
 
 
1109
  }
1110
 
1111
  // スタイルシート生成
@@ -1123,82 +1230,22 @@ class Pz_LinkCard {
1123
  require_once ('lib/pz-linkcard-settings.php');
1124
  }
1125
 
1126
- // プラグイン有効化
1127
- public function activation() {
1128
- // if ( is_multisite() ) {
1129
- // global $current_site , $current_blog ;
1130
- // if ( !$blog_id ) {
1131
- // return;
1132
- // }
1133
- // }
1134
-
1135
- $this->options = get_option( 'Pz_LinkCard_options', $this->defaults );
1136
- foreach( $this->defaults as $key => $value ) {
1137
- if ( !isset( $this->options[$key] ) ) {
1138
- $this->options[$key] = null;
1139
- }
1140
- }
1141
-
1142
- $this->options['plugin-version'] = $this->defaults['plugin-version'];
1143
- update_option('Pz_LinkCard_options', $this->options);
1144
-
1145
- $this->pz_SetStyle();
1146
-
1147
- global $wpdb;
1148
- $wpdb->hide_errors();
1149
-
1150
- $this->db_name = $wpdb->prefix.'pz_linkcard';
1151
- $sql = "CREATE TABLE ".$this->db_name." (
1152
- id INT UNSIGNED NOT NULL AUTO_INCREMENT,
1153
- url_key VARBINARY(255) NOT NULL,
1154
- url VARCHAR(2048) NOT NULL DEFAULT '',
1155
- site_name VARCHAR(100) ,
1156
- domain VARCHAR(253) ,
1157
- title VARCHAR(200) ,
1158
- excerpt VARCHAR(500) ,
1159
- thumbnail VARCHAR(2048) ,
1160
- favicon VARCHAR(2048) ,
1161
- means VARCHAR(32) ,
1162
- charset VARCHAR(32) ,
1163
- sns_time BIGINT UNSIGNED NOT NULL DEFAULT 0,
1164
- sns_nexttime BIGINT UNSIGNED NOT NULL DEFAULT 0,
1165
- sns_twitter INT ,
1166
- sns_facebook INT ,
1167
- sns_hatena INT ,
1168
- post_id INT UNSIGNED,
1169
- regist_time BIGINT UNSIGNED NOT NULL DEFAULT 0,
1170
- regist_result INT ,
1171
- update_time BIGINT UNSIGNED NOT NULL DEFAULT 0,
1172
- update_result INT ,
1173
- alive_time BIGINT UNSIGNED NOT NULL DEFAULT 0,
1174
- alive_result INT ,
1175
- uptime BIGINT UNSIGNED NOT NULL DEFAULT 0,
1176
- nexttime BIGINT UNSIGNED NOT NULL DEFAULT 0,
1177
- link_type INT UNSIGNED,
1178
- result_code INT ,
1179
- regist DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
1180
- PRIMARY KEY ( id ),
1181
- UNIQUE KEY ( url_key )
1182
- ) ".$wpdb->get_charset_collate()." ;";
1183
- require_once (ABSPATH.'wp-admin/includes/upgrade.php');
1184
- dbDelta($sql);
1185
 
1186
- wp_clear_scheduled_hook('pz_linkcard_check');
1187
- wp_clear_scheduled_hook('pz_linkcard_alive');
1188
- // wp_schedule_event(time() , 'hourly', 'pz_linkcard_check');
1189
- // wp_schedule_event(time() , 'hourly', 'pz_linkcard_alive');
1190
  }
1191
 
1192
  // プラグイン停止
1193
- public function deactivation() {
1194
  wp_clear_scheduled_hook('pz_linkcard_check');
1195
  wp_clear_scheduled_hook('pz_linkcard_alive');
1196
  }
1197
 
1198
- // プラグイン一覧のクイックメニュー
1199
- public function action_links($links) {
1200
- $links = array('<a href="options-general.php?page=pz-linkcard-settings">'.__('Settings', $this->text_domain).'</a>' , '<a href="tools.php?page=pz-linkcard-cache">'.__('Manage', $this->text_domain).'</a>' ) + $links;
1201
- return $links;
1202
- }
1203
  }
1204
  $Class_Pz_LinkCard = new Pz_LinkCard;
21
  public $plugin_dir_path;
22
  public $plugin_dir_url;
23
  public $plugin_link; // link to plugin page
24
+
25
  private $db_name;
26
 
27
  public $options;
32
  'code4' => null,
33
  'trail-slash' => '1',
34
  'border' => '1bk',
35
+ 'width' => '500',
36
+ 'content-height' => '108',
37
+ 'margin-top' => '4',
38
+ 'margin-right' => '16',
39
+ 'margin-bottom' => '16',
40
+ 'margin-left' => '4',
41
  'card-top' => null,
42
  'card-right' => null,
43
  'card-bottom' => null,
52
  'use-hatena' => null,
53
  'display-url' => '1',
54
  'display-excerpt' => '1',
55
+ 'trim-title' => 80,
56
  'trim-count' => 250,
57
+ 'trim-sitename' => 45,
58
  'info-position' => '1',
59
  'separator' => null,
60
  'size-title' => '16px',
61
+ 'size-url' => '10px',
62
  'size-excerpt' => '11px',
63
  'size-info' => '12px',
64
+ 'size-plugin' => '10px',
65
+ 'height-title' => '24px',
66
+ 'height-url' => '10px',
67
+ 'height-excerpt' => '17px',
68
+ 'height-info' => '12px',
69
+ 'height-plugin' => '10px',
70
  'color-title' => '#111111',
71
  'color-url' => '#4466ff',
72
  'color-excerpt' => '#333333',
93
  'in-thumbnail' => '1',
94
  'ex-favicon' => '3',
95
  'in-favicon' => '1',
96
+ 'favicon-api' => 'https://www.google.com/s2/favicons?domain=%DOMAIN%',
97
+ 'thumbnail-api' => 'https://s.wordpress.com/mshots/v1/%URL%?w=100',
98
  'thumbnail-position'=> '2',
99
  'thumbnail-shadow' => '1',
100
  'thumbnail-resize' => '1',
101
  'cache-time' => 31536000,
102
+ 'flg-redir' => '1',
103
+ 'flg-alive' => '1',
104
  'flg-ssl' => '1',
105
  'style-reset-img' => '1',
106
  'style' => null,
119
  'presence' => null,
120
  'plugin-link' => null,
121
  'plugin-name' => 'Pz-LinkCard',
122
+ 'plugin-version' => '1.7.3',
123
  'plugin-url' => 'http://poporon.poponet.jp/pz-linkcard',
124
  'pz-hbc-options' => null,
125
  'debug-time' => null
148
 
149
  // バージョンが違っていたら、DBとオプションを更新する
150
  if ($this->options['plugin-version'] <> $this->defaults['plugin-version']) {
151
+ $this->activate();
152
  }
153
 
154
  // CSS URLが空だったら生成
155
+ if (!isset($this->options['css-url']) || $this->options['css-url'] == '') {
156
  $this->pz_SetStyle();
157
  }
158
 
173
  // 管理画面のとき
174
  if (is_admin()) {
175
  load_plugin_textdomain ($this->text_domain, false, $this->slug.'/languages'); // 管理画面のみ日本語化
176
+ register_activation_hook (__FILE__, array($this, 'activate')); // 有効化したときの処理
177
+ register_deactivation_hook (__FILE__, array($this, 'deactivate')); // 無効化したときの処理
178
  add_action ('admin_menu', array($this, 'add_menu')); // 設定メニュー
179
  add_action ('admin_enqueue_scripts', array($this, 'enqueue_admin')); // 設定メニュー用スクリプト
180
  add_filter ('plugin_action_links_'.$this->plugin_basename, array($this, 'action_links')); // プラグイン画面
181
+
182
  if ((isset($this->options['style']) ? $this->options['style'] : '') == '') {
183
  if (is_null($this->options['css-path']) || !file_exists($this->options['css-path'])) {
184
  $this->pz_SetStyle();
224
  $atts['url'] = $url;
225
  }
226
  if ( is_null( $url ) ) {
227
+ return $slug.': '.__('Incorrect URL specification.', $text_domain);
228
  }
229
 
230
  // パラメータ
271
  return null;
272
  }
273
 
274
+ // モバイルチェック
275
+ if (function_exists('wp_is_mobile') && wp_is_mobile()) {
276
+ $is_mobile = true;
277
+ } else {
278
+ $is_mobile = false;
279
+ }
280
+
281
  // リンク先URLからドメイン名を抽出
282
  if (preg_match('{https?://(.+?)/}i', $url.'/',$m)) {
283
  $domain_url = $m[0];
288
  $error = true;
289
  }
290
 
 
 
 
 
 
 
 
291
  // 自サイトチェック
292
  if (preg_match('{'.home_url().'\/.*?}', $url.'/')) {
293
  if (get_permalink() == $url) {
295
  } else {
296
  $link_type = 2; // 自サイト内
297
  }
 
 
 
 
 
 
 
298
  } else {
299
  $link_type = 0; // 外部サイト
 
 
 
 
 
 
 
300
  }
301
 
302
  // モバイルかPCかのクラス名を追加
307
  $class_id .= ' '.$this->options['class-pc'];
308
  }
309
 
310
+ // キャッシュから取得
311
+ $data_id = null;
312
  $data = array();
313
  $data['url'] = $url;
314
  $result = $this->pz_GetCache( $data );
315
  if (isset($result) && is_array($result) && isset($result['url'])) {
316
  $data = $result;
317
+ $data_id = $data['id'];
318
+ $url = $data['url'];
319
+ }
320
+
321
+ // 内部リンクの処理
322
+ if ( $link_type ) {
323
+ $target = ''; // 同ページに開く
324
+ if (isset($this->options['in-target'])) {
325
+ if ($this->options['in-target'] == '1' || ($this->options['in-target'] == '2' && !$is_mobile)) {
326
+ $target = ' target="_blank"'; // 新しいページで開く
327
+ }
328
+ }
329
+ $nofollow = '';
330
+
331
+ // キャッシュが無い、もしくは常に最新を取得する、もしくは強制取得
332
+ if ( is_null($data_id) || $this->options['in-get'] <> 2 || ( isset($atts['force']) && $atts['force'] == true ) ) {
333
+ $data = $this->pz_GetPost( $data );
334
+ $data['link_type'] = 1;
335
+ $result = $this->pz_SetCache( $data );
336
+ }
337
+ }
338
+
339
+ // 外部リンクの処理
340
+ if ( !$link_type ) {
341
+ // リンクターゲットの設定
342
+ $target = ''; // 同ページに開く
343
+ if (isset($this->options['ex-target'])) {
344
+ if ($this->options['ex-target'] == '1' || ($this->options['ex-target'] == '2' && !$is_mobile)) {
345
+ $target = ' target="_blank"'; // 新しいページで開く
346
+ }
347
+ }
348
+ $nofollow = isset($this->options['nofollow']) ? ' rel="nofollow"' : '';
349
+
350
+ // キャッシュが無い、もしくは強制取得
351
+ if ( is_null($data_id) || ( isset($atts['force']) && $atts['force'] == true ) ) {
352
  $result = $this->pz_GetCURL( $data );
353
+ if ( isset($result) && is_array($result) && isset($result['url']) ) {
354
  $data = $result;
355
+ $data['link_type'] = 0;
356
+ $result = $this->pz_SetCache( $data );
357
  }
358
  }
 
 
 
 
 
 
359
  }
360
 
361
+ $data_id = (isset($data['id']) ? $data['id'] : null);
362
+ $site_name = (isset($data['site_name']) ? $data['site_name'] : null);
363
+ $title = (isset($data['title']) ? $data['title'] : null);
364
+ $excerpt = (isset($data['excerpt']) ? $data['excerpt'] : null);
365
+ $thumbnail_url = (isset($data['thumbnail']) ? $data['thumbnail'] : null);
366
+ $favicon_url = (isset($data['favicon']) ? $data['favicon'] : null);
367
+ $result_code = (isset($data['result_code']) ? $data['result_code'] : null);
368
+ $sns_tw = (isset($data['sns_twitter']) ? $data['sns_twitter'] : null);
369
+ $sns_fb = (isset($data['sns_facebook']) ? $data['sns_facebook'] : null);
370
+ $sns_hb = (isset($data['sns_hatena']) ? $data['sns_hatena'] : null);
371
+ $alive_result = (isset($data['alive_result']) ? $data['alive_result'] : null);
 
 
 
 
 
 
372
 
373
  $thumbnail = null;
374
  $favicon = null;
379
  $wrap_op = '<div class="lkc-this-wrap">';
380
  $wrap_cl = '</div>';
381
  $info = isset($this->options['th-info']) ? $this->options['th-info'] : '' ;
382
+ $sw_thumbnail = isset($this->options['in-thumbnail']) ? $this->options['in-thumbnail'] : '0' ;
383
+ $sw_favicon = isset($this->options['in-favicon']) ? $this->options['in-favicon'] : '0' ;
384
  break;
385
  case '2':
386
  $wrap_op = '<div class="lkc-internal-wrap">';
398
  break;
399
  }
400
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
401
  // 外部リンクの処理
402
  if ( !$link_type && isset($this->options['use-hatena']) && !is_null($this->options['use-hatena'] ) ) {
403
  // 「はてなブログカード」をそのまま利用する
410
  return $tag;
411
  }
412
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
413
  // サムネイル取得
414
  if ( !$this->options['thumbnail-position'] || ( $result_code <> 0 && $result_code <> 200 ) ) {
415
  $thumbnail = null;
416
  } else {
417
+ if ($sw_thumbnail == '1' || $sw_thumbnail == '13') {
418
+ if ( !is_null($thumbnail_url ) ) {
419
+ $thumbnail = '<img class="lkc-thumbnail-img" src="'.$thumbnail_url.'" alt="" />';
420
+ } elseif ($sw_thumbnail == '13') {
421
+ $sw_thumbnail == '3';
422
+ }
423
+ }
424
  if ($sw_thumbnail == '3') {
425
+ // 画像取得(WebAPI)
426
  if (isset($this->options['thumbnail-api'])) {
427
  $thumbnail = preg_replace('/%DOMAIN_URL%/', $domain_url, $this->options['thumbnail-api'] );
428
  $thumbnail = preg_replace('/%DOMAIN%/', $domain, $thumbnail);
431
  }
432
  }
433
  }
434
+
435
  // ファビコン取得
436
  if (!isset($this->options['info-position'])) {
437
  $favicon = null;
438
  } else{
439
+ if ($sw_favicon == '1' || $sw_favicon == '13') {
440
+ if ( !is_null($favicon_url ) ) {
441
+ $favicon = '<img class="lkc-favicon" src="'.$favicon_url.'" alt="" />';
442
+ } elseif ($sw_favicon == '13') {
443
+ $sw_favicon == '3';
444
+ }
445
+ }
446
  if ($sw_favicon == '3') {
447
+ // サイトアイコン取得(WebAPI)
448
  if (isset($this->options['favicon-api'])) {
449
  $favicon = preg_replace('/%DOMAIN_URL%/', $domain_url, $this->options['favicon-api'] );
450
  $favicon = preg_replace('/%DOMAIN%/', $domain, $favicon);
516
  }
517
 
518
  // リンク先URL
519
+ $not_allow_code = array('403','410');
520
+ if (array_search($alive_result, $not_allow_code)) {
521
+ $a_op_all = '<span style="cursor: not-allowed;" title="">';
522
+ $a_cl_all = '</span>';
 
523
  $a_op = '';
524
  $a_cl = '';
525
+ $st_op = '<strike>';
526
+ $st_cl = '</strike>';
527
+ } elseif ((isset($this->options['link-all']) ? $this->options['link-all'] : null) == '1') {
528
+ $a_op_all = '<a class="no_icon" href="'.$url.'"'.$target.$nofollow.'>';
529
+ $a_cl_all = '</a>';
530
+ $a_op = '';
531
+ $a_cl = '';
532
+ $st_op = '';
533
+ $st_cl = '';
534
  } else {
535
  $a_op_all = '';
536
  $a_cl_all = '';
537
+ $a_op = '<a class="no_icon" href="'.$url.'"'.$target.$nofollow.'>';
538
+ $a_cl = '</a>';
539
+ $st_op = '';
540
+ $st_cl = '';
541
  }
542
 
543
  // ソーシャルカウントの表示
586
  $domain_info = '<div class="lkc-info">'.$a_op.'<span class="lkc-domain"'.$site_title.'>'.$favicon.'&nbsp;'.$site_name.$info.'</span>'.$a_cl.'&nbsp;'.$sns_info.$this->plugin_link.'</div>';
587
 
588
  // 記事内容
589
+ $content = '<div class="lkc-content">'.$a_op.$thumbnail.'<span class="lkc-title">'.$title.'</span>'.$a_cl.$sns_title.'<div class="lkc-url"><cite>'.$st_op.$a_op.$url.$st_cl.$a_cl.'</cite></div><div class="lkc-excerpt">'.$excerpt.'</div></div>';
590
 
591
  // HTMLタグ作成
592
  switch (isset($this->options['info-position']) ? $this->options['info-position'] : null) {
593
  case '1':
594
+ $tag = $wrap_op.$a_op_all.'<div class="lkc-card">'.$domain_info.$content.'<div class="clear"></div></div>'.$a_cl_all.$wrap_cl;
595
  break;
596
  case '2':
597
+ $tag = $wrap_op.$a_op_all.'<div class="lkc-card">'.$content.$domain_info.'<div class="clear"></div></div>'.$a_cl_all.$wrap_cl;
598
  break;
599
  default:
600
+ $tag = $wrap_op.$a_op_all.'<div class="lkc-card">'.$content.'<div class="clear"></div></div>'.$a_cl_all.$wrap_cl;
601
  }
602
 
603
  // 引用文扱い
616
  $url = null;
617
  return $url;
618
  }
619
+
620
  if (isset($url) && $url <> '') {
621
  $url = html_entity_decode($url);
622
  $url = preg_replace('/^[\s \'\"‘’“”″]*(.*?)[\s \'\"‘’“”″]*$/u', '\1', $url);
 
 
623
  $url = esc_url($url); // プロトコル除外など
624
+ switch (isset($this->options['trail-slash']) ? $this->options['trail-slash'] : null) {
625
+ case '1': // URLがドメイン名だけの場合、最後のスラッシュを除外する
626
+ $array_url = parse_url($url);
627
+ if (!isset($array_url['path']) || $array_url['path'] == '/') {
628
+ $url = rtrim($url, '/');
629
+ }
630
+ break;
631
+ case '2': // 常に最後のスラッシュを除外する
632
+ $url = rtrim($url, '/');
633
+ break;
634
  }
635
  }
636
  return $url;
662
  if ($now > $data['nexttime'] && $data['result_code'] <= 200 ) {
663
  $sns_renew = true;
664
  }
665
+
666
  // Twitter count.json 2015/11/21 非公式サービス終了に伴い停止→代替APIへ変更
667
  if (isset($this->options['sns-tw']) && !is_null($this->options['sns-tw'])) {
668
  $count_before = isset($data['sns_twitter']) ? $data['sns_twitter'] : -1;
671
  $result = wp_remote_get( 'http://jsoon.digitiminimi.com/twitter/count.json?url=' .rawurlencode($data['url']), $opt );
672
  if (isset($result) && !is_wp_error($result) && $result['response']['code'] == 200) {
673
  $count = intval(json_decode($result['body'])->count);
 
674
  if ($count > $count_before) {
675
  $data['sns_twitter'] = $count;
676
  $update_cnt = true;
685
  $result = wp_remote_get( 'http://graph.facebook.com/?id=' .rawurlencode($data['url']), $opt );
686
  if (isset($result) && !is_wp_error($result) && $result['response']['code'] == 200) {
687
  $json = json_decode($result['body']);
688
+ $count = intval(isset($json->share->share_count) ? $json->share->share_count : 0);
689
+ if ($count > $count_before) {
690
  $data['sns_facebook'] = $count;
691
  $update_cnt = true;
692
  }
700
  $result = wp_remote_get( 'http://api.b.st-hatena.com/entry.count?url=' .rawurlencode($data['url']), $opt );
701
  if (isset($result) && !is_wp_error($result) && $result['response']['code'] == 200) {
702
  $count = intval($result['body']);
703
+ if ($count > $count_before) {
704
  $data['sns_hatena'] = $count;
705
  $update_cnt = true;
706
  }
730
  'nexttime' => $nexttime
731
  ),
732
  array(
733
+ 'id' => $data['id']
734
  )
735
  );
736
  return $data;
774
  $data['uptime'] = current_time('timestamp'); // 最終更新日時
775
 
776
  // 更新してみる
777
+ if ( isset($data['id']) ) {
778
+ $result = $wpdb->update(
779
+ $this->db_name,
780
+ $data,
781
+ array(
782
+ 'id' => $data['id']
783
+ )
784
+ );
785
+ } else {
786
+ $result = $wpdb->update(
787
+ $this->db_name,
788
+ $data,
789
+ array(
790
+ 'url_key' => $data['url_key']
791
+ )
792
+ );
793
+ }
794
  if (!$result) {
795
  $data['regist'] = current_time('mysql'); // 登録日
796
  // 更新できなかったら挿入
813
  if (!isset($data) || !is_array($data)) {
814
  return null;
815
  }
816
+ if (isset($data['id']) && !is_null($data['id'])) {
 
 
 
 
817
  $data_id = intval($data['id']);
818
  $result = $wpdb->delete($this->db_name, array('id' => $data_id), array('%d') );
819
  return $result;
820
+ } elseif (isset($data['url']) && !is_null($data['url'])) {
821
+ $url = $this->pz_TrimURL($data['url']);
822
+ $result = $wpdb->delete($this->db_name, array('url' => $url), array('%s') );
823
+ return $result;
824
  }
825
  return null;
826
  }
827
 
828
+ // サイト内取得
829
+ public function pz_GetPost( $data ) {
830
+ // サイト名取得
831
+ $site_name = get_bloginfo('name');
832
+
833
+ // ドメイン名
834
+ if (preg_match('{https?://(.*)/}i', home_url().'/',$m)) {
835
+ $domain_url = $m[0];
836
+ $domain = $m[1];
837
+ } else {
838
+ $domain_url = null;
839
+ $domain = null;
840
  }
841
 
842
+ // サイトアイコン
843
+ if (function_exists('has_site_icon') && has_site_icon()) {
844
+ $favicon = get_site_icon_url(16, '', 0);
845
+ } else {
846
+ $favicon = null;
847
  }
848
 
849
+ $title = null;
850
+ $excerpt = null;
851
+ $thumbnail = null;
852
+
853
+ // 記事内容
854
+ $post_id = url_to_postid( $data['url'] ); // 記事IDを取得
855
+ if ( $post_id ) {
856
+ $result_code = 200; // 外部取得と同じコードをセット
857
+ $post = get_post($post_id); // 記事情報
858
+ if ( $this->options['in-get'] ) {
859
+ $title = $post->post_title; // 記事タイトル
860
+ $excerpt = $post->post_content; // 記事内容から抜粋
861
+ } else {
862
+ $title = $post->post_title; // 記事タイトル
863
+ $excerpt = $post->post_excerpt; // 抜粋文優先
864
+ if ($excerpt == '') {
865
+ $excerpt = $post->post_content; // 抜粋文が無かったら記事
866
+ }
867
+ }
868
+ $thumbnail_id = get_post_thumbnail_id( $post_id ); // サムネイル
869
+ $thumbnail = wp_get_attachment_image_src( $thumbnail_id , true )[0];
870
+ } else {
871
+ // カテゴリページ等は内部取得できないので外部取得する
872
+ $data = $this->pz_GetCURL( $data );
873
+ $title = $data['title'];
874
+ $excerpt = $data['excerpt'];
875
+ $site_name = $data['site_name'];
876
+ $thumbnail = $data['thumbnail'];
877
+ $result_code = $data['result_code'];
878
  }
879
 
880
+ // タイトル整形
881
+ if (isset($title)) {
882
+ $str = $title;
883
+ $str = strip_tags($str); // タグの除去
884
+ $str = str_replace(array("\r", "\n"), '', $str); // 改行削除
885
+ $str = esc_html($str); // 念のためエスケープ
886
+ $str = mb_strimwidth($str, 0, 200, '...'); // 保管用のタイトルは200文字で切る
887
+ $title = $str;
888
+ }
889
+
890
+ // 抜粋文整形
891
+ if (isset($excerpt)) {
892
+ $str = $excerpt;
893
+ $str = strip_tags($str); // タグの除去
894
+ $str = preg_replace('/<!--more-->.+/is', '', $str); // moreタグ以降削除
895
+ $str = preg_replace('/\[[^]]*\]/', '', $str); // ショートコードすべて除去
896
+ $str = str_replace(array("\r", "\n"), '', $str); // 改行削除
897
+ $str = esc_html($str); // 念のためエスケープ
898
+ $str = mb_strimwidth($str, 0, 500, '...'); // 保管用の記事内容は500文字で切る
899
+ $excerpt = $str;
900
+ }
901
+
902
+ // データセット
903
+ $data['title'] = $title;
904
+ $data['excerpt'] = $excerpt;
905
+ $data['thumbnail'] = $thumbnail;
906
+ $data['result_code'] = $result_code;
907
+ $data['alive_result'] = $result_code;
908
+ $data['domain'] = $domain;
909
+ $data['site_name'] = $site_name;
910
+ $data['favicon'] = $favicon;
911
+
912
+ return $data;
913
  }
914
 
915
  // 外部サイト取得
923
  $html = null;
924
  $error = true;
925
 
926
+ $domain = null;
927
  $site_name = null;
928
  $title = null;
929
  $excerpt = null;
932
 
933
  $data['id'] = (isset( $data['id'] ) ? $data['id'] : null );
934
  $data['url_key'] = (isset( $data['url_key'] ) ? $data['url_key'] : null );
935
+ $data['domain'] = (isset( $data['domain'] ) ? $data['domain'] : null );
936
  $data['site_name'] = (isset( $data['site_name'] ) ? $data['site_name'] : null );
937
  $data['title'] = (isset( $data['title'] ) ? $data['title'] : null );
938
  $data['excerpt'] = (isset( $data['excerpt'] ) ? $data['excerpt'] : null );
948
  $data['nexttime'] = (isset( $data['nexttime'] ) ? $data['nexttime'] : 0 );
949
  $data['alive_time'] = (isset( $data['alive_time'] ) ? $data['alive_time'] : 0 );
950
  $data['alive_result'] = (isset( $data['alive_result'] ) ? $data['alive_result'] : 0 );
951
+ if ( isset( $data['domain'] ) ) {
952
+ $domain_url = $data['domain'];
953
+ $domain = $data['domain'];
954
+ } else {
955
  if (preg_match('{https?://(.+?)/}i', $url.'/',$m)) {
956
  $domain_url = $m[0];
957
  $domain = $m[1];
961
  }
962
  }
963
 
964
+ if ( function_exists( 'curl_init' ) ) { // cURLを使用する
965
  $result_code = 0;
966
  $ch = curl_init($url);
967
+ curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true ); // データで取得
968
+ curl_setopt( $ch, CURLOPT_TIMEOUT, 8 ); // タイムアウト
969
  curl_setopt( $ch, CURLOPT_USERAGENT, esc_html( $_SERVER['HTTP_USER_AGENT'] ) ); // ユーザーエージェント
970
+ if (isset($this->options['flg-redir']) ? true : false) {
971
+ curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true ); // リダイレクトを処理する
972
+ curl_setopt( $ch, CURLOPT_MAXREDIRS, 8 ); // リダイレクトを処理する階層
973
+ curl_setopt( $ch, CURLOPT_AUTOREFERER, true ); // リダイレクト用リファラを自動セット
974
+ } else {
975
+ curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, false ); // リダイレクトを処理しない
976
+ }
977
+ curl_setopt( $ch, CURLOPT_COOKIESESSION, true ); // セッションCOOKIEを使用する
978
  curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, (isset($this->options['flg-ssl']) ? false : true) ); // SSL検証
979
  $html = curl_exec($ch);
980
  $errno = intval( curl_errno( $ch ) );
1031
  }
1032
 
1033
  // タイトル
1034
+ if (isset( $tags['og:title'] ) && $tags['og:title'] ) {
1035
+ $title = $tags['og:title'] ;
1036
+ } elseif (isset( $tags['twitter:title'] ) && $tags['twitter:title'] ) {
1037
+ $title = $tags['twitter:title'] ;
1038
+ } elseif (isset( $tags['title'] ) && $tags['title'] ) {
1039
+ $title = $tags['title'] ;
1040
  }
1041
 
1042
  // 抜粋文・概要文
1043
+ if (isset( $tags['og:description'] ) && $tags['og:description'] ) {
1044
+ $excerpt = $tags['og:description'] ;
1045
+ } elseif (isset( $tags['twitter:description'] ) && $tags['twitter:description'] ) {
1046
+ $excerpt = $tags['twitter:description'] ;
1047
+ } elseif (isset( $tags['description'] ) && $tags['description'] ) {
1048
+ $excerpt = $tags['description'] ;
1049
  }
1050
 
1051
+ // OGPから画像URL取得
1052
+ if (isset( $tags['og:image'] ) && $tags['og:image'] ) {
1053
+ $thumbnail_url = $tags['og:image'] ;
1054
+ } elseif (isset( $tags['twitter:image'] ) && $tags['twitter:image'] ) {
1055
+ $thumbnail_url = $tags['twitter:image'] ;
 
1056
  }
1057
 
1058
  // サイト名
1059
  if (isset( $tags['og:site_name'] ) && $tags['og:site_name'] ) {
1060
  $site_name = $tags['og:site_name'] ;
1061
  }
1062
+
1063
+ // タイトル整形
1064
+ if (isset($title)) {
1065
+ $str = $title;
1066
+ $str = strip_tags($str); // タグの除去
1067
+ $str = str_replace(array("\r", "\n"), '', $str); // 改行削除
1068
+ $str = esc_html($str); // 念のためエスケープ
1069
+ $str = mb_strimwidth($str, 0, 200, '...'); // 保管用のタイトルは200文字で切る
1070
+ $title = $str;
1071
+ }
1072
+
1073
+ // 抜粋文整形
1074
+ if (isset($excerpt)) {
1075
+ $str = $excerpt;
1076
+ $str = strip_tags($str); // タグの除去
1077
+ $str = str_replace(array("\r", "\n"), '', $str); // 改行削除
1078
+ $str = esc_html($str); // 念のためエスケープ
1079
+ $str = mb_strimwidth($str, 0, 500, '...'); // 保管用の記事内容は500文字で切る
1080
+ $excerpt = $str;
1081
+ }
1082
+
1083
  // データセット
1084
  if (isset($data_id) && !is_null($data_id)) {
1085
  $data['id'] = $data_id;
1098
  $data['url'] = $url;
1099
  $data['thumbnail'] = ( isset($thumbnail_url) ? $thumbnail_url : null );
1100
  $data['result_code'] = $result_code;
1101
+ $data['alive_result'] = $result_code;
1102
  $data['domain'] = $domain;
1103
+ $data['favicon'] = ( isset($favicon_url) ? $favicon_url : null );
1104
 
1105
  return $data;
1106
  }
1107
 
1108
+ // TITLEとMETAタグを分解
1109
+ function pz_GetMeta($html, $tags = null, $clear = false) {
1110
+ if ($clear == true || !isset($tags)) {
1111
+ $tags = null;
1112
+ $tags = array('none' => 'none');
1113
+ }
1114
+
1115
+ // TITLEタグ
1116
+ if (preg_match('/<\s*title\s*[^>]*>\s*(.*)\s*<\s*\/title\s*[^>]*>/si', $html, $m)) {
1117
+ $tags['title'] = esc_html($m[1]);
1118
+ }
1119
+
1120
+ // metaタグ パース
1121
+ $match = null;
1122
+ preg_match_all('/<\s*meta\s(?=[^>]*?\b(?:name|property)\s*=\s*(?|"\s*([^"]*?)\s*"|\'\s*([^\']*?)\s*\'|([^"\'>]*?)(?=\s*\/?\s*>|\s\w+\s*=)))[^>]*?\bcontent\s*=\s*(?|"\s*([^"]*?)\s*"|\'\s*([^\']*?)\s*\'|([^"\'>]*?)(?=\s*\/?\s*>|\s\w+\s*=))[^>]*>/is', $html, $match);
1123
+ if (isset($match) && is_array($match) && count($match) == 3 && count($match[1]) > 0) {
1124
+ $tags += array_combine($match[1], $match[2]);
1125
+ }
1126
+
1127
+ return $tags;
1128
+ }
1129
+
1130
  // 管理画面時のスタイルシート、スクリプト設定
1131
  public function enqueue_admin($hook) {
1132
  wp_enqueue_style ('wp-color-picker');
1182
 
1183
  global $wpdb;
1184
  $now = current_time('timestamp');
1185
+ $result = (array) $wpdb->get_results($wpdb->prepare("SELECT url,alive_time FROM $this->db_name WHERE alive_time<%d ORDER BY alive_time ASC", $now - WEEK_IN_SECONDS ));
1186
  $i = 0;
1187
+ if (isset($result) && is_array($result) && count($result) > 0) {
1188
+ foreach($result as $data) {
1189
+ $i++;
1190
+ if ($i > 10) {
1191
+ wp_schedule_single_event(time() + 30, 'pz_linkcard_alive');
1192
+ break;
1193
+ }
1194
+ if (isset($data) && isset($data->url)) {
1195
+ $before = $this->pz_GetCache( array( 'url' => $data->url ) );
1196
+ $after = $this->pz_GetCURL( $before );
1197
+ if ($before['alive_result'] <> $after['result_code'] ) { // 結果コードが違っている
1198
+ $before['alive_result'] = $after['result_code'];
1199
+ } else {
1200
+ if ($before['title'] <> $after['title'] ) {
1201
+ if ($before['excerpt'] <> $after['excerpt'] ) {
1202
+ $before['alive_result'] = -3; // タイトルと抜粋文変更あり
1203
+ }
1204
+ $before['alive_result'] = -1; // タイトル変更あり
1205
+ } else {
1206
+ if ($before['excerpt'] <> $after['excerpt'] ) {
1207
+ $before['alive_result'] = -2; // 抜粋文変更あり
1208
+ }
1209
+ }
1210
+ }
1211
+ $before['alive_time'] = $now;
1212
+ $before = $this->pz_SetCache( $before );
1213
+ }
1214
+ }
1215
+ }
1216
  }
1217
 
1218
  // スタイルシート生成
1230
  require_once ('lib/pz-linkcard-settings.php');
1231
  }
1232
 
1233
+ // プラグイン一覧のクイックメニュー
1234
+ public function action_links($links) {
1235
+ $links = array('<a href="options-general.php?page=pz-linkcard-settings">'.__('Settings', $this->text_domain).'</a>' , '<a href="tools.php?page=pz-linkcard-cache">'.__('Manage', $this->text_domain).'</a>' ) + $links;
1236
+ return $links;
1237
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1238
 
1239
+ // プラグイン有効化
1240
+ public function activate() {
1241
+ require_once ('lib/pz-linkcard-init.php');
 
1242
  }
1243
 
1244
  // プラグイン停止
1245
+ public function deactivate() {
1246
  wp_clear_scheduled_hook('pz_linkcard_check');
1247
  wp_clear_scheduled_hook('pz_linkcard_alive');
1248
  }
1249
 
 
 
 
 
 
1250
  }
1251
  $Class_Pz_LinkCard = new Pz_LinkCard;
readme.txt CHANGED
@@ -39,9 +39,6 @@ The goodbye to the text-only link.
39
  ※このプラグインはサムネイルの取得やサイトアイコンの取得のためにリンク先のURLをWebAPIに送信します。また、タイトル・抜粋文をDBへ保存します。詳細は「Arbitrary section」をお読みください。
40
 
41
 
42
- まだ成熟したプラグインでは無いので、ご意見やご要望があればなるべくお応えしていきたいと思います。
43
-
44
-
45
  == Installation ==
46
 
47
  WordPressダッシュボードからのインストール
@@ -72,10 +69,12 @@ WordPress.org からのダウンロードおよびインストール
72
 
73
  1. WordPress.orgのプラグイン一覧から「Pz-LinkCard」を検索します
74
 
75
- (Download ZIP file from http://poporon.poponet.jp/pz-linkcard )
76
 
77
  2. プラグイン名と作者を確認していただき、ダウンロードします
78
 
 
 
79
  3. WordPressをインストールしているディレクトリ配下の、「/wp-content/plugins」ディレクトリ配下に「pz-linkcard」ディレクトリを作成します
80
 
81
  (Upload pz-linkcard directory to the /wp-content/plugins/ directory)
@@ -87,21 +86,6 @@ WordPress.org からのダウンロードおよびインストール
87
  (Activate the plugin through the 'Plugins' menu in WordPress)
88
 
89
 
90
- 当サイトからのダウンロードおよびインストール
91
-
92
- 1. 当サイト「ぽぽづれ。」へアクセスしてください http://poporon.poponet.jp
93
-
94
- 2. リンクを辿るか、直接プラグインのページを開きます http://poporon.poponet.jp/pz-linkcard
95
-
96
- 3. 下の方にZIPファイルのダウンロードリンクがあるので、ダウンロードします
97
-
98
- 4. WordPressをインストールしているディレクトリ配下の、「/wp-content/plugins」ディレクトリ配下に「pz-linkcard」ディレクトリを作成します
99
-
100
- 5. ダウンロードしたZIPファイルを展開します
101
-
102
- 6. プラグイン一覧から「有効化」を選んで、有効化します
103
-
104
-
105
  新しいバージョンを有効化したら動作しなくなった場合
106
 
107
  1. Pz-LinkCard がインストールされているディレクトリ名を変更もしくは削除します
@@ -159,7 +143,7 @@ Q5.
159
  SSLサイトの内容が取得できません。
160
 
161
  A5.
162
- ブログサイトのcURLでアクセスを行った際にサーバー側にSSL証明書が更新されていないためにSSL検証が失敗されるためと思われます。SSL検証を行わない設定は現在ありません。
163
 
164
  == Screenshots ==
165
 
@@ -171,6 +155,29 @@ A5.
171
 
172
  == Changelog ==
173
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
174
  = 1.7.4 =
175
  * Fixed: Fixed a bug that table is not created.
176
 
@@ -440,7 +447,7 @@ Displays using the `WordPress.org mshots API` to get the thumbnail. This can be
440
 
441
  画像取得APIの設定については、下記のページを参照ください。
442
 
443
- http://poporon.poponet.jp/20151004/9317
444
 
445
 
446
  サイトアイコン(ファビコン)についても、同様にWebAPIを使用して取得しています。
39
  ※このプラグインはサムネイルの取得やサイトアイコンの取得のためにリンク先のURLをWebAPIに送信します。また、タイトル・抜粋文をDBへ保存します。詳細は「Arbitrary section」をお読みください。
40
 
41
 
 
 
 
42
  == Installation ==
43
 
44
  WordPressダッシュボードからのインストール
69
 
70
  1. WordPress.orgのプラグイン一覧から「Pz-LinkCard」を検索します
71
 
72
+ (Search "pz-linkcard" plugin from wordpress.org)
73
 
74
  2. プラグイン名と作者を確認していただき、ダウンロードします
75
 
76
+ (Download ZIP file)
77
+
78
  3. WordPressをインストールしているディレクトリ配下の、「/wp-content/plugins」ディレクトリ配下に「pz-linkcard」ディレクトリを作成します
79
 
80
  (Upload pz-linkcard directory to the /wp-content/plugins/ directory)
86
  (Activate the plugin through the 'Plugins' menu in WordPress)
87
 
88
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
89
  新しいバージョンを有効化したら動作しなくなった場合
90
 
91
  1. Pz-LinkCard がインストールされているディレクトリ名を変更もしくは削除します
143
  SSLサイトの内容が取得できません。
144
 
145
  A5.
146
+ ブログサイトのcURLでアクセスを行った際にサーバー側にSSL証明書が更新されていないためにSSL検証が失敗されるためと思われます。SSL検証を行わない設定を有効にしてみてください。
147
 
148
  == Screenshots ==
149
 
155
 
156
  == Changelog ==
157
 
158
+ = 1.7.5 =
159
+ * Cleaning up garbage from the database at activation.
160
+ * Modefied: Cleaned up the settings screen
161
+ * Modefied: Add tips at settings screen
162
+ * Modefied: Added setting. `Height` in letter.
163
+ * Modefied: Added setting. Trailing slash.
164
+ * Fixed: facebook API.
165
+ * Fixed: bugfix.
166
+
167
+ * アクティベート/バージョンアップ時に重複データを削除。
168
+ * Pzカード設定画面の項目追加と整理。
169
+ * Pzカード設定画面に用例などを追加。
170
+ * Pzカード管理画面での内部リンクの判定方法を変更。
171
+ * サイト情報、タイトル、URL、抜粋文部分の行の高さを追加。
172
+ * 内部リンクのキャッシュが正常に作成されない場合があったのを修正。
173
+ * 内部リンクをキャッシュから取得した場合に画像が表示されなかったのを修正。
174
+ * リンク先がリダイレクトされているときの追尾を選択できる設定を追加。
175
+ * リンク先がリンク切れになっていないかチェックする設定を追加。
176
+ * リンク先がリンク切れの場合、Aタグを無効にする設定を追加。
177
+ * 末尾のスラッシュを無視する設定を追加。
178
+ * フェイスブックのシェア数取得方法の修正。
179
+
180
+
181
  = 1.7.4 =
182
  * Fixed: Fixed a bug that table is not created.
183
 
447
 
448
  画像取得APIの設定については、下記のページを参照ください。
449
 
450
+ https://popozure.info/20151004/9317
451
 
452
 
453
  サイトアイコン(ファビコン)についても、同様にWebAPIを使用して取得しています。
screenshot-5.png CHANGED
Binary file
templete/pz-linkcard-templete.css CHANGED
@@ -1,4 +1,4 @@
1
- /* [Pz-LkC][1.7.3] CSS */
2
  .linkcard {
3
  /*MARGIN-TOP*/
4
  /*MARGIN-BOTTOM*/
@@ -21,7 +21,6 @@
21
  /*WIDTH*/
22
  /*IN-BGCOLOR*/
23
  /*IN-IMAGE*/
24
- line-height: 100%;
25
  /*WRAP*/
26
  }
27
  .lkc-internal-wrap::after {
@@ -40,7 +39,6 @@
40
  /*WIDTH*/
41
  /*EX-BGCOLOR*/
42
  /*EX-IMAGE*/
43
- line-height: 100%;
44
  /*WRAP*/
45
  }
46
  .lkc-external-wrap::after {
@@ -59,7 +57,6 @@
59
  /*WIDTH*/
60
  /*TH-BGCOLOR*/
61
  /*TH-IMAGE*/
62
- line-height: 100%;
63
  /*WRAP*/
64
  }
65
  .lkc-this-wrap::after {
@@ -89,8 +86,8 @@
89
  /*COLOR-TITLE*/
90
  /*OUTCOLOR-TITLE*/
91
  /*SIZE-TITLE*/
 
92
  font-weight: bold;
93
- line-height: 20px;
94
  overflow: hidden;
95
  word-break: break-all;
96
  }
@@ -101,9 +98,9 @@
101
  /*COLOR-URL*/
102
  /*OUTCOLOR-URL*/
103
  /*SIZE-URL*/
 
104
  font-weight: normal;
105
  text-decoration: underline;
106
- line-height: 12px;
107
  white-space: nowrap;
108
  overflow: hidden;
109
  text-overflow: ellipsis;
@@ -113,9 +110,9 @@
113
  /*COLOR-EXCERPT*/
114
  /*OUTCOLOR-EXCERPT*/
115
  /*SIZE-EXCERPT*/
 
116
  padding: 0;
117
  margin: 6px 0 0 0;
118
- line-height: 15px;
119
  overflow: hidden;
120
  }
121
  .lkc-thumbnail {
@@ -137,6 +134,7 @@
137
  /*COLOR-INFO*/
138
  /*OUTCOLOR-INFO*/
139
  /*SIZE-INFO*/
 
140
  overflow: hidden;
141
  display: inline /*IMPORTANT*/;
142
  }
@@ -144,6 +142,7 @@
144
  /*COLOR-INFO*/
145
  /*OUTCOLOR-INFO*/
146
  /*SIZE-INFO*/
 
147
  text-decoration: none;
148
  display: inline /*IMPORTANT*/;
149
  }
@@ -151,6 +150,7 @@
151
  /*COLOR-INFO*/
152
  /*OUTCOLOR-INFO*/
153
  /*SIZE-INFO*/
 
154
  text-decoration: underline;
155
  display: inline /*IMPORTANT*/;
156
  }
@@ -159,7 +159,7 @@
159
  width: 16px;
160
  margin: 0 4px;
161
  border: none;
162
- vertical-align: top;
163
  display: inline /*IMPORTANT*/;
164
  }
165
  .lkc-name a {
@@ -169,6 +169,7 @@
169
  /*COLOR-PLUGIN*/
170
  /*OUTCOLOR-PLUGIN*/
171
  /*SIZE-PLUGIN*/
 
172
  opacity: 0.5;
173
  text-decoration: none;
174
  /*CREDIT*/
1
+ /* [Pz-LkC][1.7.5] CSS */
2
  .linkcard {
3
  /*MARGIN-TOP*/
4
  /*MARGIN-BOTTOM*/
21
  /*WIDTH*/
22
  /*IN-BGCOLOR*/
23
  /*IN-IMAGE*/
 
24
  /*WRAP*/
25
  }
26
  .lkc-internal-wrap::after {
39
  /*WIDTH*/
40
  /*EX-BGCOLOR*/
41
  /*EX-IMAGE*/
 
42
  /*WRAP*/
43
  }
44
  .lkc-external-wrap::after {
57
  /*WIDTH*/
58
  /*TH-BGCOLOR*/
59
  /*TH-IMAGE*/
 
60
  /*WRAP*/
61
  }
62
  .lkc-this-wrap::after {
86
  /*COLOR-TITLE*/
87
  /*OUTCOLOR-TITLE*/
88
  /*SIZE-TITLE*/
89
+ /*HEIGHT-TITLE*/
90
  font-weight: bold;
 
91
  overflow: hidden;
92
  word-break: break-all;
93
  }
98
  /*COLOR-URL*/
99
  /*OUTCOLOR-URL*/
100
  /*SIZE-URL*/
101
+ /*HEIGHT-URL*/
102
  font-weight: normal;
103
  text-decoration: underline;
 
104
  white-space: nowrap;
105
  overflow: hidden;
106
  text-overflow: ellipsis;
110
  /*COLOR-EXCERPT*/
111
  /*OUTCOLOR-EXCERPT*/
112
  /*SIZE-EXCERPT*/
113
+ /*HEIGHT-EXCERPT*/
114
  padding: 0;
115
  margin: 6px 0 0 0;
 
116
  overflow: hidden;
117
  }
118
  .lkc-thumbnail {
134
  /*COLOR-INFO*/
135
  /*OUTCOLOR-INFO*/
136
  /*SIZE-INFO*/
137
+ /*HEIGHT-INFO*/
138
  overflow: hidden;
139
  display: inline /*IMPORTANT*/;
140
  }
142
  /*COLOR-INFO*/
143
  /*OUTCOLOR-INFO*/
144
  /*SIZE-INFO*/
145
+ /*HEIGHT-INFO*/
146
  text-decoration: none;
147
  display: inline /*IMPORTANT*/;
148
  }
150
  /*COLOR-INFO*/
151
  /*OUTCOLOR-INFO*/
152
  /*SIZE-INFO*/
153
+ /*HEIGHT-INFO*/
154
  text-decoration: underline;
155
  display: inline /*IMPORTANT*/;
156
  }
159
  width: 16px;
160
  margin: 0 4px;
161
  border: none;
162
+ vertical-align: baseline;
163
  display: inline /*IMPORTANT*/;
164
  }
165
  .lkc-name a {
169
  /*COLOR-PLUGIN*/
170
  /*OUTCOLOR-PLUGIN*/
171
  /*SIZE-PLUGIN*/
172
+ /*HEIGHT-PLUGIN*/
173
  opacity: 0.5;
174
  text-decoration: none;
175
  /*CREDIT*/