[WordPress] 外掛分享: Minimal Share Buttons

WordPress 外掛 Minimal Share Buttons 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「Minimal Share Buttons」是 2017-08-09 上架。
  • 目前有 100 個安裝啟用數。
  • 上一次更新是 2024-04-20,距離現在已有 379 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛要求網站主機運作至少需要 PHP 版本 5.6 以上。
  • 有 8 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

gonzomir | colinleroy | adrian-roselli |

外掛標籤

x | facebook | social media | share buttons | social sharing |

內容簡介

3>簡介

此外掛可在文章下方加入簡單分享按鈕、在新的編輯器中加入分享區塊,或使用元件加入分享並放置在任何佈景主題提供的小工具區。此掛使用簡單的 SVG 圖示作為社交網路標誌,以及純 JavaScript 大小程式碼,以允許使用者分享當前發佈或頁面。分享圖示承襲佈景主題連結顏色,以符合網站設計風格。

為什麼會選擇 Minimal Share Buttons 而不是其他類似的外掛呢?

極簡優雅的外觀,融入佈景主題中 (已測試所有最新的預設 WordPress 佈景主題以及一些其他受歡迎的佈景主題)。
對網站效能影響最小 - 此掛僅加載少量 SVG 圖示檔案,小於 1k CSS 和 3.5k 非壓縮 JavaScript 程式碼 - 大部分程式碼是為了使 SVG 圖示能在舊版瀏覽器上運作。
不監視您的使用者 - 此掛不會加載任何記錄使用者在您網站上的活動的第三方程式碼,也不會設置或讀取任何 cookie。
可透過支援原生分享對話框的裝置進行分享。
符合 GDPR 規定 - 由於此外掛不會向第三方洩露個人資訊,因此讓網站擁有者更容易遵循歐洲隱私規定。
輕鬆使用 - 分享連結具有標籤,可供螢幕閱讀器讀取,並對於鍵盤使用者可見。
支援 Gutenberg 和 WordPress 5.0 - 此外掛提供區塊,可顯示分享按鈕,讓作者可以將它們放置在文章內容的任何位置。

用法

有五種方法可在文章或頁面上顯示分享按鈕:

勾選插件設定螢幕上「顯示設定」部分中相關核取方塊,強制讓它們在文章內容下方顯示。
將分享小工具加到側邊欄或其他小工具區。
使用 Gutenberg 區塊,將分享按鈕放置在文章內容中的任何位置。
在經典編輯器中使用短代碼 [msb_share title="Share this"] 。
在主題模板中使用函數 msb_display_buttons() 來渲染小工具。

佈景主題開發人員

從 1.4 版開始,您可以更輕鬆地使用 msb_display_buttons() 函數在模板中顯示分享小工具。該功能接受兩個引數-一個傳遞給小工具的選項數組,以及第二個布林引數,告訴函數要回應的標記。以下是一個示例:

$args = [
    'before_widget' => '',
    'after_widget' => '',
    'before_title' => '',
    'after_title' => '',
    'title' => __( 'Share this article', 'mytextdomain' ),
];
msb_display_buttons( $args, true );

如果您的佈景主題使用 SVG 圖示,結合成 SVG 精靈,並且您的精靈具有 Facebook、Twitter、Google+ 和 LinkedIn 圖示,那麼您可以使用兩個篩檢器將外掛程序提供的圖示替換為您的圖示。這兩個篩選器的結果會與其間的哈希連接,並經過 esc_url 傳遞後輸出。

另一個篩選器允許操作社交網路數組。

msb_sprite_url

將篩選器應用於精靈圖像的 URL,篩選器函數應返回包含 symbol 元素圖示的 SVG 精靈圖像的 URL(未使用哈希標記)。

msb_social_networks

篩選器應用於社交網路數組。篩選器函數應返回一個數組,其中包含要在小工具中顯示的社交網路。

原文外掛簡介

Add simple share buttons under your posts, add share block in the new editor, or use the widget to add sharing to any widget area your theme provides. This plugin uses simple SVG icons for social network logos and small vanilla JavaScript to allow the user to share the current post or page. Share icons inherit their colours from the theme link colours to match the website design.
Why choose Minimal Share Buttons before other similar plugins?

Minimal and elegant look that blends with your theme (tested with all latest default WordPress themes as well as with some other popular themes).
Minimal impact on your site’s performance – the plugin loads only a small SVG file with the icons, less than 1k CSS and 3.5к unminified and uncompressed JavaScript – most of it to make SVG icons work in old browsers.
Doesn’t spy on your users – the plugin doesn’t load any thitd-party scripts that record your user’s activity on your site, doesn’t set or read any cookies.
Sharing through the native share dialog on devices that support it.
GDPR-hasle-free – since the plugin doesn’t leak personal information to third parties, this makes it easier for website owners to comply with the European privacy regulations.
Accessibility – the share links have labels, read by screen readers, and visible for keyboard users.
Gutenberg and WordPress 5.0 ready – the plugin provides block that displays the share buttons so that authors can place them wherever they want in the post content.

Usage
There are five ways of displaying the share buttons on a post or page:

Force them to display under the content of the post by checking the relevant checkboxes in the Display settings sections on the plugin settings screen.
Add Share widget to the sidebar or another widget area.
Use the Gutenberg block to add the share buttons whereever you want in the post content.
Use the shortcode [msb_share title="Share this"] in the classic editor.
Use the function msb_display_buttons() to render the widget in your theme templates.

Theme developers
From version 1.4 you can more easily display the sharing widget in your templates using the function msb_display_buttons(). The function accepts two arguments – an array of options, passed to the widget, and a second boolean argument that tells the function to echo the resulting markup. Here’s an example:
$args = [
'before_widget' => '

',
'after_widget' => '
',
'before_title' => '

',
'after_title' => '

',
'title' => __( 'Share this article', 'mytextdomain' ),
];
msb_display_buttons( $args, true );

If your theme uses SVG icons, combined into a SVG sprite, and your sprite has icons for Facebook, Twitter, Google+ and LinkedIn, there are two filters you can use to replace the icons, provided by the plugin, with yours. The results of the two filters are concatenated with a hash between them and passed through esc_url before output.
Another filter allows manipulation of the array of social networks.
msb_sprite_url
The filter is applied to the URL of the sprite image and the filter function should return the URL (without the hash sign) of an SVG sprite image, consisting of icons in symbol elements.
msb_icon_name
The filter is applied to the icon name before concatenating it to the sprite URL. It should return the ID of the icon symbol in the sprite.
msb_socials
The filter is applied to the default list of social networks and allows adding or removing socials networks. The array of social networks is associative array, the key is used for the option name on settings page and for the icon ID, and the value is associative array with three elements – field_label (the label of the field in settings), button_label (the label of the button for screenreader users), and share_url (the URL for sharing links). The share_url is passed through sprintf with two params – the URL of the current page and the title of the page. Example:
function my_add_xing( $socials ){

$socials['xing'] = array(
'field_label' => __( 'Xing', 'mytheme' ),
'button_label' => __( 'Share on Xing', 'mytheme' ),
'share_url' => 'https://www.xing.com/spi/shares/new?url=%1$s&title=%2$s'
);

return $socials;

}
add_filter( 'msb_socials', 'my_add_xing' );

msb_button_classes

This filter allows changing the classes of the individual buttons. Two parameters are apssed to the filter functions: the array with classes and the social network / button slug.
Credits

SVG Icons from FontAwesome, Creative Commons CC BY 4.0, MIT licence
Banner image by heinzremyschindler on pixbay, Creative Commons CC0
Plugin icon based on work by Nathan Diesel from the Noun Project, Creative Commons CC-BY

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Minimal Share Buttons」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 1.0 | 1.4 | 1.5 | 1.6 | 0.1.1 | 1.0.1 | 1.1.0 | 1.2.0 | 1.3.0 | 1.3.1 | 1.6.1 | 1.6.2 | 1.7.0 | 1.7.1 | 1.7.2 | 1.7.3 | trunk |

延伸相關外掛(你可能也想知道)

  • Facebook for WooCommerce 》這是官方版的「Facebook for WooCommerce」外掛,可將你的 WooCommerce 網站與 Facebook 連接。藉由此外掛,你可以安裝 Facebook 的像素碼、上傳你的線上商店...。
  • Meta pixel for WordPress 》這個外掛會為你的網頁安裝一個 Meta Pixel,這樣你就可以捕捉使用者與你的網頁溝通互動時所執行的動作,例如:產生潛在客戶、檢視內容、加入購物車、開始結帳...。
  • Nextend Social Login and Register 》ge and registration form, link the social accounts to the existing WordPress user accounts or create new users if necessary, enable users to link t...。
  • Smash Balloon Social Post Feed – Simple Social Feeds for WordPress 》此外掛可以在您的 WordPress 網站上顯示 Facebook 文章,且完全可定制、響應式、可被搜尋引擎檢索和符合 GDPR 規範。您可以從您的 Facebook 粉絲專頁或 Faceb...。
  • Facebook Chat Plugin – Live Chat Plugin for WordPress 》在您的網站上使用 Messenger 聊天與客戶溝通。Chat Plugin 是由 Meta Business 維護的聊天小工具,可在您的網站上提供即時聊天。, 網站訪客不論使用電腦或手...。
  • Open Graph and Twitter Card Tags 》此外掛可增進你的 WordPress 頁面、文章、WooCommerce 商品或任何其他文章類型在社群媒體上的分享,透過設定正確的 Facebook Open Graph 標籤。, 此外掛也允...。
  • Simple Share Buttons Adder 》Simple Share Buttons Adder 是一款可以在所有文章和頁面中添加分享按鈕的外掛,正如其名,它非常簡單易用。, 新的“現代分享按鈕”選項卡是基於 CSS 的設置,...。
  • Social Media Widget 》快來查看適用於您網站的 WordPress 最新優惠。, 社交媒體小工具是一個簡單的側邊欄小工具,允許用戶輸入他們的社交媒體網站個人資料網址和其他訂閱選項,顯示...。
  • OG — Better Share on Social Media 》毫不設定,功能強大。, 我們相信這個外掛對於初學者來說是最好的選擇,因為它不需要設定,只需安裝並啟用它 - 所有的神奇都將被完成!。
  • Feed Them Social – Social Media Feeds, Video, and Photo Galleries 》輕鬆地創建和展示可自定義的 Instagram、Facebook、Twitter 或 YouTube 社交饗宴。在桌面、平板電腦和移動設備上具有響應式設計。, 功能, , 快速安裝和設置。...。
  • Social Media Feather | social media sharing 》WordPress Social Media Feather(翻譯:WordPress 社交媒體羽毛)是一個輕量級免費的社交媒體 WordPress 外掛,讓你可以快速而無痛地將社交分享和追蹤功能添...。
  • miniOrange Social Login and Register (Discord, Google, Twitter, LinkedIn) 》WordPress Social Login 外掛讓使用者可以透過廣泛使用的社交應用程式如 Facebook、Google、LinkedIn、Twitter、Apple、Discord、Twitch、Line、Wechat 及另...。
  • Genesis Simple Share 》Genesis Simple Share是專為Genesis子佈景主題而設計的簡單易用的外掛程式。我們致力於讓預設選項和初始設定變得非常簡單實用。, 預設設定應該會自動啟用文章...。
  • 10Web Social Post Feed 》10WebSocial, 這是一個 WordPress 外掛的名稱,沒有翻譯內容。。
  • Tagembed: Embed Twitter Feed, Google Reviews, YouTube Videos, TikTok, RSS Feed & More Social Media Feeds 》Tagembed 是領先的社交媒體聚合工具,讓使用者聚合、整理和嵌入 Instagram Feed、Twitter Feed、Facebook Feed、YouTube Video、Google Reviews、RSS Feed、L...。

文章
Filter
Apply Filters
Mastodon