
內容簡介
總結:FediBoost是一個WordPress外掛,透過擴展ActivityPub插件,可以自動在發佈WordPress文章時在連接的Mastodon帳戶上增強(post boosting)文章,有助於提高文章在fediverse中的可見性。
問答:
<ul>
<li>什麼是FediBoost?</li>
<ul>
<li>FediBoost是一個WordPress外掛,自動將你的WordPress文章在連接的Mastodon帳戶上增強。</li>
</ul>
<li>FediBoost有哪些功能?</li>
<ul>
<li>自動將新文章增強到連接的Mastodon帳戶</li>
<li>與ActivityPub插件無縫整合</li>
<li>設置後無需額外配置</li>
</ul>
<li>FediBoost有哪些要求?</li>
<ul>
<li>必須安裝和配置ActivityPub插件</li>
<li>透過ActivityPub連接一個Mastodon帳戶</li>
</ul>
<li>FediBoost如何提供開發者鉤子?</li>
<ul>
<li>FediBoost提供多個過濾器,允許開發人員自定義其行為</li>
</ul>
<li>在發佈文章時,FediBoost會做什麼?</li>
<ul>
<li>FediBoost會在Mastodon實例上搜索文章,並通過Mastodon API執行轉帖(增強)</li>
</ul>
</ul>
外掛標籤
開發者團隊
原文外掛簡介
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.
