Pz-LinkCard - Version 1.6.9

Version Description

  • Compatible with WordPress 4.5.3.
  • Modefied: Scaled down to fit the screen size in setting. Default change disabled to enabled.
  • Modefied: Use an alternative API to get the Twitter count.
  • Fixed: Fix the method of acquiring the site icon in the internal site.
  • Added: Added thumbnail acquisition method at the internal links.
  • Added: Added the ability to disable the verification of SSL certificate.

  • WordPress 4.5.3

  • TwitterAPI count.jsoon

  • WordPressThanks @meiko2285

  • WebAPIThanks @fumiegl

  • SSL

  • (Thanks @misoji_13)

Download this release

Release Info

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

Code changes from version 1.6.8 to 1.6.9

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-02-14 19:14+0900\n"
8
- "PO-Revision-Date: 2016-02-14 19:16+0900\n"
9
  "Last-Translator: \n"
10
  "Language-Team: poporon\n"
11
  "Language: ja_JP\n"
@@ -19,7 +19,7 @@ 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:991
23
  msgid "LinkCard cache manager"
24
  msgstr "リンクカード/DBキャッシュ管理"
25
 
@@ -210,7 +210,7 @@ msgstr "更新"
210
  msgid "Cancel"
211
  msgstr "キャンセル"
212
 
213
- #: ../pz-linkcard-settings.php:4 ../pz-linkcard.php:993
214
  msgid "LinkCard Settings"
215
  msgstr "リンクカード設定"
216
 
@@ -226,13 +226,6 @@ msgstr "設定を保存しました。"
226
  msgid "Not changed."
227
  msgstr "設定は変更されませんでした。"
228
 
229
- #: ../pz-linkcard-settings.php:77
230
- msgid "It was no longer able to tweet the number of acquisition of Twitter."
231
- msgstr ""
232
- "取得APIの提供終了に伴い、ツイッターのツイート数は更新されなくなりました。<br>"
233
- "最後に取得したカウントを表示することは出来ますが変動しなくなるため、ツイッ"
234
- "ターのシェア数表示のチェックを外すことを推奨します。"
235
-
236
  #: ../pz-linkcard-settings.php:83
237
  msgid "Basic"
238
  msgstr "基本設定"
@@ -285,9 +278,9 @@ msgstr "定型書式"
285
  #: ../pz-linkcard-settings.php:123 ../pz-linkcard-settings.php:295
286
  #: ../pz-linkcard-settings.php:329 ../pz-linkcard-settings.php:350
287
  #: ../pz-linkcard-settings.php:389 ../pz-linkcard-settings.php:554
288
- #: ../pz-linkcard-settings.php:564 ../pz-linkcard-settings.php:578
289
- #: ../pz-linkcard-settings.php:601 ../pz-linkcard-settings.php:611
290
- #: ../pz-linkcard-settings.php:625
291
  msgid "None"
292
  msgstr "なし"
293
 
@@ -499,8 +492,8 @@ msgstr "外観設定"
499
  msgid "Radius"
500
  msgstr "角を丸める"
501
 
502
- #: ../pz-linkcard-settings.php:327 ../pz-linkcard-settings.php:571
503
- #: ../pz-linkcard-settings.php:618 ../pz-linkcard-settings.php:664
504
  msgid "Site information"
505
  msgstr "サイト情報"
506
 
@@ -525,7 +518,7 @@ msgid "Display URL"
525
  msgstr "リンク先のURLを表示する"
526
 
527
  #: ../pz-linkcard-settings.php:348 ../pz-linkcard-settings.php:551
528
- #: ../pz-linkcard-settings.php:598 ../pz-linkcard-settings.php:656
529
  msgid "Thumbnail"
530
  msgstr "サムネイル"
531
 
@@ -698,8 +691,8 @@ msgstr "プラグイン名"
698
  msgid "External link"
699
  msgstr "外部リンク"
700
 
701
- #: ../pz-linkcard-settings.php:543 ../pz-linkcard-settings.php:590
702
- #: ../pz-linkcard-settings.php:648
703
  msgid "Background Color"
704
  msgstr "背景色"
705
 
@@ -707,76 +700,80 @@ msgstr "背景色"
707
  msgid "Background image"
708
  msgstr "背景画像"
709
 
710
- #: ../pz-linkcard-settings.php:555 ../pz-linkcard-settings.php:565
711
- #: ../pz-linkcard-settings.php:602 ../pz-linkcard-settings.php:612
712
  msgid "Direct"
713
  msgstr "直接取得する"
714
 
715
- #: ../pz-linkcard-settings.php:556 ../pz-linkcard-settings.php:566
716
- #: ../pz-linkcard-settings.php:603 ../pz-linkcard-settings.php:613
717
  msgid "Use WebAPI"
718
  msgstr "WebAPIを利用する"
719
 
720
- #: ../pz-linkcard-settings.php:561 ../pz-linkcard-settings.php:608
721
- #: ../pz-linkcard-settings.php:660
 
 
 
 
722
  msgid "Favicon"
723
  msgstr "サイトアイコン"
724
 
725
- #: ../pz-linkcard-settings.php:575 ../pz-linkcard-settings.php:622
726
- #: ../pz-linkcard-settings.php:668
727
  msgid "Open new window/tab"
728
  msgstr "新しいウィンドウで開く"
729
 
730
- #: ../pz-linkcard-settings.php:579 ../pz-linkcard-settings.php:626
731
  msgid "All client"
732
  msgstr "すべての端末"
733
 
734
- #: ../pz-linkcard-settings.php:580 ../pz-linkcard-settings.php:627
735
  msgid "Other than mobile"
736
  msgstr "モバイル端末以外"
737
 
738
- #: ../pz-linkcard-settings.php:587
739
  msgid "Internal link"
740
  msgstr "内部リンク"
741
 
742
- #: ../pz-linkcard-settings.php:594 ../pz-linkcard-settings.php:652
743
  msgid "Background Image"
744
  msgstr "背景画像"
745
 
746
- #: ../pz-linkcard-settings.php:632
747
  msgid "Get contents"
748
  msgstr "記事取得方法"
749
 
750
- #: ../pz-linkcard-settings.php:636
751
  msgid "Always get the latest from the content"
752
  msgstr "常に最新の記事内容から抜粋文を作成する"
753
 
754
- #: ../pz-linkcard-settings.php:637
755
  msgid "Always get the latest from the excerpt"
756
  msgstr "抜粋文が設定されている投稿はそちらを優先する"
757
 
758
- #: ../pz-linkcard-settings.php:638
759
  msgid "Initially acquired only from the content"
760
  msgstr "カード管理画面に記録されている内容から表示する"
761
 
762
- #: ../pz-linkcard-settings.php:645
763
  msgid "Same-page link"
764
  msgstr "同ページへのリンク"
765
 
766
- #: ../pz-linkcard-settings.php:657 ../pz-linkcard-settings.php:661
767
- #: ../pz-linkcard-settings.php:669
768
  msgid "It is common with setting Internal-link"
769
  msgstr "内部リンク用の設定が使用されます"
770
 
771
- #: ../pz-linkcard-settings.php:674
772
  msgid "Web-API"
773
  msgstr "画像取得APIの指定"
774
 
775
- #: ../pz-linkcard-settings.php:677
776
  msgid "Favicon API"
777
  msgstr "ファビコンの取得API"
778
 
779
- #: ../pz-linkcard-settings.php:679
780
  msgid ""
781
  "%DOMAIN% replace to domain name (ex. poporon.poponet.jp )<br>%DOMAIN_URL% "
782
  "replace to domain URL (ex. http://poporon.poponet.jp )"
@@ -785,112 +782,134 @@ msgstr ""
785
  "%DOMAIN_URL% と記述するとドメインのURL(例.http://poporon.poponet.jp)に置き"
786
  "換わります。"
787
 
788
- #: ../pz-linkcard-settings.php:682
789
  msgid "Thumbnail API"
790
  msgstr "サムネイル画像の取得API"
791
 
792
- #: ../pz-linkcard-settings.php:684
793
  msgid "%URL% replace to URL"
794
  msgstr "%URL% と記述するとURLに置き換わります"
795
 
796
- #: ../pz-linkcard-settings.php:689
797
  msgid "Debug"
798
  msgstr "詳しい人用(Debug)"
799
 
800
- #: ../pz-linkcard-settings.php:692
801
  msgid "Use blockquote tag"
802
  msgstr "BLOCKQUOTEをタグを使用する"
803
 
804
- #: ../pz-linkcard-settings.php:693
805
  msgid "without using DIV tag, and use BLOCKQUOTE tag"
806
  msgstr "&lt;BLOCKQUOTE&gt;で囲んで引用扱いにします"
807
 
808
- #: ../pz-linkcard-settings.php:696
809
  msgid "Set nofollow"
810
  msgstr "nofollowを付与する"
811
 
812
- #: ../pz-linkcard-settings.php:697
813
  msgid "In the case of an external site, it puts the \"nofollow\""
814
  msgstr "外部リンクのリンクを nofollow にする"
815
 
816
- #: ../pz-linkcard-settings.php:701
817
  msgid "Reset img style"
818
  msgstr "CSSリセット(img)"
819
 
820
- #: ../pz-linkcard-settings.php:702
821
  msgid ""
822
  "When unnecessary frame is displayed on the image, you can improve it by case"
823
  msgstr "画像がずれて表示されるときに改善される可能性が有ります(推奨)"
824
 
825
- #: ../pz-linkcard-settings.php:706
826
  msgid "specified CSS"
827
  msgstr "指定したCSSを使用"
828
 
829
- #: ../pz-linkcard-settings.php:707
830
  msgid "Use specified CSS file"
831
  msgstr "指定したCSSファイルを使用する"
832
 
833
- #: ../pz-linkcard-settings.php:710 ../pz-linkcard-settings.php:714
834
  msgid "CSS file"
835
  msgstr "CSSファイル名"
836
 
837
- #: ../pz-linkcard-settings.php:711
838
  msgid "(ex. http://exsample.com/style.css )"
839
  msgstr "例.http://exsample.com/style.css"
840
 
841
- #: ../pz-linkcard-settings.php:718
842
  msgid "CSS URL"
843
  msgstr "CSSファイルのURL"
844
 
845
- #: ../pz-linkcard-settings.php:723
846
  msgid "Class ID to be added(for PC)"
847
  msgstr "PCのときに追加するクラス名"
848
 
849
- #: ../pz-linkcard-settings.php:727
850
  msgid "Class ID to be added(for Mobile)"
851
  msgstr "モバイルのときに追加するクラス名"
852
 
853
- #: ../pz-linkcard-settings.php:732
854
  msgid "Use HatenaBlogCard"
855
  msgstr "はてなブログカードを利用する"
856
 
857
- #: ../pz-linkcard-settings.php:733
858
- msgid "External links will use Always HatenaBlogCard (Not recommended)"
859
- msgstr "外部リンクは「はてなブログカード」を利用する(非推奨)"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
860
 
861
- #: ../pz-linkcard-settings.php:737
862
  msgid "Display link to author page"
863
  msgstr "プラグイン名を表示する"
864
 
865
- #: ../pz-linkcard-settings.php:741
866
  msgid "Plugin URL"
867
  msgstr "プラグインページURL"
868
 
869
- #: ../pz-linkcard-settings.php:745
870
  msgid "Plugin name"
871
  msgstr "プラグイン名"
872
 
873
- #: ../pz-linkcard-settings.php:749
874
  msgid "Plugin version"
875
  msgstr "プラグインバージョン"
876
 
877
- #: ../pz-linkcard-settings.php:753
878
  msgid "Saved datetime"
879
  msgstr "保存した日時"
880
 
881
- #: ../pz-linkcard-settings.php:758
882
  msgid "Display elapsed time"
883
  msgstr "実行時間の表示"
884
 
885
- #: ../pz-linkcard-settings.php:759
886
  msgid "Output the elapsed time to HTML comment."
887
  msgstr "作成にかかった時間をコメントとしてHTMLへ出力する"
888
 
889
- #: ../pz-linkcard-settings.php:765
890
  msgid "Initialize"
891
  msgstr "初期化"
892
 
893
- #: ../pz-linkcard-settings.php:768
894
  msgid "Return to the initial setting"
895
  msgstr "設定を初期状態へ戻す"
896
 
@@ -902,22 +921,31 @@ msgstr "設定を元にスタイルシートを自動生成しました。"
902
  msgid "Style sheet failed."
903
  msgstr "スタイルシートの自動生成に失敗しました。"
904
 
905
- #: ../pz-linkcard.php:991
906
  msgid "Pz LkC Cache"
907
  msgstr "Pz カード管理"
908
 
909
- #: ../pz-linkcard.php:993
910
  msgid "Pz LinkCard"
911
  msgstr "Pz カード設定"
912
 
913
- #: ../pz-linkcard.php:1085
914
  msgid "Settings"
915
  msgstr "設定"
916
 
917
- #: ../pz-linkcard.php:1085
918
  msgid "Manage"
919
  msgstr "管理"
920
 
 
 
 
 
 
 
 
 
 
921
  #~ msgid "Trim"
922
  #~ msgstr "文字数"
923
 
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-12 21:54+0900\n"
8
+ "PO-Revision-Date: 2016-07-12 22:20+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-cacheman.php:6 ../pz-linkcard.php:1024
23
  msgid "LinkCard cache manager"
24
  msgstr "リンクカード/DBキャッシュ管理"
25
 
210
  msgid "Cancel"
211
  msgstr "キャンセル"
212
 
213
+ #: ../pz-linkcard-settings.php:4 ../pz-linkcard.php:1025
214
  msgid "LinkCard Settings"
215
  msgstr "リンクカード設定"
216
 
226
  msgid "Not changed."
227
  msgstr "設定は変更されませんでした。"
228
 
 
 
 
 
 
 
 
229
  #: ../pz-linkcard-settings.php:83
230
  msgid "Basic"
231
  msgstr "基本設定"
278
  #: ../pz-linkcard-settings.php:123 ../pz-linkcard-settings.php:295
279
  #: ../pz-linkcard-settings.php:329 ../pz-linkcard-settings.php:350
280
  #: ../pz-linkcard-settings.php:389 ../pz-linkcard-settings.php:554
281
+ #: ../pz-linkcard-settings.php:565 ../pz-linkcard-settings.php:579
282
+ #: ../pz-linkcard-settings.php:602 ../pz-linkcard-settings.php:613
283
+ #: ../pz-linkcard-settings.php:627
284
  msgid "None"
285
  msgstr "なし"
286
 
492
  msgid "Radius"
493
  msgstr "角を丸める"
494
 
495
+ #: ../pz-linkcard-settings.php:327 ../pz-linkcard-settings.php:572
496
+ #: ../pz-linkcard-settings.php:620 ../pz-linkcard-settings.php:666
497
  msgid "Site information"
498
  msgstr "サイト情報"
499
 
518
  msgstr "リンク先のURLを表示する"
519
 
520
  #: ../pz-linkcard-settings.php:348 ../pz-linkcard-settings.php:551
521
+ #: ../pz-linkcard-settings.php:599 ../pz-linkcard-settings.php:658
522
  msgid "Thumbnail"
523
  msgstr "サムネイル"
524
 
691
  msgid "External link"
692
  msgstr "外部リンク"
693
 
694
+ #: ../pz-linkcard-settings.php:543 ../pz-linkcard-settings.php:591
695
+ #: ../pz-linkcard-settings.php:650
696
  msgid "Background Color"
697
  msgstr "背景色"
698
 
700
  msgid "Background image"
701
  msgstr "背景画像"
702
 
703
+ #: ../pz-linkcard-settings.php:555 ../pz-linkcard-settings.php:566
704
+ #: ../pz-linkcard-settings.php:603 ../pz-linkcard-settings.php:614
705
  msgid "Direct"
706
  msgstr "直接取得する"
707
 
708
+ #: ../pz-linkcard-settings.php:556 ../pz-linkcard-settings.php:567
709
+ #: ../pz-linkcard-settings.php:604 ../pz-linkcard-settings.php:615
710
  msgid "Use WebAPI"
711
  msgstr "WebAPIを利用する"
712
 
713
+ #: ../pz-linkcard-settings.php:557 ../pz-linkcard-settings.php:605
714
+ msgid "Use WebAPI ,If can not direct"
715
+ msgstr "直接取得できない場合、WebAPIを利用する"
716
+
717
+ #: ../pz-linkcard-settings.php:562 ../pz-linkcard-settings.php:610
718
+ #: ../pz-linkcard-settings.php:662
719
  msgid "Favicon"
720
  msgstr "サイトアイコン"
721
 
722
+ #: ../pz-linkcard-settings.php:576 ../pz-linkcard-settings.php:624
723
+ #: ../pz-linkcard-settings.php:670
724
  msgid "Open new window/tab"
725
  msgstr "新しいウィンドウで開く"
726
 
727
+ #: ../pz-linkcard-settings.php:580 ../pz-linkcard-settings.php:628
728
  msgid "All client"
729
  msgstr "すべての端末"
730
 
731
+ #: ../pz-linkcard-settings.php:581 ../pz-linkcard-settings.php:629
732
  msgid "Other than mobile"
733
  msgstr "モバイル端末以外"
734
 
735
+ #: ../pz-linkcard-settings.php:588
736
  msgid "Internal link"
737
  msgstr "内部リンク"
738
 
739
+ #: ../pz-linkcard-settings.php:595 ../pz-linkcard-settings.php:654
740
  msgid "Background Image"
741
  msgstr "背景画像"
742
 
743
+ #: ../pz-linkcard-settings.php:634
744
  msgid "Get contents"
745
  msgstr "記事取得方法"
746
 
747
+ #: ../pz-linkcard-settings.php:638
748
  msgid "Always get the latest from the content"
749
  msgstr "常に最新の記事内容から抜粋文を作成する"
750
 
751
+ #: ../pz-linkcard-settings.php:639
752
  msgid "Always get the latest from the excerpt"
753
  msgstr "抜粋文が設定されている投稿はそちらを優先する"
754
 
755
+ #: ../pz-linkcard-settings.php:640
756
  msgid "Initially acquired only from the content"
757
  msgstr "カード管理画面に記録されている内容から表示する"
758
 
759
+ #: ../pz-linkcard-settings.php:647
760
  msgid "Same-page link"
761
  msgstr "同ページへのリンク"
762
 
763
+ #: ../pz-linkcard-settings.php:659 ../pz-linkcard-settings.php:663
764
+ #: ../pz-linkcard-settings.php:671
765
  msgid "It is common with setting Internal-link"
766
  msgstr "内部リンク用の設定が使用されます"
767
 
768
+ #: ../pz-linkcard-settings.php:676
769
  msgid "Web-API"
770
  msgstr "画像取得APIの指定"
771
 
772
+ #: ../pz-linkcard-settings.php:679
773
  msgid "Favicon API"
774
  msgstr "ファビコンの取得API"
775
 
776
+ #: ../pz-linkcard-settings.php:681
777
  msgid ""
778
  "%DOMAIN% replace to domain name (ex. poporon.poponet.jp )<br>%DOMAIN_URL% "
779
  "replace to domain URL (ex. http://poporon.poponet.jp )"
782
  "%DOMAIN_URL% と記述するとドメインのURL(例.http://poporon.poponet.jp)に置き"
783
  "換わります。"
784
 
785
+ #: ../pz-linkcard-settings.php:684
786
  msgid "Thumbnail API"
787
  msgstr "サムネイル画像の取得API"
788
 
789
+ #: ../pz-linkcard-settings.php:686
790
  msgid "%URL% replace to URL"
791
  msgstr "%URL% と記述するとURLに置き換わります"
792
 
793
+ #: ../pz-linkcard-settings.php:691
794
  msgid "Debug"
795
  msgstr "詳しい人用(Debug)"
796
 
797
+ #: ../pz-linkcard-settings.php:694
798
  msgid "Use blockquote tag"
799
  msgstr "BLOCKQUOTEをタグを使用する"
800
 
801
+ #: ../pz-linkcard-settings.php:695
802
  msgid "without using DIV tag, and use BLOCKQUOTE tag"
803
  msgstr "&lt;BLOCKQUOTE&gt;で囲んで引用扱いにします"
804
 
805
+ #: ../pz-linkcard-settings.php:698
806
  msgid "Set nofollow"
807
  msgstr "nofollowを付与する"
808
 
809
+ #: ../pz-linkcard-settings.php:699
810
  msgid "In the case of an external site, it puts the \"nofollow\""
811
  msgstr "外部リンクのリンクを nofollow にする"
812
 
813
+ #: ../pz-linkcard-settings.php:703
814
  msgid "Reset img style"
815
  msgstr "CSSリセット(img)"
816
 
817
+ #: ../pz-linkcard-settings.php:704
818
  msgid ""
819
  "When unnecessary frame is displayed on the image, you can improve it by case"
820
  msgstr "画像がずれて表示されるときに改善される可能性が有ります(推奨)"
821
 
822
+ #: ../pz-linkcard-settings.php:708
823
  msgid "specified CSS"
824
  msgstr "指定したCSSを使用"
825
 
826
+ #: ../pz-linkcard-settings.php:709
827
  msgid "Use specified CSS file"
828
  msgstr "指定したCSSファイルを使用する"
829
 
830
+ #: ../pz-linkcard-settings.php:712 ../pz-linkcard-settings.php:716
831
  msgid "CSS file"
832
  msgstr "CSSファイル名"
833
 
834
+ #: ../pz-linkcard-settings.php:713
835
  msgid "(ex. http://exsample.com/style.css )"
836
  msgstr "例.http://exsample.com/style.css"
837
 
838
+ #: ../pz-linkcard-settings.php:720
839
  msgid "CSS URL"
840
  msgstr "CSSファイルのURL"
841
 
842
+ #: ../pz-linkcard-settings.php:725
843
  msgid "Class ID to be added(for PC)"
844
  msgstr "PCのときに追加するクラス名"
845
 
846
+ #: ../pz-linkcard-settings.php:729
847
  msgid "Class ID to be added(for Mobile)"
848
  msgstr "モバイルのときに追加するクラス名"
849
 
850
+ #: ../pz-linkcard-settings.php:734
851
  msgid "Use HatenaBlogCard"
852
  msgstr "はてなブログカードを利用する"
853
 
854
+ #: ../pz-linkcard-settings.php:735
855
+ msgid "External links will use Always HatenaBlogCard."
856
+ msgstr "外部リンクは「はてなブログカード」を利用する"
857
+
858
+ #: ../pz-linkcard-settings.php:735 ../pz-linkcard-settings.php:740
859
+ msgid "(Not recommended)"
860
+ msgstr "(非推奨)"
861
+
862
+ #: ../pz-linkcard-settings.php:739
863
+ msgid "SSL verification disabled"
864
+ msgstr "SSL検証を無効"
865
+
866
+ #: ../pz-linkcard-settings.php:740
867
+ msgid "Try setting if the contents of the SSL site can not be acquired."
868
+ msgstr ""
869
+ "SSLサイトのタイトルや記事内容が取得できない場合に設定することで取得できる可能"
870
+ "性があります。"
871
+
872
+ #: ../pz-linkcard-settings.php:744
873
+ msgid "Broken link checker"
874
+ msgstr "リンク切れチェック"
875
+
876
+ #: ../pz-linkcard-settings.php:745
877
+ msgid "Alive confirmation of the link destination."
878
+ msgstr "リンク先がアクセスできるか定期的に確認します。"
879
 
880
+ #: ../pz-linkcard-settings.php:749
881
  msgid "Display link to author page"
882
  msgstr "プラグイン名を表示する"
883
 
884
+ #: ../pz-linkcard-settings.php:753
885
  msgid "Plugin URL"
886
  msgstr "プラグインページURL"
887
 
888
+ #: ../pz-linkcard-settings.php:757
889
  msgid "Plugin name"
890
  msgstr "プラグイン名"
891
 
892
+ #: ../pz-linkcard-settings.php:761
893
  msgid "Plugin version"
894
  msgstr "プラグインバージョン"
895
 
896
+ #: ../pz-linkcard-settings.php:765
897
  msgid "Saved datetime"
898
  msgstr "保存した日時"
899
 
900
+ #: ../pz-linkcard-settings.php:770
901
  msgid "Display elapsed time"
902
  msgstr "実行時間の表示"
903
 
904
+ #: ../pz-linkcard-settings.php:771
905
  msgid "Output the elapsed time to HTML comment."
906
  msgstr "作成にかかった時間をコメントとしてHTMLへ出力する"
907
 
908
+ #: ../pz-linkcard-settings.php:777
909
  msgid "Initialize"
910
  msgstr "初期化"
911
 
912
+ #: ../pz-linkcard-settings.php:780
913
  msgid "Return to the initial setting"
914
  msgstr "設定を初期状態へ戻す"
915
 
921
  msgid "Style sheet failed."
922
  msgstr "スタイルシートの自動生成に失敗しました。"
923
 
924
+ #: ../pz-linkcard.php:1024
925
  msgid "Pz LkC Cache"
926
  msgstr "Pz カード管理"
927
 
928
+ #: ../pz-linkcard.php:1025
929
  msgid "Pz LinkCard"
930
  msgstr "Pz カード設定"
931
 
932
+ #: ../pz-linkcard.php:1143
933
  msgid "Settings"
934
  msgstr "設定"
935
 
936
+ #: ../pz-linkcard.php:1143
937
  msgid "Manage"
938
  msgstr "管理"
939
 
940
+ #~ msgid "Direct & Use WebAPI"
941
+ #~ msgstr "直接取得できない場合、WebAPI利用"
942
+
943
+ #~ msgid "It was no longer able to tweet the number of acquisition of Twitter."
944
+ #~ msgstr ""
945
+ #~ "取得APIの提供終了に伴い、ツイッターのツイート数は更新されなくなりました。"
946
+ #~ "<br>最後に取得したカウントを表示することは出来ますが変動しなくなるため、ツ"
947
+ #~ "イッターのシェア数表示のチェックを外すことを推奨します。"
948
+
949
  #~ msgid "Trim"
950
  #~ msgstr "文字数"
951
 
pz-linkcard-settings.php CHANGED
@@ -73,9 +73,9 @@
73
  require_once ('pz-linkcard-style.php');
74
  }
75
  }
76
- if ((isset($this->options['sns-position']) ? $this->options['sns-position'] : null) && (isset($this->options['sns-tw']) ? $this->options['sns-tw'] : null)) {
77
- 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>';
78
- }
79
  ?>
80
  <form action="" method="post">
81
  <?php wp_nonce_field('pz_options'); ?>
@@ -390,9 +390,9 @@
390
  <option value="1" <?php if($this->options['sns-position'] == '1') echo 'selected="selected"'; ?>><?php _e('After Title', $this->text_domain); ?></option>
391
  <option value="2" <?php if($this->options['sns-position'] == '2') echo 'selected="selected"'; ?>><?php _e('After site-name', $this->text_domain); ?></option>
392
  </select>
393
- <label><input name="properties[sns-tw]" type="checkbox" id="check" value="1" <?php checked(isset($this->options['sns-tw']) ? $this->options['sns-tw'] : null, 1); ?> /><span style="color: #aaa;"><?php _e('Twitter', $this->text_domain); ?></span></label>
394
- <label><input name="properties[sns-fb]" type="checkbox" id="check" value="1" <?php checked(isset($this->options['sns-fb']) ? $this->options['sns-fb'] : null, 1); ?> /><?php _e('Facebook', $this->text_domain); ?></label>
395
- <label><input name="properties[sns-hb]" type="checkbox" id="check" value="1" <?php checked(isset($this->options['sns-hb']) ? $this->options['sns-hb'] : null, 1); ?> /><?php _e('Hatena', $this->text_domain); ?></label>
396
  <br><?php _e('There is a possibility that the screen display is slow If you enable this setting.', $this->text_domain); ?>
397
  </td>
398
  </tr>
@@ -554,6 +554,7 @@
554
  <option value="" <?php if($this->options['ex-thumbnail'] == '') echo 'selected="selected"'; ?>><?php _e('None', $this->text_domain); ?></option>
555
  <option value="1" <?php if($this->options['ex-thumbnail'] == '1') echo 'selected="selected"'; ?> disabled="disabled"><?php _e('Direct', $this->text_domain); ?></option>
556
  <option value="3" <?php if($this->options['ex-thumbnail'] == '3') echo 'selected="selected"'; ?>><?php _e('Use WebAPI', $this->text_domain); ?></option>
 
557
  </select>
558
  </td>
559
  </tr>
@@ -601,6 +602,7 @@
601
  <option value="" <?php if($this->options['in-thumbnail'] == '') echo 'selected="selected"'; ?>><?php _e('None', $this->text_domain); ?></option>
602
  <option value="1" <?php if($this->options['in-thumbnail'] == '1') echo 'selected="selected"'; ?>><?php _e('Direct', $this->text_domain); ?></option>
603
  <option value="3" <?php if($this->options['in-thumbnail'] == '3') echo 'selected="selected"'; ?>><?php _e('Use WebAPI', $this->text_domain); ?></option>
 
604
  </select>
605
  </td>
606
  </tr>
@@ -609,7 +611,7 @@
609
  <td>
610
  <select name="properties[in-favicon]">
611
  <option value="" <?php if($this->options['in-favicon'] == '') echo 'selected="selected"'; ?>><?php _e('None', $this->text_domain); ?></option>
612
- <option value="1" <?php if($this->options['in-favicon'] == '1') echo 'selected="selected"'; ?> <?php if(!function_exists('has_site_icon')) echo 'disabled="disabled"'; ?>><?php _e('Direct', $this->text_domain); ?></option>
613
  <option value="3" <?php if($this->options['in-favicon'] == '3') echo 'selected="selected"'; ?>><?php _e('Use WebAPI', $this->text_domain); ?></option>
614
  </select>
615
  </td>
@@ -730,7 +732,17 @@
730
 
731
  <tr valign="top">
732
  <th scope="row"><?php _e('Use HatenaBlogCard', $this->text_domain); ?></th>
733
- <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 (Not recommended)', $this->text_domain); ?></label></td>
 
 
 
 
 
 
 
 
 
 
734
  </tr>
735
 
736
  <tr valign="top">
73
  require_once ('pz-linkcard-style.php');
74
  }
75
  }
76
+ // if ((isset($this->options['sns-position']) ? $this->options['sns-position'] : null) && (isset($this->options['sns-tw']) ? $this->options['sns-tw'] : null)) {
77
+ // 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>';
78
+ // }
79
  ?>
80
  <form action="" method="post">
81
  <?php wp_nonce_field('pz_options'); ?>
390
  <option value="1" <?php if($this->options['sns-position'] == '1') echo 'selected="selected"'; ?>><?php _e('After Title', $this->text_domain); ?></option>
391
  <option value="2" <?php if($this->options['sns-position'] == '2') echo 'selected="selected"'; ?>><?php _e('After site-name', $this->text_domain); ?></option>
392
  </select>
393
+ <label><input name="properties[sns-tw]" type="checkbox" id="check" value="1" <?php checked(isset($this->options['sns-tw']) ? $this->options['sns-tw'] : null, 1); ?> /><?php _e('Twitter', $this->text_domain); ?></label>
394
+ <label><input name="properties[sns-fb]" type="checkbox" id="check" value="1" <?php checked(isset($this->options['sns-fb']) ? $this->options['sns-fb'] : null, 1); ?> /><?php _e('Facebook', $this->text_domain); ?></label>
395
+ <label><input name="properties[sns-hb]" type="checkbox" id="check" value="1" <?php checked(isset($this->options['sns-hb']) ? $this->options['sns-hb'] : null, 1); ?> /><?php _e('Hatena', $this->text_domain); ?></label>
396
  <br><?php _e('There is a possibility that the screen display is slow If you enable this setting.', $this->text_domain); ?>
397
  </td>
398
  </tr>
554
  <option value="" <?php if($this->options['ex-thumbnail'] == '') echo 'selected="selected"'; ?>><?php _e('None', $this->text_domain); ?></option>
555
  <option value="1" <?php if($this->options['ex-thumbnail'] == '1') echo 'selected="selected"'; ?> disabled="disabled"><?php _e('Direct', $this->text_domain); ?></option>
556
  <option value="3" <?php if($this->options['ex-thumbnail'] == '3') echo 'selected="selected"'; ?>><?php _e('Use WebAPI', $this->text_domain); ?></option>
557
+ <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>
558
  </select>
559
  </td>
560
  </tr>
602
  <option value="" <?php if($this->options['in-thumbnail'] == '') echo 'selected="selected"'; ?>><?php _e('None', $this->text_domain); ?></option>
603
  <option value="1" <?php if($this->options['in-thumbnail'] == '1') echo 'selected="selected"'; ?>><?php _e('Direct', $this->text_domain); ?></option>
604
  <option value="3" <?php if($this->options['in-thumbnail'] == '3') echo 'selected="selected"'; ?>><?php _e('Use WebAPI', $this->text_domain); ?></option>
605
+ <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>
606
  </select>
607
  </td>
608
  </tr>
611
  <td>
612
  <select name="properties[in-favicon]">
613
  <option value="" <?php if($this->options['in-favicon'] == '') echo 'selected="selected"'; ?>><?php _e('None', $this->text_domain); ?></option>
614
+ <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>
615
  <option value="3" <?php if($this->options['in-favicon'] == '3') echo 'selected="selected"'; ?>><?php _e('Use WebAPI', $this->text_domain); ?></option>
616
  </select>
617
  </td>
732
 
733
  <tr valign="top">
734
  <th scope="row"><?php _e('Use HatenaBlogCard', $this->text_domain); ?></th>
735
+ <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>
736
+ </tr>
737
+
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); _e('(Not recommended)', $this->text_domain); ?></label></td>
741
+ </tr>
742
+
743
+ <tr valign="top">
744
+ <th scope="row"><?php _e('Broken link checker', $this->text_domain); ?></th>
745
+ <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>
746
  </tr>
747
 
748
  <tr valign="top">
pz-linkcard-style.php CHANGED
@@ -285,7 +285,7 @@
285
 
286
  // サムネイルのリサイズ
287
  if (isset($this->options['thumbnail-resize']) && $this->options['thumbnail-resize'] == '1') {
288
- $file_text = str_replace('/*RESIZE*/', '@media screen and (max-width: 1024px) { .lkc-thumbnail { max-width: 70px; max-height: 70px; } .lkc-thumbnail-img { max-width: 70px; max-height: 70px; } } @media screen and (max-width: 640px) { .lkc-thumbnail { max-width: 60px; max-height: 60px; } .lkc-thumbnail-img { max-width: 60px; max-height: 60px; } } @media screen and (max-width: 480px) { .lkc-thumbnail { max-width: 50px; max-height: 50px; } .lkc-thumbnail-img { max-width: 50px; max-height: 50px; } }',$file_text );
289
  }
290
 
291
  // 横幅
285
 
286
  // サムネイルのリサイズ
287
  if (isset($this->options['thumbnail-resize']) && $this->options['thumbnail-resize'] == '1') {
288
+ $file_text = str_replace('/*RESIZE*/', '@media screen and (max-width: 1024px) {'.PHP_EOL.'.lkc-thumbnail {'.PHP_EOL.'max-width: 70px;'.PHP_EOL.'max-height: 70px;'.PHP_EOL.'}'.PHP_EOL.'.lkc-thumbnail-img {'.PHP_EOL.'max-width: 70px;'.PHP_EOL.'max-height: 70px;'.PHP_EOL.'}'.PHP_EOL.'}'.PHP_EOL.'@media screen and (max-width: 640px) {'.PHP_EOL.'.lkc-thumbnail {'.PHP_EOL.'max-width: 60px;'.PHP_EOL.'max-height: 60px;'.PHP_EOL.'}'.PHP_EOL.'.lkc-thumbnail-img {'.PHP_EOL.'max-width: 60px;'.PHP_EOL.'max-height: 60px;'.PHP_EOL.'}'.PHP_EOL.'}'.PHP_EOL.'@media screen and (max-width: 480px) {'.PHP_EOL.'.lkc-thumbnail {'.PHP_EOL.'max-width: 50px;'.PHP_EOL.'max-height: 50px;'.PHP_EOL.'}'.PHP_EOL.'.lkc-thumbnail-img {'.PHP_EOL.'max-width: 50px;'.PHP_EOL.'max-height: 50px;'.PHP_EOL.'}'.PHP_EOL.'}',$file_text );
289
  }
290
 
291
  // 横幅
pz-linkcard-templete.css CHANGED
@@ -1,4 +1,4 @@
1
- /* [Pz-LkC][1.6.6] CSS */
2
  .linkcard {
3
  /*MARGIN-TOP*/
4
  /*MARGIN-BOTTOM*/
@@ -247,5 +247,5 @@ blockquote.lkc-quote {
247
  margin: 0;
248
  width: 100%;
249
  }
 
250
  /*RESIZE*/
251
- /*OPTION*/
1
+ /* [Pz-LkC][1.6.9] CSS */
2
  .linkcard {
3
  /*MARGIN-TOP*/
4
  /*MARGIN-BOTTOM*/
247
  margin: 0;
248
  width: 100%;
249
  }
250
+ /*OPTION*/
251
  /*RESIZE*/
 
pz-linkcard.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Pz-LinkCard
4
  Plugin URI: http://poporon.poponet.jp/pz-linkcard
5
  Description: リンクをカード形式で表示します。
6
- Version: 1.6.8
7
  Author: poporon
8
  Author URI: http://poporon.poponet.jp
9
  License: GPLv2 or later
@@ -90,8 +90,10 @@ class Pz_LinkCard {
90
  'thumbnail-api' => 'http://s.wordpress.com/mshots/v1/%URL%?w=100',
91
  'thumbnail-position'=> '2',
92
  'thumbnail-shadow' => '1',
93
- 'thumbnail-resize' => null,
94
  'cache-time' => 31536000,
 
 
95
  'style-reset-img' => '1',
96
  'style' => null,
97
  'css-file' => null,
@@ -100,7 +102,7 @@ class Pz_LinkCard {
100
  'class-pc' => null,
101
  'class-mobile' => null,
102
  'sns-position' => '2',
103
- 'sns-tw' => null,
104
  'sns-fb' => '1',
105
  'sns-hb' => '1',
106
  'link-all' => '1',
@@ -109,7 +111,7 @@ class Pz_LinkCard {
109
  'presence' => null,
110
  'plugin-link' => null,
111
  'plugin-name' => 'Pz-LinkCard',
112
- 'plugin-version' => '1.6.8',
113
  'plugin-url' => 'http://poporon.poponet.jp/pz-linkcard',
114
  'pz-hbc-options' => null,
115
  'debug-time' => null
@@ -182,11 +184,20 @@ class Pz_LinkCard {
182
  // wp_schedule_event( time(), 'hourly', 'pz_linkcard_check');
183
  // wp_schedule_single_event( time() + 10, 'pz_linkcard_check');
184
  // }
185
- add_action('pz_linkcard_check', array($this, 'schedule_hook'));
 
186
  }
187
 
188
  public function shortcode($atts, $content = null, $shortcode) {
189
- $url = isset($atts['url']) ? $this->pz_TrimURL($atts['url']) : null;
 
 
 
 
 
 
 
 
190
 
191
  // パラメータ
192
  $s_title = isset($atts['title']) ? $atts['title'] : null;
@@ -216,10 +227,14 @@ class Pz_LinkCard {
216
  return $tag;
217
  }
218
 
 
219
  function pz_TrimURL($url = null) {
220
  if (!isset($url) || $url == '') {
221
  $url = null;
222
- } else {
 
 
 
223
  $url = html_entity_decode($url);
224
  $url = preg_replace('/^[\s \'\"‘’“”″]*(.*?)[\s \'\"‘’“”″]*$/u', '\1', $url);
225
  $url = strip_tags($url);
@@ -400,12 +415,15 @@ class Pz_LinkCard {
400
  }
401
 
402
  $sw_thumbnail = isset($this->options['in-thumbnail']) ? $this->options['in-thumbnail'] : '0' ;
403
- if ($sw_thumbnail == '1') {
404
  $thumbnail = get_the_post_thumbnail($id, 'thumbnail' , array('class' => 'lkc-thumbnail-img'));
 
 
 
405
  }
406
  $sw_favicon = isset($this->options['in-favicon']) ? $this->options['in-favicon'] : '0' ;
407
  if ($sw_favicon == '1') {
408
- if (function_exists('has_site_icon')) {
409
  $favicon = '<img class="lkc-favicon" src="'.get_site_icon_url(16, '', 0).'" alt="" />';
410
  } else {
411
  $sw_favicon = isset($this->options['ex-favicon']) ? $this->options['ex-favicon'] : '0' ;
@@ -441,6 +459,11 @@ class Pz_LinkCard {
441
  curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
442
  curl_setopt($ch, CURLOPT_MAXREDIRS, 3);
443
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
 
 
 
 
 
444
  $html = curl_exec($ch);
445
  if (curl_errno($ch)) {
446
  $html = '';
@@ -535,7 +558,7 @@ class Pz_LinkCard {
535
  $str = strip_tags($str); // タグの除去
536
  $str = str_replace(array("\r", "\n"), '', $str); // 改行削除
537
  $str = esc_html($str); // 念のためエスケープ
538
- $str = mb_strimwidth($str, 0, 200, '...'); // タイトルは無条件で200文字で切る
539
  $title = $str;
540
  }
541
  // 抜粋文整形
@@ -546,7 +569,7 @@ class Pz_LinkCard {
546
  $str = preg_replace('/\[[^]]*\]/', '', $str); // ショートコードすべて除去
547
  $str = str_replace(array("\r", "\n"), '', $str); // 改行削除
548
  $str = esc_html($str); // 念のためエスケープ
549
- $str = mb_strimwidth($str, 0, 500, '...'); // ここでは500文字で切る
550
  $excerpt = $str;
551
  }
552
 
@@ -793,20 +816,22 @@ class Pz_LinkCard {
793
  $sns_renew = true;
794
  }
795
 
796
- // // Twitter count.json 2015/11/21 非公式サービス終了に伴い停止
797
- // if (isset($this->options['sns-tw']) && !is_null($this->options['sns-tw'])) {
798
- // $count_before = isset($data['sns_twitter']) ? $data['sns_twitter'] : -1;
799
- // if ($sns_renew || $count_before < 0) {
800
  // $result = wp_remote_get( 'http://urls.api.twitter.com/1/urls/count.json?url=' .rawurlencode($data['url']), $opt );
801
- // if (isset($result) && !is_wp_error($result) && $result['response']['code'] == 200) {
802
- // $count = intval(json_decode($result['body'])->count);
 
803
  // if ($count <> $count_before) {
804
- // $data['sns_twitter'] = $count;
805
- // $update_cnt = true;
806
- // }
807
- // }
808
- // }
809
- // }
 
810
 
811
  if (isset($this->options['sns-fb']) && !is_null($this->options['sns-fb'])) {
812
  $count_before = intval(isset($data['sns_facebook']) ? $data['sns_facebook'] : -1);
@@ -865,6 +890,7 @@ class Pz_LinkCard {
865
  return $data;
866
  }
867
 
 
868
  public function pz_GetCache($data) {
869
  if (!isset($data) || !is_array($data)) {
870
  return null;
@@ -885,6 +911,7 @@ class Pz_LinkCard {
885
  return (array) $data; // Arrayに直して戻す
886
  }
887
 
 
888
  public function pz_SetCache($data) {
889
  global $wpdb;
890
  if (!isset($data) || !is_array($data)) {
@@ -935,6 +962,7 @@ class Pz_LinkCard {
935
  return $this->pz_GetCache($data);
936
  }
937
 
 
938
  public function pz_DelCache($data) {
939
  global $wpdb;
940
  if (!isset($data) || !is_array($data)) {
@@ -952,6 +980,7 @@ class Pz_LinkCard {
952
  return null;
953
  }
954
 
 
955
  function pz_GetMeta($html, $tags = null, $clear = false) {
956
  if ($clear == true || !isset($tags)) {
957
  $tags = null;
@@ -973,11 +1002,13 @@ class Pz_LinkCard {
973
  return $tags;
974
  }
975
 
 
976
  public function enqueue_admin($hook) {
977
  wp_enqueue_style ('wp-color-picker');
978
  wp_enqueue_script ('colorpicker-script', plugins_url('color-picker.js', __FILE__), array('wp-color-picker'), false, true);
979
  }
980
 
 
981
  public function enqueue($hook) {
982
  if (!isset($this->options['style'])) {
983
  wp_enqueue_style ('pz-linkcard', $this->options['css-url']);
@@ -988,13 +1019,14 @@ class Pz_LinkCard {
988
  }
989
  }
990
 
 
991
  public function add_menu() {
992
  add_management_page (__('LinkCard cache manager', $this->text_domain),__('Pz LkC Cache', $this->text_domain),'manage_options', 'pz-linkcard-cache', array($this, 'page_cacheman') );
993
- // add_management_page (__('LinkCard cache manager', $this->text_domain),__('Pz LkC Cache', $this->text_domain),'manage_options', 'pz-linkcard-cache', array('Pz_LinkCard_CacheMan', 'manager') );
994
  add_options_page (__('LinkCard Settings', $this->text_domain),__('Pz LinkCard', $this->text_domain),'manage_options', 'pz-linkcard-settings', array($this, 'page_settings') );
995
  }
996
 
997
- public function schedule_hook() {
 
998
  if (!isset($this->options['sns-position']) || $this->options['sns-position'] == '') {
999
  return null;
1000
  }
@@ -1017,6 +1049,31 @@ class Pz_LinkCard {
1017
  }
1018
  }
1019
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1020
  public function page_cacheman() {
1021
  require_once ('pz-linkcard-cacheman.php');
1022
  }
3
  Plugin Name: Pz-LinkCard
4
  Plugin URI: http://poporon.poponet.jp/pz-linkcard
5
  Description: リンクをカード形式で表示します。
6
+ Version: 1.6.9
7
  Author: poporon
8
  Author URI: http://poporon.poponet.jp
9
  License: GPLv2 or later
90
  'thumbnail-api' => 'http://s.wordpress.com/mshots/v1/%URL%?w=100',
91
  'thumbnail-position'=> '2',
92
  'thumbnail-shadow' => '1',
93
+ 'thumbnail-resize' => '1',
94
  'cache-time' => 31536000,
95
+ 'flg-alive' => null,
96
+ 'flg-ssl' => null,
97
  'style-reset-img' => '1',
98
  'style' => null,
99
  'css-file' => null,
102
  'class-pc' => null,
103
  'class-mobile' => null,
104
  'sns-position' => '2',
105
+ 'sns-tw' => '1',
106
  'sns-fb' => '1',
107
  'sns-hb' => '1',
108
  'link-all' => '1',
111
  'presence' => null,
112
  'plugin-link' => null,
113
  'plugin-name' => 'Pz-LinkCard',
114
+ 'plugin-version' => '1.6.9',
115
  'plugin-url' => 'http://poporon.poponet.jp/pz-linkcard',
116
  'pz-hbc-options' => null,
117
  'debug-time' => null
184
  // wp_schedule_event( time(), 'hourly', 'pz_linkcard_check');
185
  // wp_schedule_single_event( time() + 10, 'pz_linkcard_check');
186
  // }
187
+ add_action('pz_linkcard_check', array($this, 'schedule_hook_sns'));
188
+ // add_action('pz_linkcard_check', array($this, 'schedule_hook_alive'));
189
  }
190
 
191
  public function shortcode($atts, $content = null, $shortcode) {
192
+ // URL
193
+ $url = isset($atts['url']) ? $this->pz_TrimURL($atts['url']) : null;
194
+ // 密かに記述ミス対応
195
+ if (is_null($url)) {
196
+ $url = isset($atts['ur1']) ? $this->pz_TrimURL($atts['ur1']) : null;
197
+ if (is_null($url)) {
198
+ $url = isset($atts['uri']) ? $this->pz_TrimURL($atts['uri']) : null;
199
+ }
200
+ }
201
 
202
  // パラメータ
203
  $s_title = isset($atts['title']) ? $atts['title'] : null;
227
  return $tag;
228
  }
229
 
230
+ // URL
231
  function pz_TrimURL($url = null) {
232
  if (!isset($url) || $url == '') {
233
  $url = null;
234
+ return $url;
235
+ }
236
+
237
+ if (isset($url) && $url <> '') {
238
  $url = html_entity_decode($url);
239
  $url = preg_replace('/^[\s \'\"‘’“”″]*(.*?)[\s \'\"‘’“”″]*$/u', '\1', $url);
240
  $url = strip_tags($url);
415
  }
416
 
417
  $sw_thumbnail = isset($this->options['in-thumbnail']) ? $this->options['in-thumbnail'] : '0' ;
418
+ if ($sw_thumbnail == '1' || $sw_thumbnail == '13') {
419
  $thumbnail = get_the_post_thumbnail($id, 'thumbnail' , array('class' => 'lkc-thumbnail-img'));
420
+ if ($sw_thumbnail == '13' && $thumbnail == '') {
421
+ $sw_thumbnail = '3';
422
+ }
423
  }
424
  $sw_favicon = isset($this->options['in-favicon']) ? $this->options['in-favicon'] : '0' ;
425
  if ($sw_favicon == '1') {
426
+ if (function_exists('has_site_icon') && has_site_icon()) {
427
  $favicon = '<img class="lkc-favicon" src="'.get_site_icon_url(16, '', 0).'" alt="" />';
428
  } else {
429
  $sw_favicon = isset($this->options['ex-favicon']) ? $this->options['ex-favicon'] : '0' ;
459
  curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
460
  curl_setopt($ch, CURLOPT_MAXREDIRS, 3);
461
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
462
+ if (isset($this->options['flg-ssl']) ? $this->options['flg-ssl'] : null) {
463
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // SSL検証なし
464
+ } else {
465
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); // SSL検証あり
466
+ }
467
  $html = curl_exec($ch);
468
  if (curl_errno($ch)) {
469
  $html = '';
558
  $str = strip_tags($str); // タグの除去
559
  $str = str_replace(array("\r", "\n"), '', $str); // 改行削除
560
  $str = esc_html($str); // 念のためエスケープ
561
+ $str = mb_strimwidth($str, 0, 200, '...'); // 保管用のタイトルは200文字で切る
562
  $title = $str;
563
  }
564
  // 抜粋文整形
569
  $str = preg_replace('/\[[^]]*\]/', '', $str); // ショートコードすべて除去
570
  $str = str_replace(array("\r", "\n"), '', $str); // 改行削除
571
  $str = esc_html($str); // 念のためエスケープ
572
+ $str = mb_strimwidth($str, 0, 500, '...'); // 保管用の記事内容は500文字で切る
573
  $excerpt = $str;
574
  }
575
 
816
  $sns_renew = true;
817
  }
818
 
819
+ // Twitter count.json 2015/11/21 非公式サービス終了に伴い停止→代替APIへ変更
820
+ if (isset($this->options['sns-tw']) && !is_null($this->options['sns-tw'])) {
821
+ $count_before = isset($data['sns_twitter']) ? $data['sns_twitter'] : -1;
822
+ if ($sns_renew || $count_before < 0) {
823
  // $result = wp_remote_get( 'http://urls.api.twitter.com/1/urls/count.json?url=' .rawurlencode($data['url']), $opt );
824
+ $result = wp_remote_get( 'http://jsoon.digitiminimi.com/twitter/count.json?url=' .rawurlencode($data['url']), $opt );
825
+ if (isset($result) && !is_wp_error($result) && $result['response']['code'] == 200) {
826
+ $count = intval(json_decode($result['body'])->count);
827
  // if ($count <> $count_before) {
828
+ if ($count > $count_before) {
829
+ $data['sns_twitter'] = $count;
830
+ $update_cnt = true;
831
+ }
832
+ }
833
+ }
834
+ }
835
 
836
  if (isset($this->options['sns-fb']) && !is_null($this->options['sns-fb'])) {
837
  $count_before = intval(isset($data['sns_facebook']) ? $data['sns_facebook'] : -1);
890
  return $data;
891
  }
892
 
893
+ // キャッシュデータを取得
894
  public function pz_GetCache($data) {
895
  if (!isset($data) || !is_array($data)) {
896
  return null;
911
  return (array) $data; // Arrayに直して戻す
912
  }
913
 
914
+ // キャッシュデータを保存
915
  public function pz_SetCache($data) {
916
  global $wpdb;
917
  if (!isset($data) || !is_array($data)) {
962
  return $this->pz_GetCache($data);
963
  }
964
 
965
+ // キャッシュデータを削除
966
  public function pz_DelCache($data) {
967
  global $wpdb;
968
  if (!isset($data) || !is_array($data)) {
980
  return null;
981
  }
982
 
983
+ // TITLEとMETAタグを分解
984
  function pz_GetMeta($html, $tags = null, $clear = false) {
985
  if ($clear == true || !isset($tags)) {
986
  $tags = null;
1002
  return $tags;
1003
  }
1004
 
1005
+ // 管理画面時のスタイルシート、スクリプト設定
1006
  public function enqueue_admin($hook) {
1007
  wp_enqueue_style ('wp-color-picker');
1008
  wp_enqueue_script ('colorpicker-script', plugins_url('color-picker.js', __FILE__), array('wp-color-picker'), false, true);
1009
  }
1010
 
1011
+ // 通常時のスタイルシート
1012
  public function enqueue($hook) {
1013
  if (!isset($this->options['style'])) {
1014
  wp_enqueue_style ('pz-linkcard', $this->options['css-url']);
1019
  }
1020
  }
1021
 
1022
+ // 管理画面のサブメニュー追加
1023
  public function add_menu() {
1024
  add_management_page (__('LinkCard cache manager', $this->text_domain),__('Pz LkC Cache', $this->text_domain),'manage_options', 'pz-linkcard-cache', array($this, 'page_cacheman') );
 
1025
  add_options_page (__('LinkCard Settings', $this->text_domain),__('Pz LinkCard', $this->text_domain),'manage_options', 'pz-linkcard-settings', array($this, 'page_settings') );
1026
  }
1027
 
1028
+ // WP-CRONスケジュール(SNSカウント取得)
1029
+ public function schedule_hook_sns() {
1030
  if (!isset($this->options['sns-position']) || $this->options['sns-position'] == '') {
1031
  return null;
1032
  }
1049
  }
1050
  }
1051
 
1052
+ // WP-CRONスケジュール(存在チェック)
1053
+ public function schedule_hook_alive() {
1054
+ if (!isset($this->options['flg-alive']) || $this->options['flg-alive'] == '') {
1055
+ return null;
1056
+ }
1057
+
1058
+ // (まだ作ってない)
1059
+ global $wpdb;
1060
+ $now = current_time('timestamp');
1061
+ $result = (array) $wpdb->get_results($wpdb->prepare("SELECT url,nexttime FROM $this->db_name WHERE nexttime<%d ORDER BY nexttime ASC", $now));
1062
+ $i = 0;
1063
+ if (isset($result) && is_array($result) && count($result) > 0) {
1064
+ foreach($result as $data) {
1065
+ $i++;
1066
+ if ($i > 10) {
1067
+ // wp_schedule_single_event(time() + 30, 'pz_linkcard_check');
1068
+ break;
1069
+ }
1070
+ if (isset($data) && isset($data->url)) {
1071
+ $data = $this->pz_RenewSNSCount(array('url' => $data->url) );
1072
+ }
1073
+ }
1074
+ }
1075
+ }
1076
+
1077
  public function page_cacheman() {
1078
  require_once ('pz-linkcard-cacheman.php');
1079
  }
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Contributors: poporon
3
  Tags: post, internal link, external link, blogcard, linkcard
4
  Requires at least: 4.3
5
- Tested up to: 4.5.2
6
  Stable tag: trunk
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -146,6 +146,7 @@ Q3.
146
  A3.
147
  「Pz カード設定」の画面から、外部リンク、内部リンク、それぞれ「新しいウィンドウで開く」のチェックボックスが用意されています。
148
  外部サイトも同一ウィンドウで開くこともできます。
 
149
 
150
  Q4.
151
  WordPressピンバックが飛びません。
@@ -154,6 +155,12 @@ A4.
154
  WordPressピンバックは記事中にリンクを直接記述しないと飛びません。
155
  当プラグインはショートコードをカードの書式とリンクを展開するのでピンバックは飛びません。
156
 
 
 
 
 
 
 
157
  == Screenshots ==
158
 
159
  1. "Options screen"
@@ -164,6 +171,23 @@ WordPressピンバックは記事中にリンクを直接記述しないと飛
164
 
165
  == Changelog ==
166
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
167
  = 1.6.8 =
168
  * Compatible with WordPress 4.5.2.
169
  * Fixed: Fixed a notice.
2
  Contributors: poporon
3
  Tags: post, internal link, external link, blogcard, linkcard
4
  Requires at least: 4.3
5
+ Tested up to: 4.5.3
6
  Stable tag: trunk
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
146
  A3.
147
  「Pz カード設定」の画面から、外部リンク、内部リンク、それぞれ「新しいウィンドウで開く」のチェックボックスが用意されています。
148
  外部サイトも同一ウィンドウで開くこともできます。
149
+ 普段は外部サイトは新しいウィンドウで開き、モバイルで閲覧時のみ同一ウィンドウで開くこともできます。
150
 
151
  Q4.
152
  WordPressピンバックが飛びません。
155
  WordPressピンバックは記事中にリンクを直接記述しないと飛びません。
156
  当プラグインはショートコードをカードの書式とリンクを展開するのでピンバックは飛びません。
157
 
158
+ Q5.
159
+ SSLサイトの内容が取得できません。
160
+
161
+ A5.
162
+ ブログサイトのcURLでアクセスを行った際にサーバー側にSSL証明書が更新されていないためにSSL検証が失敗されるためと思われます。SSL検証を行わない設定は現在ありません。
163
+
164
  == Screenshots ==
165
 
166
  1. "Options screen"
171
 
172
  == Changelog ==
173
 
174
+ = 1.6.9 =
175
+ * Compatible with WordPress 4.5.3.
176
+ * Modefied: Scaled down to fit the screen size in setting. Default change `disabled` to `enabled`.
177
+ * Modefied: Use an alternative API to get the Twitter count.
178
+ * Fixed: Fix the method of acquiring the site icon in the internal site.
179
+ * Added: Added thumbnail acquisition method at the internal links.
180
+ * Added: Added the ability to disable the verification of SSL certificate.
181
+
182
+ * WordPress 4.5.3 での動作確認。
183
+ * 表示幅によってサムネイルを調整する「幅に合わせて縮小」を初期選択するように変更。
184
+ * Twitter代替API count.jsoon を使用するように変更。
185
+ * 内部リンクのときでWordPress標準のサイトアイコンが設定されていない場合、内部取得を選べないように修正。(Thanks @meiko2285)
186
+ * 内部リンクのときでサムネイル(アイキャッチ)が設定されていない場合、WebAPIを利用する設定を追加。(Thanks @fumiegl)
187
+ * SSL証明書の検証を無効にする機能を設定に追加。
188
+
189
+ * リンク切れチェック(準備中)(Thanks @misoji_13)
190
+
191
  = 1.6.8 =
192
  * Compatible with WordPress 4.5.2.
193
  * Fixed: Fixed a notice.