
內容簡介
FediBoost 是一款擴展 ActivityPub 外掛的工具,能在您發佈新文章時,自動在連結的 Mastodon 帳戶上進行推廣,提升文章在聯邦網絡中的可見度。
【主要功能】
• 自動推廣新文章至連結的 Mastodon 帳戶
• 與 ActivityPub 外掛無縫整合
• 設定後無需額外配置
外掛標籤
開發者團隊
原文外掛簡介
FediBoost extends the ActivityPub plugin by automatically boosting your WordPress posts on your connected Mastodon accounts when they are published.
When you publish a new post on your WordPress site, FediBoost will automatically boost (reblog) that post on your linked Mastodon account, helping increase visibility across the fediverse.
Features:
Automatic boosting of new posts to connected Mastodon accounts
Seamless integration with the ActivityPub plugin
No additional configuration required after setup
Requirements:
The ActivityPub plugin must be installed and configured
A connected Mastodon account via ActivityPub
Developer Hooks
FediBoost provides several filters that allow developers to customize its behavior. All filters follow WordPress coding standards and can be added to your theme’s functions.php file or a custom plugin.
fediboost_should_boost_post
Control whether a specific post should be boosted. Return false to skip boosting for the given post. Default: true.
Parameters:
$should_boost (bool) — Whether the post should be boosted.
$post (WP_Post) — The post object being published.
Example:
add_filter( 'fediboost_should_boost_post', function( $should_boost, $post ) {
// Don't boost posts in the "internal" category.
if ( has_category( 'internal', $post ) ) {
return false;
}
return $should_boost;
}, 10, 2 );
fediboost_boost_delay
Delay in seconds after ActivityPub federation completes before the boost is executed. This delay is only used when the federation completion hook fires successfully. Default: 30.
Parameters:
$delay (int) — The delay in seconds.
Example:
add_filter( 'fediboost_boost_delay', function( $delay ) {
// Wait 2 minutes after federation before boosting.
return 120;
} );
fediboost_fallback_delay
Delay in seconds before a boost is executed when the ActivityPub federation completion hook does not fire. This acts as a safety net for older versions of the ActivityPub plugin that do not support the activitypub_outbox_processing_complete hook. If the federation hook fires first, the fallback is cancelled and fediboost_boost_delay is used instead. Default: 300 (5 minutes).
Parameters:
$delay (int) — The fallback delay in seconds.
Example:
add_filter( 'fediboost_fallback_delay', function( $delay ) {
// Wait 10 minutes in the fallback path.
return 600;
} );
fediboost_manage_capability
WordPress capability required to manage FediBoost settings. Default: ‘manage_options’. Note: a floor of ‘edit_others_posts’ is enforced regardless of this filter’s return value, so you cannot lower the requirement below that capability.
Parameters:
$capability (string) — The required capability.
Example:
add_filter( 'fediboost_manage_capability', function( $capability ) {
// Allow editors to manage FediBoost settings.
return 'edit_others_posts';
} );
fediboost_max_accounts
Maximum number of connected Mastodon accounts. Default: 10.
Parameters:
$max (int) — The maximum number of accounts.
Example:
add_filter( 'fediboost_max_accounts', function( $max ) {
// Allow up to 25 connected accounts.
return 25;
} );
External Services
FediBoost connects to external Mastodon instances that you configure (e.g., mastodon.social). This communication is essential for the plugin to function and is initiated only with the instance you explicitly provide.
During setup:
FediBoost registers an OAuth application on your Mastodon instance and performs an authorization flow so it can act on your behalf.
When a post is published:
FediBoost searches for the post on your Mastodon instance and performs a reblog (boost) via the Mastodon API.
Data sent to your Mastodon instance:
Your instance URL
OAuth authorization codes
Search queries to locate your posts
Reblog (boost) requests
Data stored locally on your WordPress site:
Encrypted OAuth tokens
Your Mastodon username
Your Mastodon instance URL
Each Mastodon instance has its own privacy policy and terms of service. You can find a list of instances and their policies at joinmastodon.org/servers.
This plugin does not send data to any third-party service other than the Mastodon instance(s) you explicitly configure.
