更新するたびにググるのは面倒なので、メモ。
1.タイトルが空白になるバグの修正、2.カスタム投稿に対応させる修正
以上の2点のカスタマイズをしています。
1.について
①Tweetableプラグインフォルダの「mh_twitter_class.php」を開く
1. substr という文字列を mb_substr に変更
2. strlen という文字列を mb_strlen に変更
②Tweetableプラグインフォルダの「twittable.php」を開く
フックを増やしてやる。具体的には
/*** Hooks ***/
add_filter(‘the_content’, ‘tweetable_add_tweetmeme’);
add_action(‘widgets_init’, ‘tweetable_create_widget’);
add_action(‘init’, ‘tweetable_frontend_styles_and_scripts’);
add_action(‘publish_post’, ‘tweetable_publish_tweet’, 100);
add_filter(‘plugin_action_links’, ‘tweetable_add_plugin_links’, 10, 2);
add_action(‘publish_weblog’, ‘tweetable_publish_tweet’, 100);
add_action(‘publish_info’, ‘tweetable_publish_tweet’, 100);
赤字の部分が追加。これでOK!
