Skip to main content

benecaster_get_share_merge_tags()

Utilities Free
benecaster_get_share_merge_tags(): array

The merge tags [benecaster_episode_share]‘s text attribute resolves, ready to insert into a share-text field in a block or widget.

Return Value

Type: array

tag => description, with the literal tag as the key, braces included: {{episode_title}}, {{show_name}}, {{episode_number}}.

Example

foreach ( benecaster_get_share_merge_tags() as $tag => $description ) {
    printf( '<button type="button" data-insert="%s">%s</button>', esc_attr( $tag ), esc_html( $description ) );
}

Notes

Read-only, with no filter, by design. The shortcode replaces exactly these tags, so a tag added elsewhere would be offered and then printed as-is. To change share text in code, use the benecaster_episode_share_text filter.

Need this built rather than just documented? See our services →