work seamlessly with top page builders', 'https://passwordprotectwp.com/docs/protect-partial-content-page-builders/?utm_source=user-website&utm_medium=pcp-general-tab&utm_campaign=ppwp-free' ); $page_builder_desc = sprintf( 'Alternatively, use our built-in blocks for popular page builders, e.g. %s and %s.', 'Elementor', 'Beaver Builder' ); // translators: %s: Link to documentation. $pcp_desc = sprintf( 'To track Partial Content Protection (PCP) password usage, please get %s and use %s instead.', 'Statistics addon', 'PCP global passwords' ); // translators: %s: Link to documentation. $pcp_notice = sprintf( 'Use %s to %s.', 'WordPress Customizer', 'customize PCP password form' ); $_get = wp_unslash( $_GET ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- We no need to handle nonce verification for render UI. $page = isset( $_get['page'] ) ? $_get['page'] : null; $tab = isset( $_get['tab'] ) ? $_get['tab'] : null; $message = 'Great! You’ve successfully copied the shortcode to clipboard.'; $use_shortcode_page_builder = ppw_core_get_setting_type_bool_by_option_name( PPW_Constants::USE_SHORTCODE_PAGE_BUILDER, PPW_Constants::SHORTCODE_OPTIONS ) ? 'checked' : ''; ?>
Below are all attributes available with this shortcode. It's important to note that the shortcode is
valid as long as it includes at least one of the required* attributes.
| Attribute name | Possible & Default values | |
|---|---|---|
passwords
Shortcode Inline passwords, which are used to unlock the protected section |
|
required* |
pwd
ID-based shortcode Global passwords |
|
required* |
pwd_label
Label-based shortcode Global passwords |
|
required* |
whitelisted_roles
Define who can access protected sections directly without entering a password |
Options: administrator, editor, author, contributor, subscriber | optional |
hidden_form_text
Hide password form or display a text instead |
|
optional |
on
Show protected content automatically at a set time until the “off” time |
|
optional |
off
Stop showing protected content without entering passwords |
|
optional |
headline
Headline of the password form |
|
optional |
description
Description above password form |
|
optional |
desc_below_form
Description below password form |
|
optional |
desc_above_btn
Description above password form submit button |
|
optional |
label
Label of the password field |
Default: Password:
|
optional |
placeholder
Placeholder of the password field |
Default: empty
|
optional |
loading
Loading text of the password form |
Default: Loading...
|
optional |
button
Button text of the password form |
Default: Enter
|
optional |
error_msg
The message which is shown when users enter a wrong password |
|
optional |
cookie
Set cookie expiration time |
| optional |
download_limit
Set the maximum number of times users can download a file embedded into content |
| optional |
class
Style the password form based on class |
CSS class name(s) separated by space(s) | optional |
id
Style the password form based on id |
Default: empty |
optional |
acf_field
Add additional fields to PCP password form |
| optional |