Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .plugin-data
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version": "1.0.0",
"version": "1.1.0",
"slug": "blockparty-post-sharing"
}
2 changes: 1 addition & 1 deletion .wordpress-org/blueprints/blueprint.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"pluginData": {
"resource": "git:directory",
"url": "https://github.com/BeAPI/blockparty-post-sharing",
"ref": "1.0.0",
"ref": "1.1.0",
"refType": "tag"
},
"options": {
Expand Down
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Changelog

All notable changes to this project are documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.1.0] - 2026-08-07

### Added

- Social share fallback menu when the Web Share API is unavailable (Facebook, X, Bluesky, LinkedIn, WhatsApp).
- `blockparty_post_sharing_networks` filter to customize share networks from PHP.
- CSS custom properties and network icons for the fallback menu.
- Manual class loading fallback when Composer autoload is unavailable.

## [1.0.0] - 2026-06-19

### Added

- Initial release with copy and share buttons, editable labels, icons, responsive display settings, and WordPress Playground blueprint.
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -324,10 +324,7 @@ This plugin is distributed under the GPL-2.0-or-later license.

## 📝 Changelog

See [readme.txt](readme.txt) for the full version history. Recent highlights:

- **1.0.0**
- Initial release with copy and share buttons, editable labels, icons, responsive display settings, and WordPress Playground blueprint.
See [CHANGELOG.md](CHANGELOG.md) for the full version history.

---

Expand Down
4 changes: 2 additions & 2 deletions blockparty-post-sharing.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Plugin Name: Blockparty Post Sharing
* Description: Add a block to copy and share the current post URL.
* Version: 1.0.0
* Version: 1.1.0
* Requires at least: 6.8
* Requires PHP: 8.1
* Author: Be API Technical Team
Expand All @@ -29,7 +29,7 @@
require_once __DIR__ . '/includes/ShareNetworks.php';
}

define( 'BLOCKPARTY_POST_SHARING_VERSION', '1.0.0' );
define( 'BLOCKPARTY_POST_SHARING_VERSION', '1.1.0' );
define( 'BLOCKPARTY_POST_SHARING_URL', plugin_dir_url( __FILE__ ) );
define( 'BLOCKPARTY_POST_SHARING_DIR', plugin_dir_path( __FILE__ ) );
define( 'BLOCKPARTY_POST_SHARING_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"translation-revision-date":"2026-06-19 15:34+0200","generator":"WP-CLI\/2.11.0","source":"build\/blockparty-post-sharing\/view.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fr_FR","plural-forms":"nplurals=2; plural=(n != 1);"},"Link copied":["Lien copi\u00e9"],"Unable to copy link":["Impossible de copier le lien"],"Unable to share":["Impossible de partager"]}}}
{"translation-revision-date":"2026-08-07 16:19+0200","generator":"WP-CLI\/2.11.0","source":"build\/blockparty-post-sharing\/view.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fr_FR","plural-forms":"nplurals=2; plural=(n != 1);"},"Link copied":["Lien copi\u00e9"],"Unable to copy link":["Impossible de copier le lien"],"Unable to share":["Impossible de partager"],"Share on social networks":["Partager sur les r\u00e9seaux sociaux"],"Share on %s":["Partager sur %s"]}}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"translation-revision-date":"2026-06-19 15:34+0200","generator":"WP-CLI\/2.11.0","source":"build\/blockparty-post-sharing\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fr_FR","plural-forms":"nplurals=2; plural=(n != 1);"},"Copy link":["Copier le lien"],"Share":["Partager"],"Link copied":["Lien copi\u00e9"],"Display":["Affichage"],"Viewport":["Appareil"],"Desktop":["Ordinateur"],"Mobile":["Mobile"],"Display copy button":["Afficher le bouton de copie"],"Display share button":["Afficher le bouton de partage"],"Copy Button":["Bouton de copie"],"Copied link label":["Libell\u00e9 du bouton de copie"],"Text displayed on the copy button after the link is copied.":["Texte du bouton de copie qui s\u2019affiche apr\u00e8s que le lien soit copi\u00e9."],"Icon":["Ic\u00f4ne"],"Show icon":["Afficher l\u2019ic\u00f4ne"],"Icon position":["Position de l\u2019ic\u00f4ne"],"Left":["Gauche"],"Right":["Droite"],"Copy action is available on the front end only.":["Les actions de copie sont uniquement disponibles sur l\u2019interface publique."],"Share action is available on the front end only.":["Les actions de partage sont uniquement disponibles sur l\u2019interface publique."]}}}
{"translation-revision-date":"2026-08-07 16:19+0200","generator":"WP-CLI\/2.11.0","source":"build\/blockparty-post-sharing\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fr_FR","plural-forms":"nplurals=2; plural=(n != 1);"},"Copy link":["Copier le lien"],"Share":["Partager"],"Link copied":["Lien copi\u00e9"],"Display":["Affichage"],"Viewport":["Appareil"],"Desktop":["Ordinateur"],"Mobile":["Mobile"],"Display copy button":["Afficher le bouton de copie"],"Display share button":["Afficher le bouton de partage"],"Copy Button":["Bouton de copie"],"Copied link label":["Libell\u00e9 du bouton de copie"],"Text displayed on the copy button after the link is copied.":["Texte du bouton de copie qui s\u2019affiche apr\u00e8s que le lien soit copi\u00e9."],"Icon":["Ic\u00f4ne"],"Show icon":["Afficher l\u2019ic\u00f4ne"],"Icon position":["Position de l\u2019ic\u00f4ne"],"Left":["Gauche"],"Right":["Droite"],"Copy action is available on the front end only.":["Les actions de copie sont uniquement disponibles sur l\u2019interface publique."],"Share action is available on the front end only.":["Les actions de partage sont uniquement disponibles sur l\u2019interface publique."]}}}
Binary file modified languages/blockparty-post-sharing-fr_FR.mo
Binary file not shown.
13 changes: 11 additions & 2 deletions languages/blockparty-post-sharing-fr_FR.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ msgstr ""
"Project-Id-Version: Blockparty Post Sharing 1.0.0\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/blockparty-post-"
"sharing\n"
"POT-Creation-Date: 2026-06-19T13:34:14+00:00\n"
"PO-Revision-Date: 2026-06-19 15:34+0200\n"
"POT-Creation-Date: 2026-08-07T14:19:19+00:00\n"
"PO-Revision-Date: 2026-08-07 16:19+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: fr_FR\n"
Expand Down Expand Up @@ -124,6 +124,15 @@ msgstr "Impossible de copier le lien"
msgid "Unable to share"
msgstr "Impossible de partager"

#: build/blockparty-post-sharing/view.js:1
msgid "Share on social networks"
msgstr "Partager sur les réseaux sociaux"

#. translators: %s: social network name
#: build/blockparty-post-sharing/view.js:2
msgid "Share on %s"
msgstr "Partager sur %s"

#: build/blockparty-post-sharing/block.json
msgctxt "block title"
msgid "Post Sharing Button"
Expand Down
13 changes: 11 additions & 2 deletions languages/blockparty-post-sharing.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# This file is distributed under the GPL-2.0-or-later.
msgid ""
msgstr ""
"Project-Id-Version: Blockparty Post Sharing 1.0.0\n"
"Project-Id-Version: Blockparty Post Sharing 1.1.0\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/blockparty-post-sharing\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2026-06-19T13:34:14+00:00\n"
"POT-Creation-Date: 2026-08-07T14:19:19+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.11.0\n"
"X-Domain: blockparty-post-sharing\n"
Expand Down Expand Up @@ -122,6 +122,15 @@ msgstr ""
msgid "Unable to share"
msgstr ""

#: build/blockparty-post-sharing/view.js:1
msgid "Share on social networks"
msgstr ""

#. translators: %s: social network name
#: build/blockparty-post-sharing/view.js:2
msgid "Share on %s"
msgstr ""

#: build/blockparty-post-sharing/block.json
msgctxt "block title"
msgid "Post Sharing Button"
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "blockparty-post-sharing",
"version": "1.0.0",
"version": "1.1.0",
"description": "Example block scaffolded with Create Block tool.",
"author": "The WordPress Contributors",
"license": "GPL-2.0-or-later",
Expand Down
63 changes: 34 additions & 29 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,55 +1,60 @@
=== Blockparty Post Sharing ===
Contributors: The WordPress Contributors
Tags: block
Contributors: beapi
Tags: block, share, social, gutenberg, clipboard
Requires at least: 6.8
Tested up to: 6.8
Stable tag: 0.1.0
Requires PHP: 8.1
Stable tag: 1.1.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Example block scaffolded with Create Block tool.
Add a Gutenberg block to copy and share the current post URL in one click.

== Description ==

This is the long description. No limit, and you can use Markdown (as well as in the following sections).
Blockparty Post Sharing lets editors add sharing actions to posts via the block editor. Visitors can copy the article link to the clipboard or open the native share sheet of their device when supported.

For backwards compatibility, if this section is missing, the full length of the short description will be used, and
Markdown parsed.
When the Web Share API is unavailable, the Share button opens a fallback menu with Facebook, X, Bluesky, LinkedIn, and WhatsApp. Themes and plugins can customize that list with the `blockparty_post_sharing_networks` filter.

== Installation ==
= Features =

This section describes how to install the plugin and get it working.
* Native Gutenberg block
* Copy link with visual and screen reader feedback
* Native share via the Web Share API when available
* Social fallback menu when the Web Share API is unavailable
* Editable button labels
* Configurable copied-state label
* Icons via CSS custom properties
* Responsive display settings for desktop and mobile
* Multilingual support

e.g.
== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/blockparty-post-sharing` directory, or install the plugin through the WordPress plugins screen directly.
1. Activate the plugin through the 'Plugins' screen in WordPress

2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Open a post in the block editor and add the **Post Sharing Button** block.

== Frequently Asked Questions ==

= A question that someone might have =
= Does the Share button work on every browser? =

An answer to that question.
When the browser supports the Web Share API, the native share sheet is used. Otherwise, a fallback menu with social networks is shown.

= What about foo bar? =
= Can I change the social networks in the fallback menu? =

Answer to foo bar dilemma.
Yes. Use the `blockparty_post_sharing_networks` filter. See the plugin README for examples.

== Screenshots ==
= Can I customize icons and menu styles? =

1. This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from
the /assets directory or the directory that contains the stable readme.txt (tags or trunk). Screenshots in the /assets
directory take precedence. For example, `/assets/screenshot-1.png` would win over `/tags/4.3/screenshot-1.png`
(or jpg, jpeg, gif).
2. This is the second screen shot
Yes. CSS custom properties on `.wp-block-blockparty-post-sharing-button` let you override icons, colors, paddings, and borders.

== Changelog ==

= 0.1.0 =
* Release

== Arbitrary section ==
= 1.1.0 =
* Add a social share fallback menu when the Web Share API is unavailable (Facebook, X, Bluesky, LinkedIn, WhatsApp).
* Make share networks filterable via `blockparty_post_sharing_networks`.
* Style the fallback menu with CSS custom properties and network icons.
* Load plugin classes without Composer for manual installs.

You may provide arbitrary sections, in the same format as the ones above. This may be of use for extremely complicated
plugins where more information needs to be conveyed that doesn't fit into the categories of "description" or
"installation." Arbitrary sections will be shown below the built-in sections outlined above.
= 1.0.0 =
* Initial release with copy and share buttons, editable labels, icons, responsive display settings, and WordPress Playground blueprint.
7 changes: 5 additions & 2 deletions src/blockparty-post-sharing/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "blockparty/post-sharing-button",
"version": "1.0.0",
"version": "1.1.0",
"title": "Post Sharing Button",
"category": "widgets",
"description": "Give users the opportunity to share your post with a single click.",
Expand All @@ -27,7 +27,10 @@
"iconPosition": {
"type": "string",
"default": "left",
"enum": [ "left", "right" ]
"enum": [
"left",
"right"
]
},
"displaySettings": {
"type": "object",
Expand Down
10 changes: 5 additions & 5 deletions tests/bin/check-release-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ missing=()
for f in \
.plugin-data \
package.json \
blockparty-modal.php \
blockparty-post-sharing.php \
readme.txt \
.wordpress-org/blueprints/blueprint.json \
CHANGELOG.md
Expand Down Expand Up @@ -118,13 +118,13 @@ if [ "$BP_REF" != "$NEW_VER" ]; then
fail=1
fi

if ! grep -F "* Version:" blockparty-modal.php | head -1 | grep -qF "$NEW_VER"; then
echo "::error::blockparty-modal.php plugin header Version must be ${NEW_VER}"
if ! grep -F "* Version:" blockparty-post-sharing.php | head -1 | grep -qF "$NEW_VER"; then
echo "::error::blockparty-post-sharing.php plugin header Version must be ${NEW_VER}"
fail=1
fi

if ! grep -qF "define( 'BLOCKPARTY_MODAL_VERSION', '$NEW_VER' );" blockparty-modal.php; then
echo "::error::blockparty-modal.php define BLOCKPARTY_MODAL_VERSION must be '${NEW_VER}'"
if ! grep -qF "define( 'BLOCKPARTY_POST_SHARING_VERSION', '$NEW_VER' );" blockparty-post-sharing.php; then
echo "::error::blockparty-post-sharing.php define BLOCKPARTY_POST_SHARING_VERSION must be '${NEW_VER}'"
fail=1
fi

Expand Down
Loading