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' : ''; ?>


[ppwp] Shortcode

.

Shortcode Attributes

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

  • Each password is case-sensitive and no more than 100 characters, but doesn't contain [, ], ", ' and space characters
  • Password(s) are separated by space(s)
required*
pwd

ID-based shortcode Global passwords

  • Available in PPWP Pro only
  • ID(s) are separated by comma(s)
required*
pwd_label

Label-based shortcode Global passwords

  • Available in PPWP Pro only
  • Label(s) separated by comma(s)
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

  • Available in PPWP Pro only
  • Empty value or text
  • Accept HTML tags
optional
on

Show protected content automatically at a set time until the “off” time

  • Format: Y-m-d h:i:sa
  • Sample: 2020/10/20 14:00:00
  • Without "off" attribute, the content will be public since the “on” time
optional
off

Stop showing protected content without entering passwords

  • Format: Y-m-d h:i:sa
  • Sample: 2020/10/30 14:00:00
  • Require "on" attribute
optional
headline

Headline of the password form

  • Default: Restricted Content
  • Accept HTML tags
optional
description

Description above password form

  • Default: To view this protected content, enter the password below:
  • Accept HTML tags
optional
desc_below_form

Description below password form

  • Default: empty
  • Accept HTML tags
optional
desc_above_btn

Description above password form submit button

  • Default: empty
  • Accept HTML tags (Inline)
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

  • Default: Please enter the correct password!
  • Accept HTML tags
optional
cookie

Set cookie expiration time

  • Available in PPWP Pro only
  • Count by hours
optional
download_limit

Set the maximum number of times users can download a file embedded into content

  • Available in PPWP Pro only
  • Count by clicks
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

  • Default: empty
  • Available in PPWP Suite only
optional