{"id":258623,"date":"2025-11-22T07:41:49","date_gmt":"2025-11-22T07:41:49","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/nostr-components\/"},"modified":"2026-02-20T17:02:55","modified_gmt":"2026-02-20T17:02:55","slug":"saiy2k-nostr-components","status":"publish","type":"plugin","link":"https:\/\/cn.wordpress.org\/plugins\/saiy2k-nostr-components\/","author":11662787,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"0.6.1","stable_tag":"0.6.1","tested":"6.8.5","requires":"6.0","requires_php":"7.4","requires_plugins":null,"header_name":"Saiy2k Nostr Components","header_author":"saiy2k","header_description":"Gutenberg blocks and shortcodes for Nostr web components. Display Nostr zaps button, follow button, posts, profiles with selective component loading for optimal performance.","assets_banners_color":"886dc6","last_updated":"2026-02-20 17:02:55","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/github.com\/saiy2k\/nostr-components","header_author_uri":"https:\/\/github.com\/saiy2k","rating":0,"author_block_rating":0,"active_installs":0,"downloads":448,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","faq"],"tags":{"0.3.0":{"tag":"0.3.0","author":"saiy2k","date":"2025-11-22 07:44:53"},"0.3.1":{"tag":"0.3.1","author":"saiy2k","date":"2025-12-20 06:18:22"},"0.3.2":{"tag":"0.3.2","author":"saiy2k","date":"2025-12-27 04:18:41"},"0.4.0":{"tag":"0.4.0","author":"saiy2k","date":"2026-01-07 14:39:33"},"0.4.1":{"tag":"0.4.1","author":"saiy2k","date":"2026-01-07 15:19:00"},"0.4.2":{"tag":"0.4.2","author":"saiy2k","date":"2026-01-07 15:31:42"},"0.5.4":{"tag":"0.5.4","author":"saiy2k","date":"2026-01-22 09:42:36"},"0.5.5":{"tag":"0.5.5","author":"saiy2k","date":"2026-02-18 16:52:22"},"0.5.6":{"tag":"0.5.6","author":"saiy2k","date":"2026-02-18 17:58:18"},"0.6.1":{"tag":"0.6.1","author":"saiy2k","date":"2026-02-20 17:02:55"}},"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-256x256.png":{"filename":"icon-256x256.png","revision":3400825,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3400825,"resolution":"1544x500","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.3.0","0.3.1","0.3.2","0.4.0","0.4.1","0.4.2","0.5.4","0.5.5","0.5.6","0.6.1"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3400825,"resolution":"1","location":"assets","locale":""},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3400825,"resolution":"2","location":"assets","locale":""},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3400825,"resolution":"3","location":"assets","locale":""},"screenshot-4.png":{"filename":"screenshot-4.png","revision":3400825,"resolution":"4","location":"assets","locale":""},"screenshot-5.png":{"filename":"screenshot-5.png","revision":3400825,"resolution":"5","location":"assets","locale":""},"screenshot-6.png":{"filename":"screenshot-6.png","revision":3400825,"resolution":"6","location":"assets","locale":""}},"screenshots":{"1":"Follow and Profile components","2":"Nostr post component","3":"Like and Zap buttons","4":"Zappers list","5":"Gutenberg blocks","6":"Settings page"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[4121,148076,220135,357,174],"plugin_category":[43,56],"plugin_contributors":[251043],"plugin_business_model":[],"class_list":["post-258623","plugin","type-plugin","status-publish","hentry","plugin_tags-blocks","plugin_tags-gutenberg","plugin_tags-nostr","plugin_tags-shortcodes","plugin_tags-social","plugin_category-customization","plugin_category-social-and-sharing","plugin_contributors-saiy2k","plugin_committers-saiy2k"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/saiy2k-nostr-components\/assets\/icon-256x256.png?rev=3400825","icon_2x":"https:\/\/ps.w.org\/saiy2k-nostr-components\/assets\/icon-256x256.png?rev=3400825","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/saiy2k-nostr-components\/assets\/screenshot-1.png?rev=3400825","caption":"Follow and Profile components"},{"src":"https:\/\/ps.w.org\/saiy2k-nostr-components\/assets\/screenshot-2.png?rev=3400825","caption":"Nostr post component"},{"src":"https:\/\/ps.w.org\/saiy2k-nostr-components\/assets\/screenshot-3.png?rev=3400825","caption":"Like and Zap buttons"},{"src":"https:\/\/ps.w.org\/saiy2k-nostr-components\/assets\/screenshot-4.png?rev=3400825","caption":"Zappers list"},{"src":"https:\/\/ps.w.org\/saiy2k-nostr-components\/assets\/screenshot-5.png?rev=3400825","caption":"Gutenberg blocks"},{"src":"https:\/\/ps.w.org\/saiy2k-nostr-components\/assets\/screenshot-6.png?rev=3400825","caption":"Settings page"}],"raw_content":"<!--section=description-->\n<p>https:\/\/www.youtube.com\/watch?v=jCaPlEWjeaI<\/p>\n\n<p>Nostr Components brings the power of Nostr (Notes and Other Stuff Transmitted by Relays) to your WordPress site through modern web components. This plugin provides Gutenberg blocks and shortcodes that allow you to seamlessly integrate Nostr content into your posts and pages.<\/p>\n\n<h4>Key Features<\/h4>\n\n<ul>\n<li><strong>Gutenberg Blocks<\/strong>: Modern block editor integration for Nostr Zap button, Post, Profile, Profile Badge, Follow Button, Like Button, and Livestream<\/li>\n<li><strong>Shortcodes<\/strong>: Classic editor support with simple shortcode syntax<\/li>\n<li><strong>Selective Loading<\/strong>: Enable only the components you need for optimal performance<\/li>\n<li><strong>Customizable<\/strong>: Configure relays, themes, and component settings<\/li>\n<li><strong>Security<\/strong>: Built-in security with custom element allowlist via KSES<\/li>\n<li><strong>Performance<\/strong>: Conditional asset loading based on enabled components<\/li>\n<\/ul>\n\n<h4>Available Components<\/h4>\n\n<ul>\n<li><strong>Nostr Zap button<\/strong>: Allows your readers to zap to your posts and pages<\/li>\n<li><strong>Nostr Follow Button<\/strong>: Interactive follow\/unfollow buttons for Nostr users<\/li>\n<li><strong>Nostr Post<\/strong>: Display Nostr notes\/posts with full content and metadata<\/li>\n<li><strong>Nostr Profile<\/strong>: Show complete Nostr user profiles with bio, stats, and social links<\/li>\n<li><strong>Nostr Profile Badge<\/strong>: Compact profile display perfect for sidebars and footers<\/li>\n<li><strong>Nostr Like Button<\/strong>: Like URLs using Nostr reactions (NIP-25)<\/li>\n<li><strong>Nostr Livestream<\/strong>: Display Nostr livestreams (NIP-53) with video playback and participant information<\/li>\n<\/ul>\n\n<h4>How It Works<\/h4>\n\n<ol>\n<li>Install and activate the plugin<\/li>\n<li>Go to Settings \u2192 Saiy2k Nostr Components to configure<\/li>\n<li>Enable only the components you need<\/li>\n<li>Add blocks in the Gutenberg editor or use shortcodes<\/li>\n<li>Configure relays and theme settings as needed<\/li>\n<\/ol>\n\n<h4>Example Usage<\/h4>\n\n<p><strong>Gutenberg Blocks:<\/strong>\nSimply add the Nostr blocks from the block inserter and configure them in the block settings.<\/p>\n\n<p><strong>Shortcodes:<\/strong>\n    [nostr_zap_button pubkey=\"npub1abc...\" url=\"\"]\n    [nostr_post eventid=\"note1abc...\"]\n    [nostr_profile pubkey=\"npub1abc...\"]\n    [nostr_profile_badge pubkey=\"npub1abc...\"]\n    [nostr_follow_button pubkey=\"npub1abc...\"]\n    [nostr_like_button]\n    [nostr_livestream naddr=\"naddr1abc...\"]<\/p>\n\n<h4>Adding Like and Zap Buttons to All Posts\/Pages<\/h4>\n\n<p>To automatically add Like and Zap buttons to the end of every post and page:<\/p>\n\n<ol>\n<li>Go to <strong>Appearance \u2192 Theme Editor<\/strong> (or use a child theme for safer customization)<\/li>\n<li>Select your active theme (or child theme)<\/li>\n<li>Open <code>functions.php<\/code><\/li>\n<li><p>Add the following code at the end of the file:<\/p>\n\n<pre><code>\/\/ Add shortcode to the end of every post and page\nfunction add_shortcode_to_content($content) {\n    \/\/ Only add in single posts and pages (not homepage or archives)\n    if (is_singular(['post', 'page']) &amp;&amp; in_the_loop() &amp;&amp; is_main_query()) {\n        $shortcode_1 = do_shortcode('[nostr_like_button]');\n        $current_url = esc_url(get_permalink());\n        $shortcode_2 = do_shortcode('[nostr_zap_button npub=\"[YOUR-NPUB-GOES-HERE]\" url=\"' . $current_url . '\"]');\n\n        $content .= '&lt;div class=\"nostr-shortcode-wrapper\"&gt;' . $shortcode_1 . '&lt;br\/&gt;&lt;br\/&gt;' . $shortcode_2 . '&lt;\/div&gt;';\n    }\n    return $content;\n}\nadd_filter('the_content', 'add_shortcode_to_content');\n<\/code><\/pre><\/li>\n<\/ol>\n\n<p><strong>Important Notes:<\/strong>\n* Replace <code>[YOUR-NPUB-GOES-HERE]<\/code> with your actual Nostr public key (npub format)\n* Always use a child theme when modifying theme files to preserve changes during theme updates\n* The buttons will only appear on single post and page views, not on archive pages or the homepage<\/p>\n\n<h3>Development<\/h3>\n\n<p>This plugin is developed as part of the Nostr Components project. For development, bug reports, and feature requests, please visit the <a href=\"https:\/\/github.com\/saiy2k\/nostr-components\">GitHub repository<\/a>.<\/p>\n\n<h3>Support<\/h3>\n\n<p>For support, please visit the <a href=\"https:\/\/github.com\/saiy2k\/nostr-components\">GitHub repository<\/a> or create an issue.<\/p>\n\n<h3>Privacy Policy<\/h3>\n\n<p>This plugin does not collect, store, or transmit any personal data. All Nostr data is fetched directly from public relays and displayed locally on your site. If components fetch data client\u2011side, visitors' browsers may directly connect to configured relays (exposing their IP and user agent to those relays). Configure trusted relays accordingly.<\/p>\n\n<!--section=faq-->\n<dl>\n<dt id=\"what%20is%20nostr%3F\"><h3>What is Nostr?<\/h3><\/dt>\n<dd><p>Nostr is a simple, open protocol that enables global, decentralized, and censorship-resistant social media. It's based on cryptographic keypairs and relays.<\/p><\/dd>\n<dt id=\"do%20i%20need%20a%20nostr%20account%20to%20use%20this%20plugin%3F\"><h3>Do I need a Nostr account to use this plugin?<\/h3><\/dt>\n<dd><p>No, you don't need a Nostr account to display Nostr content. However, for interactive features like follow buttons, users will need their own Nostr accounts.<\/p><\/dd>\n<dt id=\"can%20i%20customize%20the%20appearance%3F\"><h3>Can I customize the appearance?<\/h3><\/dt>\n<dd><p>Yes! The plugin supports light and dark themes, and you can customize the relay settings. The components are built with modern CSS and are responsive.<\/p><\/dd>\n<dt id=\"is%20this%20plugin%20secure%3F\"><h3>Is this plugin secure?<\/h3><\/dt>\n<dd><p>Yes, the plugin includes security measures including custom element allowlist via KSES and proper sanitization of all inputs.<\/p><\/dd>\n<dt id=\"can%20i%20use%20this%20with%20any%20wordpress%20theme%3F\"><h3>Can I use this with any WordPress theme?<\/h3><\/dt>\n<dd><p>Yes, the components are designed to work with any WordPress theme. They use modern CSS and are responsive.<\/p><\/dd>\n\n<\/dl>","raw_excerpt":"Gutenberg blocks and shortcodes for Nostr web components. Display Nostr zap buttons, follow buttons, posts, profiles.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/258623","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=258623"}],"author":[{"embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/saiy2k"}],"wp:attachment":[{"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=258623"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=258623"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=258623"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=258623"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=258623"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=258623"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}