Plugin Directory

Changeset 1648176


Ignore:
Timestamp:
04/29/2017 11:30:56 PM (9 years ago)
Author:
oxynotes
Message:

sbs 1.6.1 update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • step-by-step-social-count-cache/trunk/sbs-social-count-cache.php

    r1647877 r1648176  
    44Plugin URI: https://wordpress.org/plugins/step-by-step-social-count-cache/
    55Description: ソーシャルブックマークのカウントをキャッシュするプラグイン
    6 Version: 1.6
     6Version: 1.6.1
    77Author: oxynotes
    88Author URI: http://oxynotes.com
     
    10061006
    10071007
    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 
    10341008} // end class
    10351009
     
    10411015// インスタンスの作成(コンストラクタの実行)
    10421016$SBS_SocialCountCache = new SBS_SocialCountCache();
    1043 
    1044 
    1045 
    1046 /**
    1047  * テスト用のコールバックをグローバル変数に追加する
    1048  *
    1049  * @param   string  $key
    1050  * @param   mixed   $callback
    1051  * @return  void
    1052  */
    1053 function add_callback( $key, $callback ) {
    1054     $GLOBALS['_sbs_callbacks'][$key] = $callback;
    1055 }
    10561017
    10571018
Note: See TracChangeset for help on using the changeset viewer.