PRO block. A button that opens a modal with social sharing options for the current action. Block ID: get-fund/share.

Why use this
Sharing is a primary growth mechanism for peer-to-peer fundraising. A prominent, easy-to-use share button reduces friction and increases the reach of each action.
What it does
The block renders a button. When clicked, a modal opens with sharing options for:
- Twitter / X
- Copy link to clipboard
- Facebook Messenger (requires an app ID configured via filter)
The share URL defaults to the current action’s permalink. The share message defaults to the action title. Both can be overridden via block attributes or filters.
The block supports Query Loop context.
Requirements
- Active Fundations Pro license
How to use it
- Add the Share Modal block to an action page template or archive card.
- Customise the button text, style, and colors.
- Optionally enter a custom share message in the Share Message attribute.
- For Facebook Messenger sharing, configure the app ID using the
get_fund_share_messenger_app_idfilter.
Settings and options
| Option | Type | Default | Description |
|---|---|---|---|
| Button text | string | Share | Button label |
| Modal title | string | — | Title shown at the top of the modal |
| Modal heading | string | — | Heading inside the modal |
| Modal description | string | — | Descriptive text inside the modal |
| Share message | string | — | Custom message prepended to the share link; empty uses the action title |
| Button size | string | large | small, medium, or large |
| Alignment | string | center | left, center, or right |
| Full width | boolean | false | Stretch button to full container width |
| Border radius | number | 6 | Button corner rounding |
| Is outline | boolean | false | Outline button style |
| Border thickness | number | 2 | Outline border thickness |
| Border color | string | #4a9d44 | Outline border color |
| Button color | string | #4a9d44 | Filled button background |
| Button text color | string | #ffffff | Filled button text |
| Button hover color | string | #d32f4a | Filled button hover background |
What you can and cannot do
- Facebook Messenger requires a Facebook App ID. Without the filter returning an app ID, the Messenger button is not shown.
- The block does not expose a direct link without opening the modal; there is no inline share link variant.
Developer reference
Filters
// Filter the URL used in all share links
apply_filters( 'get_fund_share_url', string $share_url, int $post_id );
// Filter the default share message
apply_filters( 'get_fund_share_message', string $share_message, int $post_id, string $share_url );
// Provide a Facebook Messenger app ID (empty string = disable Messenger button)
apply_filters( 'get_fund_share_messenger_app_id', string $app_id );
// Filter the complete array of platform share URLs
apply_filters( 'get_fund_share_urls', array $urls, string $url, string $message );
// $urls keys: facebook, twitter, whatsapp, linkedin, email, messenger
Example: enable Messenger sharing
add_filter( 'get_fund_share_messenger_app_id', function() {
return '1234567890'; // your Facebook App ID
});
Example: add a custom share network
add_filter( 'get_fund_share_urls', function( $urls, $url, $message ) {
$urls['bluesky'] = 'https://bsky.app/intent/compose?text=' . rawurlencode( $message . ' ' . $url );
return $urls;
}, 10, 3 );