前言介紹
- 這款 WordPress 外掛「Autopost for X (formerly Autoshare for Twitter)」是 2020-01-15 上架。
- 目前有 4000 個安裝啟用數。
- 上一次更新是 2025-04-23,距離現在已有 11 天。
- 外掛最低要求 WordPress 6.5 以上版本才可以安裝。
- 外掛要求網站主機運作至少需要 PHP 版本 7.4 以上。
- 有 5 人給過評分。
- 論壇上目前有 2 個提問,問題解答率 0%
外掛協作開發者
10up | jeffpaul | scottlee | dharm1025 | dinhtungdu | johnwatkins0 | adamsilverstein |
外掛標籤
POSSE | share | tweet | twitter | social media |
內容簡介
自動推文文章標題或自訂訊息以及文章連結。
註:文章和頁面是預設支援的,開發人員可以使用autoshare_for_twitter_default_post_types篩選器更改預設支援的文章類型。
現在可以選擇自訂文章類型以啟用自動分享功能:
function opt_my_cpt_into_autoshare() {
add_post_type_support( 'my-cpt', 'autoshare-for-twitter' );
}
add_action( 'init', 'opt_my_cpt_into_autoshare' );
此外,也可以在註冊自訂文章類型時添加支援。文章類型會自動設置為自動分享。此外,未來此外掛的版本還可能允許手動設定。
雖然可以使用上述篩選器選擇文章類型加入自動分享功能,但預設情況下編輯人員仍需要在文章發佈期間手動啟用自動分享功能。autoshare_for_twitter_enabled_default篩選器允許在給定文章類型的所有文章中預設啟用自動分享功能。但編輯仍然可以在發佈過程中手動取消勾選該選項。
示例:
function enable_autoshare_by_default_for_core_post_type( $enabled, $post_type ) {
if ( 'post' === $post_type ) {
return true;
}
return $enabled;
}
add_filter( 'autoshare_for_twitter_enabled_default', 'enable_autoshare_by_default_for_core_post_type', 10, 2 );
更多技術細節可以在我們的 GitHub 存儲庫中找到。
免責聲明:TWITTER,TWEET,RETWEET 和 Twitter 徽標是 Twitter, Inc. 或其附屬公司的商標。
原文外掛簡介
Autopost for X (formerly Autoshare for Twitter) automatically shares your posts to X/Twitter as soon as they’re published. Once you hit the Publish button, the plugin sends your post’s title, featured image, and link to X/Twitter, along with a custom message.
Unlike a myriad of other social media, multitool solutions, Autopost for X is built solely for X/Twitter. It focuses on doing one thing and does it well, with the code and interface craftsmanship we apply to every project.
With Autopost for X, developers can further customize nearly everything about the posts, including the image, author, and link, using an extensive set of hooks built into the code. Among its other features, the WordPress plugin:
Works in both the classic and new block editors.
Becomes part of the pre-publish checklist step that’s part of the new block editor.
Posts a high-quality featured image with your post to X/Twitter.
Counts characters to keep you under the X/Twitter limit.
Adds a link to the post to X/Twitter in the block editor sidebar.
Disclaimer: TWITTER, TWEET, RETWEET and the Twitter logo are trademarks of Twitter, Inc. or its affiliates.
Plugin Compatibility
Distributor
When using with 10up’s Distributor plugin, posts that are distributed will not be autoposted if they are already posted to X/Twitter from the origin site. Autopost for X tracks posts that have been posted to X/Twitter in post meta to avoid “double posting”. To avoid this behavior, use the dt_blacklisted_meta filter to exclude the ‘autoshare_for_twitter_status’ meta value from being distributed :
add_filter( 'dt_blacklisted_meta', function( $blacklisted_metas ) {
$blacklisted_metas[] = 'autoshare_for_twitter_status';
return $blacklisted_metas;
} )
Developers
Note: Posts and pages are supported by default. Developers can use the autoshare_for_twitter_default_post_types filter to change the default supported post types
Custom post types can now be opted into autopost features like so:
function opt_my_cpt_into_autoshare() {
add_post_type_support( 'my-cpt', 'autoshare-for-twitter' );
}
add_action( 'init', 'opt_my_cpt_into_autoshare' );
In addition, adding support while registering custom post types also works. Post types are automatically set to autopost. Future versions of this plugin could allow this to be set manually.
While the autopost feature can be opted into for post types using the above filter, by default the editor still has to manually enable autopost during the post prepublish flow. The autoshare_for_twitter_enabled_default filter allows autopost to be enabled by default for all posts of a given post type. Editors can still manually uncheck the option during the publishing flow.
Example:
function enable_autoshare_by_default_for_core_post_type( $enabled, $post_type ) {
if ( 'post' === $post_type ) {
return true;
}
return $enabled;
}
add_filter( 'autoshare_for_twitter_enabled_default', 'enable_autoshare_by_default_for_core_post_type', 10, 2 );
Additional technical details can be found in our GitHub repository.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Autopost for X (formerly Autoshare for Twitter)」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
1.0.0 | 1.0.1 | 1.0.2 | 1.0.3 | 1.0.4 | 1.0.6 | 1.1.0 | 1.1.1 | 1.1.2 | 1.2.0 | 1.2.1 | 1.3.0 | 2.0.0 | 2.1.0 | 2.1.1 | 2.2.0 | 2.2.1 | 2.3.0 | trunk |
延伸相關外掛(你可能也想知道)
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...。
Custom Twitter Feeds – A Tweets Widget or X Feed Widget 》在您的網站上顯示可完全自訂、響應式且可被搜尋引擎爬取的 Twitter 動態資訊。 Custom Twitter Feeds 外掛將顯示完全符合您網站外觀和風格的推文,並提供大量...。
Recent Tweets Widget 》查看最新的 WordPress 外掛優惠。, 使用快取的 Twitter API v1.1 最新的 Recent Tweets Widget (最近的 Tweet 外掛)。它使用新版 Twitter API v1.1,並將 Twe...。
oAuth Twitter Feed for Developers 》一個符合 Twitter API 1.1 規範的 WordPress 外掛,為主題開發人員提供從 Twitter 使用者時間線取得物件陣列的功能。, 新的 Twitter API 需要您進行 oAuth 認...。
WP Social Bookmarking Light 》此外掛可將社交分享連結插入每篇文章的頂部或底部。, 對於主題開發人員,社交分享連結可以透過 PHP 代碼或使用短碼添加。請參閱相關文檔以獲得更多資訊。, 此...。
Social Media Widget 》快來查看適用於您網站的 WordPress 最新優惠。, 社交媒體小工具是一個簡單的側邊欄小工具,允許用戶輸入他們的社交媒體網站個人資料網址和其他訂閱選項,顯示...。
Professional Social Sharing Buttons, Icons & Related Posts – Shareaholic 》g your social share counts again with our Share Count Recovery tool. If you switch to HTTPS, change your domain name, or update your Permalinks, yo...。
Genesis Simple Share 》Genesis Simple Share是專為Genesis子佈景主題而設計的簡單易用的外掛程式。我們致力於讓預設選項和初始設定變得非常簡單實用。, 預設設定應該會自動啟用文章...。
Twitter 》此外掛提供嵌入 Twitter 內容、改善在 Twitter 上分享、轉換您的網站觀眾為 Twitter 或 Periscope 訂閱者,並輕鬆追蹤從 Twitter 广告來訪的訪問次數。, 要求...。
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...。
Simple Twitter Tweets 》一個簡單的 Twitter 儀表板外掛,使用 Twitter OAth 和 API v1.1,並備份以確保始終顯示您的 Tweets。, 為什麼要使用這個外掛?, 我們的客戶,尤其是共享主機...。
Easy Twitter Feed Widget Plugin 》Easy Twitter Feed Widget 外掛使用 Twitter Widget,不需建立 API 即可在 WordPress 網站上顯示推文,不需要建立 Twitter 應用程式。該外掛提供方便的介面,...。
WP TFeed 》文件 | 支援 | 範例 | 進階版, WP TFeed 是 WordPress 的免費 Twitter 外掛。您可以使用這個外掛透過 shortcode 或小工具,在網站上任何位置顯示即時的 Twitt...。
AccessPress Social Login Lite – Social Login WordPress Plugin 》文件 | 支援 | 示範 | 高級版, AccessPress Social Login Lite是一個完美的免費WordPress外掛程式,可讓您的網站使用者使用其喜愛的社交網站帳戶之一註冊/登...。
Rotating Tweets (Twitter widget and shortcode) 》, 取代 捷徑,例如 [rotatingtweets screen_name='your_twitter'],或小工具,並旋轉顯示您最新的推文。, 支援新的更長推文格式, 支援280字符, 節省空間 – ...。