[WordPress] 外掛分享: Simple Share

首頁外掛目錄 › Simple Share
WordPress 外掛 Simple Share 的封面圖片
10+
安裝啟用
★★★★
4.8/5 分(4 則評價)
3979 天前
最後更新
問題解決
WordPress 4.0+ v1.0.1 上架:2014-11-23

內容簡介

啟用這個外掛可以在網站上方依序加入分享按鈕。

這個外掛沒有管理後台。
你可以加入 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/

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.0.1) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「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/

延伸相關外掛

文章
Filter
Apply Filters
Mastodon