Constants and hooks

Everything you can set in wp-config.php, and the filters and actions worth knowing about.

Constants

Put these above the stop editing line in wp-config.php. A constant outranks anything stored in the database, and the screen it belongs to says so rather than pretending the field still works.

Credentials

define( 'OWLDRAFT_PUBLISHER_RESEND_API_KEY', 're_xxxxxxxx' );
define( 'OWLDRAFT_PUBLISHER_STRIPE_KEY_TEST', 'sk_test_xxxxxxxx' );
define( 'OWLDRAFT_PUBLISHER_STRIPE_KEY_LIVE', 'sk_live_xxxxxxxx' );

A credential that does not have to live in the database should not. Press Connect on the Stripe screen anyway — that is what validates the key and installs the webhook.

Sign-in

Constant Default What it is
OWLDRAFT_PUBLISHER_TTL 86400 (24h) How long a sign-in link stays valid.
OWLDRAFT_PUBLISHER_TTL_AFTER_USE 600 (10m) How long it keeps working after its first use.
OWLDRAFT_PUBLISHER_MAX_USES 7 Uses before a link dies. Mail clients visit links before humans do.
OWLDRAFT_PUBLISHER_SESSION 184 days How long a reader stays signed in.
OWLDRAFT_PUBLISHER_RATE_EMAIL 8 Link requests per address per window.
OWLDRAFT_PUBLISHER_RATE_IP 30 Link requests per IP per window.
OWLDRAFT_PUBLISHER_RATE_WINDOW 43200 (12h) The window those two are counted over.
OWLDRAFT_PUBLISHER_ALLOW_SIGNUP true false closes sign-ups. The Access screen can still narrow it further.
OWLDRAFT_PUBLISHER_MAIL_FROM Force the from-address on sign-in mail.

Other

Constant What it is
OWLDRAFT_UPDATE_API Where this install asks about updates. For pointing a staging copy at a staging channel.
OWLDRAFT_PUBLISHER_MENU_POSITION Where the OwlDraft menu sits in the admin sidebar.

Filters

The useful ones, by what they let you change.

Posts and access

Filter
owldraft_publisher_post_visibility The final say on what a post is.
owldraft_publisher_post_tiers The tiers a Specific tiers post is open to.
owldraft_publisher_teaser The public half of a locked post.
owldraft_publisher_featured_post_types Which post types carry the featured flag.
owldraft_publisher_thumbnail_post_types Which post types get the thumbnail column.

The newsletter

Filter
owldraft_publisher_newsletter_delay_minutes The window between Publish and the first email. Default 5; zero sends at once.
owldraft_publisher_newsletter_send_by_default Whether the Email box arrives ticked on a new post. Default on — turn it off in a newsroom running twenty posts a day.
owldraft_publisher_newsletter_html The whole email document.
owldraft_publisher_newsletter_footer The footer. Keep the triple-braced unsubscribe tag exactly as it is.
owldraft_publisher_newsletter_reply_to Where replies go. Defaults to the site admin.

Mail

Filter
owldraft_publisher_mail_subject, _body, _from, _from_name, _headers Every transactional message.
owldraft_publisher_mail_log_retention_days How long log rows are kept. Default 90.
owldraft_publisher_resend_contact, _segment_filter, _broadcast, _email_payload What is sent to Resend, on the way out.

Members and money

Filter
owldraft_publisher_allow_signup The last word on whether a stranger may create an account.
owldraft_publisher_is_staff Who counts as staff rather than audience.
owldraft_publisher_signup_tier The tier a new free reader lands on.
owldraft_publisher_member_name How a reader is addressed.
owldraft_publisher_tiers, _tier_choices The catalogue, as read.
owldraft_publisher_format_amount How prices are printed.
owldraft_publisher_checkout_params, _checkout_return_url, _direct_checkout The Stripe Checkout Session and where it comes back to.
Filter
owldraft_publisher_pages, owldraft_publisher_page_id, owldraft_publisher_page_starters The four-page registry, the page behind each part, and what Create the missing pages writes.
owldraft_signin_url, owldraft_signup_url, owldraft_account_url, owldraft_signout_url, owldraft_pricing_url Every reader-facing address.
owldraft_publisher_login_redirect Where a reader lands after signing in.
owldraft_publisher_password_login_allowed, owldraft_publisher_wants_wp_login Whether a given user may use a password at all.
owldraft_nav_fallback_locations Which menu locations get the fallback member links.
owldraft_locate_template The template resolution itself.

Actions

Action Fires when
owldraft_publisher_user_registered A reader’s account is created.
owldraft_publisher_member_updated Their membership changes — tier, status, either direction.
owldraft_publisher_email_changed A confirmed email change lands.
owldraft_publisher_mail_suppressed A bounce, complaint or unsubscribe takes somebody off the list.
owldraft_publisher_newsletter_broadcast_created A post’s broadcast has been handed to Resend.
owldraft_publisher_resend_event Any webhook event from Resend, verified.
owldraft_publisher_featured_changed A post is featured or unfeatured.

Next: when something is wrong.

Last updated September 13, 2026

Something missing or out of date? Ask us and we will fix the page.