[WordPress] 外掛分享: Ringier-Bus

WordPress 外掛 Ringier-Bus 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「Ringier-Bus」是 2021-11-18 上架。
  • 目前有 10 個安裝啟用數。
  • 上一次更新是 2025-04-25,距離現在已有 10 天。
  • 外掛最低要求 WordPress 6.0 以上版本才可以安裝。
  • 外掛要求網站主機運作至少需要 PHP 版本 8.1 以上。
  • 尚未有人給過這款外掛評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

ringier | wkhayrattee |

外掛標籤

api | bus | cde | ringier |

內容簡介

這是一個外掛程式,當文章被創建、更新或刪除時,可以將事件推送到 Ringier Event Bus。

使用人群

此外掛程式適用於使用 WordPress 的 Ringier 企業,並希望從 Ringier Event Bus 中的 Hexagon 解決方案中受益。它可以由開發人員和非開發人員實施。

好處

通過 Ringier Event Bus 可用的 Hexagon 解決方案,與此外掛程式兼容,包括:
– 將文章與 Sailthru 媒體庫同步,
– 在 Ringier Datalake 中存儲文章事件,由內容分發引擎(CDE)檢索。
您還可以從 Bus 工具中受益,如事件記錄、事件監視和警報。

要了解有關 Hexagon 服務的更多信息,請訪問 https://hexagon.ringier.com/services/business-agility/。

工作原理

此外掛程式會自動觸發事件,當文章被創建、更新和刪除時。
事件名稱:ArticleCreated、ArticleUpdated 和 ArticleDeleted。

事件安排在延遲 2 分鐘後發送到 Bus。這是為了允許 WordPress 處理更改並異步更新自定義字段。您可以通過使用外掛程式 「Advanced Cron Manager」查看預定事件。

此外掛程式還在文章編輯頁面上創建了兩個自定義字段,即「事件總壽命」和「隱藏字段」。
– CDE 需要文章壽命。
– 第二個字段稱為「隱藏字段」,用於內部使用。它用於確定文章是正在創建還是正在更新,這是因為 WordPress 的文章存儲方式沒有默認提供此類信息。

貢獻

有很多方式可以貢獻:
– 如果您發現問題,請提出問題,
– 為我們提供反饋和改進建議,
– 使用您的錯誤修復和/或新功能創建 Pull Request。GitHub 存儲庫:https://github.com/RingierIMU/mkt-plugin-wordpress-bus

學分/感謝

1)Wasseem Khayrattee- 創建和維護該外掛程式
2)Mishka Rasool- 構思/創建橫幅和標誌資源文件

原文外掛簡介

A plugin to push events to the Ringier Event Bus when articles are created, updated or deleted.
AUDIENCE
This plugin is made for Ringier businesses using WordPress and wanting to benefit from Hexagon solutions available via the Ringier Event Bus. It can be implemented by developers and non-developers.
BENEFITS
The Hexagon solutions available via the Ringier Event Bus and compatible with this plugin include:
– The syncing of articles with Sailthru media library,
– The storage of article events in Ringier Datalake, from which they are retrieved by the Content Distribution Engine (CDE).
You can also benefit from the Bus tooling such as event logging, event monitoring and alerting.
To learn more about Hexagon services, visit https://hexagon.ringier.com/services/business-agility/.
HOW IT WORKS
The plugin automatically triggers events when articles are created, updated and deleted.
Event names: ArticleCreated, ArticleUpdated and ArticleDeleted.
The events are scheduled to be sent to the Bus within a 1-minute delay. This is to allow WordPress to process the changes and update custom fields in the database, which is done asynchronously. You can view scheduled events by making use of the plugin “Advanced Cron Manager”.
Here is a summary of the events sent to the Bus:
– If the article is newly created, we send it INSTANTLY – sent as ArticleCreated
– But then we schedule it to run again after the normal 1 minute so that all custom data are sent properly – sent as ArticleUpdated
– For all existing articles that undergo an update, we schedule the event to run after the 1 minute interval
The plugin also creates two mandatory custom fields, available on the article editor page under “Event Bus” widget:
– The article lifetime (lifetime)
– The publication reason (publication_reason)
We also expose custom filters to help you adjust these two fields and the payload sent to the BUS endpoint, see below.
LOGS
This plugin creates a log file (ringier_bus_plugin_error_log), saved inside the wp-content/ folder:
The error messages are viewable via the admin UI by clicking on the submenu “LOG”.
You also have the flexibility to clear the log file via the UI itself.
CUSTOM FILTERS
The plugin exposes three custom filters to help you adjust the plugin’s JSON Payload that is sent to the BUS endpoint.
1. Modifying the Publication Reason
You can customize the publication reason for an article by using the ringier_bus_get_publication_reason filter. This filter allows you to modify the publication reason before it is sent to the Ringier Event Bus.
Example:
function custom_publication_reason(string $publication_reason, int $post_ID): string
{
// Your custom logic goes here
return 'Custom Publication Reason';
}
add_filter('ringier_bus_get_publication_reason', 'custom_publication_reason', 10, 2);
2. Modifying the Article Lifetime Payload
You can customize the article lifetime for an article by using the ringier_bus_get_article_lifetime filter. This filter allows you to modify the article lifetime before it is sent to the Ringier Event Bus.
Example:
function custom_article_lifetime(string $article_lifetime, int $post_ID): string
{
// Your custom logic goes here
return 'Custom Article Lifetime';
}
add_filter('ringier_bus_get_article_lifetime', 'custom_article_lifetime', 10, 2);
3. Modifying the Article Payload Data
You can customize the payload data for an article by using the ringier_bus_build_article_payload filter. This filter allows you to modify the payload data before it is sent to the Ringier Event Bus.
Example:
function custom_build_article_payload(array $payload_array, int $post_ID, WP_Post $post): array
{
// Add a custom field to the payload for example
$payload_array['custom_field'] = 'Custom Value';
return $payload_array;
}
add_filter('ringier_bus_build_article_payload', 'custom_build_article_payload', 10, 3);
Contributing
There are many ways you can contribute:
– Raise an issue if you found one,
– Provide us with your feedback and suggestions for improvement,
– Create a Pull Request with your bug fixes and/or new features. GitHub repository: https://github.com/RingierIMU/mkt-plugin-wordpress-bus
Credits/Thanks
1) Wasseem Khayrattee – for creating and maintaining the plugin
2) Mishka Rasool – for conceiving/creating the banner and logo asset files

各版本下載點

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

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


1.0.0 | 1.0.1 | 1.0.2 | 1.0.3 | 1.1.0 | 1.1.1 | 1.2.0 | 1.3.0 | 1.3.1 | 2.1.0 | 2.2.0 | 2.3.0 | 3.0.0 | trunk |

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

暫無相關外掛推薦。

文章
Filter
Apply Filters
Mastodon