Simplicityの特徴 › フォーラム › 不具合報告 › SSLサイトでの外部ブログカード対応
3件の返信スレッドを表示中
-
投稿者投稿
-
-
2015年9月23日 12:06 AM #32783
keimaspace
ゲストSSLサイトでは外部ブログカードの表示ができないのですが、APIエンドポイントを変更することで対応できましたのでご報告します。
変更前://hatenablog.com/embed?url=
変更後://hatenablog-parts.com/embed?url=
hatenablog.comでリクエストするとhatenablog-parts.comにリダイレクトされて表示されるので、hatenablog-parts.comが現在のAPIエンドポイントのようです――しかしドキュメントが見つからず、裏は取れていません。
よろしければマージお願いします。diff --git a/wp-content/themes/simplicity/functions.php b/wp-content/themes/simplicity/functions.php index 4f5d537..d1447fd 100644 --- a/wp-content/themes/simplicity/functions.php +++ b/wp-content/themes/simplicity/functions.php @@ -565,7 +565,7 @@ function url_to_hatena_blog_card_tag($url){ } //取得した情報からブログカードのHTMLタグを作成 - return '<'.'iframe '.'class="blog-card external-blog-card" src="//hatenablog.com/embed?url='.$url.'"></'.'iframe'.'>'; + return '<'.'iframe '.'class="blog-card external-blog-card" src="//hatenablog-parts.com/embed?url='.$url.'"></'.'iframe'.'>'; } endif; @@ -589,7 +589,7 @@ function url_to_hatena_blog_card($the_content) { // } // //取得した情報からブログカードのHTMLタグを作成 - // $tag = '<'.'iframe '.'class="blog-card external-blog-card" src="//hatenablog.com/embed?url='.$url.'"></'.'iframe'.'>'; + // $tag = '<'.'iframe '.'class="blog-card external-blog-card" src="//hatenablog-parts.com/embed?url='.$url.'"></'.'iframe'.'>'; //本文中のURLをブログカードタグで置換 $the_content = preg_replace('{'.preg_quote($match).'}', $tag , $the_content, 1);
-
2015年9月23日 12:30 AM #32786
keimaspace
ゲストああ、すみません、コード差分がバージョン1.8.1のものです。整理後のfunction.phpだと別の場所に移動していそうです。
-
2015年9月25日 9:27 AM #32799
Ozk
ゲスト同じくSSL化で表示できなくなって困ってました。
解決方法のご教示ありがとうございます。 -
2015年9月25日 5:30 PM #32813
わいひら
キーマスター修正方法ありがとうございます。
手元のファイルを修正しておいたので、次のバージョンで改善されると思います。
-
-
投稿者投稿
3件の返信スレッドを表示中
- このトピックに返信するにはログインが必要です。