Changeset 1648176
- Timestamp:
- 04/29/2017 11:30:56 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
step-by-step-social-count-cache/trunk/sbs-social-count-cache.php
r1647877 r1648176 4 4 Plugin URI: https://wordpress.org/plugins/step-by-step-social-count-cache/ 5 5 Description: ソーシャルブックマークのカウントをキャッシュするプラグイン 6 Version: 1.6 6 Version: 1.6.1 7 7 Author: oxynotes 8 8 Author URI: http://oxynotes.com … … 1006 1006 1007 1007 1008 /**1009 * テストモード時に各パーツから受け取ったコメントを書き出す処理をまとめたもの1010 * 書き出されたコメントはコールバック関数に渡される1011 * @param str 各コメントの要素を受け取る1012 * @return str コールバック関数に渡すコメント1013 *1014 * since 1.5.3 テストモード用に追加1015 */1016 function output_testmode_comment( $buffer ) {1017 $url = get_permalink();1018 $site_title = get_bloginfo( 'name' );1019 1020 // html_entity_decode()を挟まないと"や'が文字参照で表示されてしまうので注意1021 $title = urlencode( html_entity_decode( get_the_title(), ENT_COMPAT, 'UTF-8' ) );1022 1023 $search = array( '[[url]]', '[[site_title]]', '[[title]]', '[[count]]' );1024 $replace = array( $url, $site_title, $title, $count );1025 $rep_txt = str_replace( $search, $replace, $arg );1026 1027 return $rep_txt;1028 }1029 1030 1031 1032 1033 1034 1008 } // end class 1035 1009 … … 1041 1015 // インスタンスの作成(コンストラクタの実行) 1042 1016 $SBS_SocialCountCache = new SBS_SocialCountCache(); 1043 1044 1045 1046 /**1047 * テスト用のコールバックをグローバル変数に追加する1048 *1049 * @param string $key1050 * @param mixed $callback1051 * @return void1052 */1053 function add_callback( $key, $callback ) {1054 $GLOBALS['_sbs_callbacks'][$key] = $callback;1055 }1056 1017 1057 1018
Note: See TracChangeset
for help on using the changeset viewer.