Functions Reference
The public functions Benecaster provides for add-ons and themes. Each name links to its reference page with the signature, parameters and return value.
Access-tier
| Function | Description |
|---|---|
benecaster_get_user_tier_for_show() |
Returns the active tier slug for a user’s subscription to a specific show. |
benecaster_user_can_access_episode() |
Returns whether a user can access a specific episode based on their active token tier and the episode’s tier availability datetimes. |
Episode
| Function | Description |
|---|---|
benecaster_add_episode_note() |
Adds a production note to an episode. |
benecaster_apply_default_credit() |
Public helper that applies the show’s default credit template to an episode. |
benecaster_get_episode_notes() |
The read counterpart to benecaster_add_episode_note(). |
benecaster_get_latest_episode_id() |
Returns the ID of a show’s latest episode, for building “newest episode” surfaces in theme code and add-ons without writing the query yourself. |
Feed-token
| Function | Description |
|---|---|
benecaster_follower_signup() |
Signs one email address up as a free follower of a show. |
benecaster_get_public_feed_url() |
Returns the canonical public (un-gated) feed URL for a show — the URL at /podcast-feed/{slug}/ that anyone can access without a subscriber token. |
Feeds
| Function | Description |
|---|---|
benecaster_get_feed_url() |
Builds one subscriber’s private feed URL for one show, from a token you already hold. |
Membership
| Function | Description |
|---|---|
benecaster_bridge_supports_manual_membership() |
Returns whether the specified bridge supports programmatic manual subscriber creation — the operation behind the “Add subscriber manually” admin action. |
benecaster_count_paying_subscribers_site_wide() |
Counts paying subscribers across every show on the site, using the same definition of “paying” as benecaster_count_paying_subscribers() — a token type core doesn’t exempt (a deny list, not token_type = 'subscriber') on a… |
benecaster_count_paying_subscribers() |
Counts paying subscribers for one show. |
benecaster_find_audience_user_ids() |
Resolves a broadcast audience slug to the WordPress user IDs it reaches — the public entry point for answering “who would this send go to?” without pulling anything out of the service container. |
benecaster_get_active_bridge_slug() |
Answers which membership system a show is connected to. |
benecaster_get_member_thanks_rows() |
Turns a list of user IDs into fully described Member Thanks rows. |
benecaster_get_subscriber_count() |
Returns how many active tokens a show has issued. |
benecaster_get_subscriber_data() |
Looks up a subscriber’s Benecaster state for one show, starting from their email address. |
benecaster_get_user_badges() |
Returns the badges a subscriber has earned, both the ones their tier grants automatically and any an admin gave them by hand, merged and ordered oldest first. |
benecaster_get_user_id_by_subscriber_email() |
Resolves an email address to a WordPress user ID, or 0. |
benecaster_payment_test_mode_active() |
Whether payments in the requested scope are running against test credentials rather than live ones. |
benecaster_render_user_badges() |
Renders a subscriber’s badge chips as HTML, so a theme can show them anywhere without knowing how badges are stored or styled. |
benecaster_resolve_wall_display_name() |
Canonical function for resolving the name shown on community surfaces — the Supporter Wall, [benecaster_member_thanks], and any add-on that needs to display a subscriber’s name consistently. |
benecaster_set_active_bridge() |
Connects a show to a membership system programmatically — the same value the bridge picker in Settings → Subscription writes, so the UI reflects it on next page load. |
benecaster_user_has_buyup() |
Checks whether a subscriber has bought a particular buy-up on a particular show. |
Settings
| Function | Description |
|---|---|
benecaster_register_addon() |
Registers an add-on’s boot-time bootstrap with core’s system-level entitlement gate, replacing the manual any_show_addon_is_active() check the Add-on Integration Pattern previously asked every add-on to write inline. |
Show-episode-description
| Function | Description |
|---|---|
benecaster_get_episode_description() |
Returns an episode’s description — the text that appears in podcast apps — for use in theme code, template overrides, and add-ons. |
benecaster_get_show_description() |
Returns a show’s description for use in theme code, template overrides, and add-ons. |
Template
| Function | Description |
|---|---|
benecaster_account_page_url() |
Returns the URL of the subscriber account page — where a listener goes to see their feed URL, reset a token, or manage their subscription. |
benecaster_activate_template() |
Activates a design template by slug — either a built-in (default-light, default-dark) or one installed from a zip by benecaster_install_template(). |
benecaster_get_active_template() |
Returns the manifest of the design template currently in force. |
benecaster_get_footer() |
The closing half of benecaster_get_header(), with the same three behaviours: the footer block template part on block themes, get_footer() on classic themes, and silence on themes that have no footer file. |
benecaster_get_header() |
Prints the site header in a way that works on both classic and block themes. |
benecaster_get_installed_templates() |
Returns every design template the site can activate, active or not — the two built-ins shipped with the plugin first, then anything installed from a zip. |
benecaster_get_template_part() |
Renders one of Benecaster’s template parts, resolving it through your child theme, then your parent theme, then any directory an add-on registered with benecaster_register_template_directory(), then the plugin’s own copy. |
benecaster_get_template_path() |
Returns the file benecaster_get_template_part() would load for a given part, checking child theme, then parent theme, then each registered add-on directory in registration order, then the plugin default. |
benecaster_install_template() |
Validates and installs a Benecaster design template from a zip file. |
benecaster_locate_template() |
Answers one question: has the theme overridden this template part? |
benecaster_register_template_directory() |
Registers a directory that Benecaster will look in when resolving template parts, so an add-on can ship its own parts and override core’s defaults. |
Utilities
| Function | Description |
|---|---|
benecaster_addon_is_active_for_any_show() |
The install-wide counterpart to benecaster_addon_is_active(), mirroring benecaster_any_show_is_premium(). |
benecaster_addon_is_active() |
Answers whether an add-on may be used on a particular show, resolving two questions in order: is it granted (does this show’s license entitle it?) and is it enabled (has the podcaster left it switched on for this show?). |
benecaster_get_field() |
Reads one custom field value off one object. |
benecaster_get_fields() |
Reads every value in a field group off one object, keyed the way you named the fields. |
benecaster_get_license_plan() |
Returns which plan the site is on. |
benecaster_get_live_referral_balance() |
The podcaster’s referral credit balance, fetched live from the licence server. |
benecaster_get_notify_referral_updates() |
Reads the podcaster’s answer to Email me when referral credits are earned or applied on the Refer a Friend page. |
benecaster_get_over_limit_show_ids() |
Returns the show IDs currently disabled because the site is over its plan’s show limit. |
benecaster_get_plan_label() |
Turns a plan slug into the name a podcaster would recognise. |
benecaster_get_referral_code() |
Returns the customer’s referral code from the locally cached benecaster_license_referral_code option. |
benecaster_get_referral_credit_cents() |
The credit figure Benecaster last stored from the daily validation run. |
benecaster_get_referral_link() |
Returns the podcaster’s own referral URL, ready to share. |
benecaster_get_sole_show_id() |
Returns the show ID on a single-show install, and nothing on a multi-show one. |
benecaster_is_premium() |
Returns whether a valid premium license is active for the given show. |
benecaster_mail() |
Sends an ad-hoc email carrying Benecaster’s sender identity — a drop-in for wp_mail() in add-on code. |
benecaster_register_field_cpt() |
Opens your own post type up to Benecaster’s field groups, so podcasters can attach custom fields to it the same way they do to episodes. |
benecaster_rest_permission_admin() |
Permission callback for an add-on REST route that requires a site admin. |
benecaster_send_email() |
Sends one Benecaster email to a WordPress user through the full dispatch pipeline. |
benecaster_update_field() |
Writes one custom field value onto one object. |
See Also
Need this built rather than just documented? See our services →
Last updated