前言介紹
- 這款 WordPress 外掛「Better Share Buttons」是 2023-03-15 上架。
- 目前有 20 個安裝啟用數。
- 上一次更新是 2024-10-03,距離現在已有 213 天。
- 外掛最低要求 WordPress 5.7 以上版本才可以安裝。
- 外掛要求網站主機運作至少需要 PHP 版本 7.0 以上。
- 尚未有人給過這款外掛評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
kubiq |
外掛標籤
icons | share | buttons | sharing | social media |
內容簡介
- 創建多種社交分享圖標風格- 使用短碼在任何想要的地方顯示分享圖標- 在主題文件夾中創建自己的風格- 直接在管理員中自定義基本設置- 使用不同的圖標來確定社交網絡- 支援多種鉤子(hooks),如自定義包裝類別(customize wrapper classes)和HTML輸出(customize HTML output)等- 創建新文件夾命名為better-share-buttons在主題文件夾中並將樣式文件放入xyz.css和xyz.json文件中。XYZ樣式會自動出現在管理員設置中。 JSON文件的內容用於在選擇該風格時在管理員中操縱設置。CSS文件的內容應定義你的風格。
原文外掛簡介
Easily use [better_share_buttons] shortcode anywhere you want.
Create your own styles, or choose from existing ones.
This plugin is optimized for fastest websites – it will not load any JS files and it will load CSS file only when it is needed.
This plugin allows you to:
create multiple social share icon styles
use shortcode to display share icons anywhere you want
create your own styles in your theme folder
customize basic settings directly in admin
use different icons for social networks
Hooks
customize wrapper classes
add_filter( 'share_buttons_classes', function( $classes, $share_buttons_settings, $share_buttons_id ){
$classes[] = 'my-custom-class';
return $classes;
}, 10, 3 );
customize wrapper CSS output
add_filter( 'share_buttons_styles', function( $style, $share_buttons_settings, $share_buttons_id ){
$style[] = '--my-var: 50px';
return $style;
}, 10, 3 );
customize html form more button
add_filter( 'better_share_buttons_more', function( $html, $share_buttons_settings, $share_buttons_id ){
// replace SVG icon path with a custom one
$html = str_replace( 'M18 14V8h-4v6H8v4h6v6h4v-6h6v-4h-6z', 'M18.2 4.2C18.2 3 17.2 2 16 2s-2.2 1-2.2 2.2v9.7H4.2C3 13.8 2 14.8 2 16s1 2.2 2.2 2.2h9.7v9.7c0 1.2 1 2.2 2.2 2.2s2.2-1 2.2-2.2v-9.7H28c1.2 0 2.2-1 2.2-2.2s-1-2.2-2.2-2.2h-9.7V4.2z', $html );
return $html;
}, 10, 3 );
add custom icon for any network
add_filter( 'share_buttons_icons', function( $icon, $slug, $share_buttons_settings, $share_buttons_id ){
if( $slug == 'facebook' ){
// add custom SVG path and you will be able to select it in admin
$icon[] = 'M29.3 16c0-7.4-6-13.3-13.3-13.3C8.6 2.7 2.7 8.6 2.7 16c0 6.5 4.6 11.8 10.7 13.1V20h-2.7v-4h2.7v-3.3c0-2.6 2.1-4.7 4.7-4.7h3.3v4h-2.7c-.7 0-1.3.6-1.3 1.3V16h4v4h-4v9.3c6.7-.7 11.9-6.4 11.9-13.3z';
}
return $icon;
}, 10, 4 );
control shared URL
add_filter( 'better_share_buttons_permalink', function( $url ){
// ...
return $url;
});
control shared title
add_filter( 'better_share_buttons_title', function( $title ){
// ...
return $title;
});
control HTML output for any network
add_filter( 'better_share_buttons_link', function( $html, $slug, $share_buttons_settings, $share_buttons_id ){
if( $slug == 'facebook' ){
$html = str_replace( 'https://facebook.com/sharer/sharer.php?', 'https://facebook.com/sharer/sharer.php?xxx=yyy&', $html );
}
return $html;
}, 10, 4 );
Create your own styles
Create new folder better-share-buttons inside your theme folder and put iniside style files xyz.css and xyz.json.
Style xyz will automatically appear in the admin settings.
Content of JSON file is used to manipulate settings in admin when you select that style:
{
"visible_buttons": 999,
"bsb_mx": 0,
"bsb_my": 0,
"bsb_px": 5,
"bsb_py": 5,
"bsb_br": 0,
"bsb_fz": 0,
"bsb_iz": 32,
"bsb_lls": 0,
"bsb_lrs": 0
}
Content of CSS file should define your style:
.better_share_buttons.bsb-style-xyz{}
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Better Share Buttons」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
1.5 | 1.6 | 1.7 | 1.8 | 1.9 | 1.8.1 | 1.9.1 | 1.9.2 | trunk |
延伸相關外掛(你可能也想知道)
Orbit Fox by ThemeIsle 》透過Orbit Fox,您可以使用各種模組擴充您的主題功能,例如社交媒體分享按鈕和圖示、自訂選單圖示、頁首和頁尾腳本、一鍵導入頁面模板、頁面建構器附加元件和...。
Shariff Wrapper 》「原始的」分享按鈕會在訪問者瀏覽網站時自動將他們的資料傳送到社交網路,而訪問者不需要點選任何分享按鈕,因此沒有選擇權,也無法決定是否要將資料傳送。...。
Social Share Icons & Social Share Buttons 》percharge您的網站社交分享功能,僅需幾個點擊即可使用該外掛。, 在您的免費模擬網站上試用:點擊此處 => https://tastewp.com/plugins/ultimate-social-m...。
Grow for WordPress 》總結:, , - Grow是一個幫助獨立內容創作者節省時間和金錢的工具,能夠幫助你的內容在你最在乎的觀眾中脫穎而出。, - 你可以免費創建一個Grow帳戶,無隱藏費...。
XPoster – Share to Bluesky and Mastodon 》在 WordPress 上將文章推文至 Twitter。, 是的,這就是基本功能,但這並不是唯一的用途:, , 顯示最新的推文:小工具以顯示您的最新推文。從您自己或任何其他...。
Shared Counts – Social Media Share Buttons 》Shared Counts 是一個 WordPress 社交媒體分享按鈕外掛。分享按鈕可以增加流量和參與度,幫助讀者將您的文章和頁面分享給他們在社交媒體上的朋友。, 包含的按...。
Storefront Product Sharing 》這是一個簡單的外掛,它能夠為產品頁面增加一個吸引人的分享組件,提示訪客在Facebook、Twitter、Pinterest或通過電子郵件上分享你的產品。, 但這個外掛必須...。
Broadcast 》輕鬆進行網站內容的網絡同步傳播!, 現在,在 WordPress 多站點網絡中,只需一個源頭,即可輕鬆地進行內容同步傳播!您可以將文章同步傳播到網絡中的其他博客...。
Shariff for WordPress 》這是基於 c’t Shariff 的 Shariff for WordPress 外掛程式。, 如需更多資訊,請查看原始GitHub 專案和c’t 訊息頁面。, , Shariff 讓網站使用者分享喜愛...。
Share This Image 》分享帶有自訂內容的選定圖像!, 此外掛可將社交分享圖示添加到您網站的每個圖像。, Share This Image 是一個簡單靈活的 WordPress 圖片分享外掛,可給您很大...。
Easy Social Sharing 》Easy Social Sharing 外掛提供了一個簡單的方式來顯示多種受歡迎的社交分享按鈕。同時也提供社交分享次數的功能。, 我們收集了 18 種受歡迎的社交分享按鈕,...。
Crafty Social Buttons 》此外掛會在你的網站上添加一組社交媒體按鈕,其中包括與手工藝品相關的社交媒體網站如 Ravelry、Etsy、Craftsy 和 Pinterest,以及其他重要的社交媒體網站,...。
LessButtons Social Sharing and Statistics 》LessButtons(少按鈕)會自動顯示訪客關注和登錄的社交網絡的分享按鈕。, 支持自動檢測和顯示Facebook、Twitter、Google+、Pinterest、LinkedIn、Reddit、VKont...。
Shared Counts – Pinterest Image 》這個外掛程式是針對Shared Counts所開發的功能擴充,讓您能夠在 Pinterest 上分享不同的圖片。, Shared Counts 在所有平台上分享時都會使用文章的精選圖片。...。
Tilt Social Share Widget 》Tilt Social Share Widget 是一個簡單的小工具,可讓您啟用文章和/或頁面的分享功能。, 可用的服務, 使用 Tilt Social Share Widget,您可以啟用以下分享服務...。