跳到内容

Nostrtium

v0.7.4

pjv · 2023年4月28日 上架

Post to nostr from WordPress.

正在使用
10+
评分
暂无
累计下载
2,944
最近更新
2023年6月23日
需要 WordPress 6.0+已测试到 6.2.16PHP 8.1+

贡献者

截图

Nostrtium settings
Nostrtium settings
Post to nostr metabox
Post to nostr metabox

Nostrtium lets you post from WordPress to nostr.

This version implements basic nostr settings (private key, relays) and provides a metabox in the WordPress Post editing page which is pre-populated with the Post Excerpt and a link to the Post and lets you post the content of that metabox to your configured relays.

You can change the content in the metabox as you like. If you have a good excerpt and post it as-is, it creates a twitter-style “announcement” note on nostr. A lot of nostr clients will render the link to the WordPress post as a nice-looking summary card with featured image and etc. This functionality is probably enough for many use-cases but I have plans to add more functionality to this plugin in the future, including generation of keys; support for NIP-07 browser extensions; separate nostr profiles for individual WP users; support for full, long-form content from WP to nostr; and more.

There are also options (on the settings page) to auto-post to nostr the excerpt, the permalink, or both upon WordPress post publication.

[Note that the private key is stored encrypted in the WordPress database using libsodium cryptography.]

Support and Development

Development is taking place on github and the best (fastest) way to get support is to raise an issue or start a discussion there.

Requirements

Some of the included libraries have relatively recent dependency requirements so you will need the following in your WordPress platform:
* PHP 8.1+
* php-gmp module must be installed (Installation on Ubuntu)
* php-bcmath module must be installed (Installation on Ubuntu)
* WordPress 6.0+
* Writable uploads directory (on activation, the plugin writes a cryptographic keyfile to a storage directory)

How to Use

  1. After installing and activating the plugin, go into Settings -> Nostrtium and copy/paste the private key (nsec1…) that you want to post from and tweak the relays to your liking.
  2. Then visit the post editor page for an existing post and at or near the bottom you should see the Nostrtium metabox which is pre-populated with the excerpt and permalink for the post (you can change the content in the metabox as you like before posting):

User Role / Capability Filter

You can create a filter snippet (in your theme’s functions.php) to choose what user role or capability has access to Nostrtium functionality. The default is edit_posts. Here is a sample snippet that would change it so only adminstrators can see / use the plugin’s functionality:

add_filter ('nostrtium_role', function($role){
    return 'administrator';
});

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums