Templates and Shortcode
The login form shortcode
Section titled “The login form shortcode”[bplock_login_form] renders the plugin’s tabbed login and register form. The Register tab appears only when WordPress registration is enabled. Use it anywhere a shortcode runs, including inside the Custom Content editor on the Protection Rules tab.
[bplock_login_form]Overriding templates in your theme
Section titled “Overriding templates in your theme”The plugin looks for its front-end templates in your theme before falling back to the bundled copies. Copy any of these files from public/templates/ in the plugin into a bp-lock/ folder in your theme (or child theme) and edit your copy:
bplock-locked-content-template.php- the full locked page shown to logged-out visitors.bplock-login-form.php- the login form fields.bplock-register-form.php- the register form fields.
Search order:
wp-content/themes/<child-theme>/bp-lock/<file>wp-content/themes/<theme>/bp-lock/<file>wp-content/plugins/bp-lock/public/templates/<file>
You can also change the located template path with the bplock_locate_template and bplock_locked_content_template filters (see Hooks and Filters).
Settings storage
Section titled “Settings storage”All settings are stored in a single serialized option, bplock_general_settings, using the WordPress Options API. There are no custom database tables. Key sub-keys:
| Key | Meaning |
|---|---|
bplock-complete-site |
on when Full Protection is enabled. |
bplock-whitelist-urls |
Whitelist textarea (full mode). |
locked-urls |
Protected URLs textarea (partial mode). |
bp-components |
Array of protected BuddyPress component slugs. |
lr-form |
Protection method: plugin_form, custom_form, or page_redirect. |
custom_form_content |
Custom content for the custom_form method. |
locked_content |
Restriction message for the plugin_form method. |
logout_redirect_page |
Page ID for the page_redirect method. |
A few legacy standalone options (bp-components, bplock-pages) are read for backward compatibility and migrated into bplock_general_settings on upgrade.

