
內容簡介
啟用這個外掛可以在網站上方依序加入分享按鈕。
這個外掛沒有管理後台。
你可以加入 Twitter、Facebook、Google 和日文專屬的 Hatena 分享按鈕。
在手機瀏覽器螢幕 (低於 480 像素) 上,分享按鈕會自動隱藏。
過濾勾子
simple_share_the_content – 過濾內容。
simple_share_get_share_buttons – 過濾分享按鈕。
simple_share_mobile_footer – 過濾手機版的頁腳按鈕。
simple_share_style – 過濾 CSS。
在頁腳中加入分享按鈕
add_filter( 'simple_share_the_content', function( $content, $share, $orig ){
return $share. $orig . $share;
}, 10, 3 );
其他注意事項
如果你跟其他外掛發生衝突,你可以停用頁腳的 JavaScripts,像下面這樣:
remove_action( 'simple_share_footer', array( $simple_share, 'facebook_script' ) ); – 停用 Facebook 的 JavaScripts。
remove_action( 'simple_share_footer', array( $simple_share, 'google_script' ) ); – 停用 Google 的 JavaScripts。
貢獻
https://github.com/miya0001/simple-share
https://travis-ci.org/miya0001/simple-share/
外掛標籤
開發者團隊
原文外掛簡介
You can place share buttons just by activating this plugin.
There is no admin panel.
You can place twitter, facebook, google, and hatena(ja only) buttons.
They will be hidden at mobile screen (under 480px).
Filter hook
simple_share_the_content – Filter the content.
simple_share_get_share_buttons – Filter the share buttons.
simple_share_mobile_footer – Filter the footer buttons on mobile.
simple_share_style – Filter the css.
Placing share buttons in the footer.
add_filter( 'simple_share_the_content', function( $content, $share, $orig ){
return $share. $orig . $share;
}, 10, 3 );
Other Notes
If you would have conflicts with other plugins you can stop JavaScripts in the footer like below.
remove_action( 'simple_share_footer', array( $simple_share, 'facebook_script' ) ); – Stop facebook scripts.
remove_action( 'simple_share_footer', array( $simple_share, 'google_script' ) ); – Stop Google scripts.
Contribution
https://github.com/miya0001/simple-share
https://travis-ci.org/miya0001/simple-share/
