update
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* PPWP Restricted Content Form
|
||||
*/
|
||||
?>
|
||||
<div class="[PPW_FORM_CLASS] ppw-pcp-container" id="[PPW_FORM_ID]">
|
||||
<form method="post" autocomplete="off" action="[PPW_CURRENT_URL]" target="_top" class="post-password-form ppw-form ppw-pcp-password-form" data-submit="[PPW_AUTH]">
|
||||
<div class="ppw-headline ppw-pcp-pf-headline">[PPWP_FORM_HEADLINE]</div>
|
||||
<div class="ppw-description ppw-pcp-pf-desc">[PPWP_FORM_INSTRUCTIONS]</div>
|
||||
[PPWP_FORM_ABOVE_PASSWORD_INPUT]
|
||||
<p class="ppw-input">
|
||||
<input type="hidden" value="[AREA]" name="area" />
|
||||
<label class="ppw-pcp-password-label">[PPWP_FORM_PASSWORD_LABEL] <input placeholder="[PPW_PLACEHOLDER]" type="password" tabindex="1" name="[PPW_AUTH]" class="ppw-password-input ppw-pcp-pf-password-input" autocomplete="new-password">
|
||||
</label>
|
||||
<input class="ppw-page" type="hidden" value="[PPW_PAGE]" />[PPW_CHECKBOX]
|
||||
[SHORTCODE_DESC_ABOVE_BTN]
|
||||
<?php do_action('ppw_pcp_pf_desc_above_btn') ?>
|
||||
<input name="submit" type="submit" data-loading="[PPW_BUTTON_LOADING]" class="ppw-submit ppw-pcp-pf-submit-btn" value="[PPW_BUTTON_LABEL]"/>
|
||||
</p>
|
||||
[PPW_RECAPTCHA_INPUT]
|
||||
<div class="ppw-pcp-pf-desc-below-form">[SHORTCODE_DESC_BELOW_FORM]</div>
|
||||
[PPWP_FORM_BELOW_PASSWORD_INPUT]
|
||||
<div class="ppw-error ppw-pcp-pf-error-msg" style="color: <?php echo esc_attr( PPW_Constants::PPW_ERROR_MESSAGE_COLOR ); ?>">
|
||||
[PPW_ERROR_MESSAGE]
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
$html_link = sprintf(
|
||||
'<a target="_blank" rel="noopener" href="%s">lock parts of your content</a>',
|
||||
'https://passwordprotectwp.com/docs/password-protect-wordpress-content-sections/'
|
||||
);
|
||||
$desc = sprintf(
|
||||
// translators: %s: Link to documentation.
|
||||
esc_html__( 'Use the following shortcode to %s. Set as many passwords as you’d like to.', 'password-protect-page' ),
|
||||
$html_link
|
||||
);
|
||||
$link_shortcode = sprintf(
|
||||
'<a target="_blank" rel="noopener" href="%s">Use our built-in block</a>',
|
||||
'https://passwordprotectwp.com/docs/protect-partial-content-page-builders/?utm_source=user-website&utm_medium=plugin-settings&utm_content=shortcodes'
|
||||
);
|
||||
$message_shortcode = sprintf(
|
||||
// translators: %s: Link to documentation.
|
||||
__( '%s instead if you\'re using popular page builders, e.g. Elementor and Beaver Builder.', 'password-protect-page' ),
|
||||
$link_shortcode
|
||||
);
|
||||
$_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_shortcode_desc = '';
|
||||
// Only show this message when user has never installed and activated Pro version. Because we are having this kind of message in PCP Pro tab.
|
||||
if ( ! is_pro_active_and_valid_license() ) {
|
||||
$link_pcp = sprintf(
|
||||
'<a target="_blank" rel="noopener" href="%s">%s</a>',
|
||||
'https://passwordprotectwp.com/docs/manage-shortcode-global-passwords/',
|
||||
__( 'PCP global passwords', 'password-protect-page' )
|
||||
);
|
||||
|
||||
$link_stats_addon = sprintf(
|
||||
'<a target="_blank" rel="noopener" href="%s">%s</a>',
|
||||
'https://passwordprotectwp.com/extensions/password-statistics/',
|
||||
__( 'Statistics addon', 'password-protect-page' )
|
||||
);
|
||||
|
||||
$message_shortcode_desc = sprintf(
|
||||
/* translators: %1$s: Statistics link*/
|
||||
__( 'To track Partial Content Protection (PCP) password usage, please get %1$s and use %2$s instead.', 'password-protect-page' ),
|
||||
$link_stats_addon,
|
||||
$link_pcp
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
$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' : '';
|
||||
|
||||
?>
|
||||
<div class="ppw_main_container" id="ppw_shortcodes_form">
|
||||
<form id="wpp_shortcode_form" method="post">
|
||||
<table class="ppwp_settings_table" cellpadding="4">
|
||||
<?php do_action( PPW_Constants::HOOK_SHORTCODE_SETTINGS_EXTENDS ); ?>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
Reference in New Issue
Block a user