[WordPress] 外掛分享: Simple Share Follow Button

首頁外掛目錄 › Simple Share Follow Button
10+
安裝啟用
尚無評分
34 天前
最後更新
問題解決
WordPress 6.6+ PHP 8.0+ v1.10 上架:2021-11-11

內容簡介

Simple Share Follow Button 外掛可在網站上顯示分享按鈕與追蹤按鈕,讓訪客能輕鬆分享內容至社交媒體,並追蹤網站更新,提升互動性與流量。

【主要功能】
• 支援多種社交媒體平台分享
• 可自訂按鈕顯示位置
• 提供短碼顯示追蹤按鈕
• 可依文章類型或 ID 隱藏按鈕
• 簡易設定與過濾功能

外掛標籤

開發者團隊

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

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Simple Share Follow Button」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Displays the Share button and Follow button.
Button

X(Twitter)
Facebook
Instagram
Youtube
WordPress
Github
Line
Pocket
Hatena
Rss
Feedly

View

The share button is displayed immediately after the content.
The follow button is displayed on the top right by default. It can be changed in the settings page.
The follow button can also be displayed with a shortcode.

Filter for share button

Each initial value indicates the position from the left side.
If the value is null, it will be hidden.
ssfb_share_twitter : initial value 1
ssfb_share_facebook : initial value 2
ssfb_share_pocket : initial value 3
ssfb_share_hatena : initial value 4
ssfb_share_line : initial value 5

/** ==================================================
* Filter for hide X(twitter).
*
*/
add_filter( 'ssfb_share_twitter', function(){ return null; }, 10, 1 );

/** ==================================================
* Filter for position X(twitter) and facebook.
*
*/
add_filter( 'ssfb_share_twitter', function(){ return 2; }, 10, 1 );
add_filter( 'ssfb_share_facebook', function(){ return 1; }, 10, 1 );

If you want to hide it, set it to false.
ssfb_share : initial value true

/** ==================================================
* Filter for hide all.
*
*/
add_filter( 'ssfb_share', function(){ return false; }, 10, 1 );

If you want to hide it by post ID, set it to false.
ssfb_share_id : initial value true

/** ==================================================
* Display by post ID or not for Simple Share Follow Button
*
* @param bool $flag view.
* @param int $pid post ID.
* @since 1.00
*/
function ssfb_share_post_id( $flag, $pid ) {
if ( 1567 === $pid ) {
$flag = false;
}
return $flag;
}
add_filter( 'ssfb_share_id', 'ssfb_share_post_id', 10, 2 );

If you want to hide it by post type, set it to false.
ssfb_share_type : initial value true

/** ==================================================
* Display by post type or not for Simple Share Follow Button
*
* @param bool $flag view.
* @param string $type post type.
* @since 1.00
*/
function ssfb_share_post_type( $flag, $type ) {
if ( 'page' === $type || 'attachment' === $type ) {
$flag = false;
}
return $flag;
}
add_filter( 'ssfb_share_type', 'ssfb_share_post_type', 10, 2 );

icon
[IcoMoon – Free https://icomoon.io/]
License GPL / CC BY 4.0

延伸相關外掛

文章
Filter
Apply Filters
Mastodon