update
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<div class="ppw_main_container wp_misc_tab">
|
||||
<form id="wpp_misc_common_form">
|
||||
<input type="hidden" id="ppw_misc_form_nonce"
|
||||
value="<?php echo esc_attr( wp_create_nonce( PPW_Constants::GENERAL_FORM_NONCE ) ); ?>"/>
|
||||
<table class="ppwp_settings_table" cellpadding="4">
|
||||
<?php
|
||||
include PPW_DIR_PATH . 'includes/views/misc/view-ppw-protect-excerpt.php';
|
||||
include PPW_DIR_PATH . 'includes/views/misc/view-ppw-no-reload-page.php';
|
||||
do_action('ppwp_settings_advanced_top_options');
|
||||
?>
|
||||
</table>
|
||||
<?php submit_button();?>
|
||||
</form>
|
||||
<p>
|
||||
<hr>
|
||||
</p>
|
||||
<table class="ppwp_settings_table" cellpadding="4">
|
||||
<?php include PPW_DIR_PATH . 'includes/views/misc/view-ppw-restore-wp-password.php'; ?>
|
||||
</table>
|
||||
<?php do_action('ppw_render_misc_form'); ?>
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
$no_reload_page = PPW_Constants::NO_RELOAD_PAGE;
|
||||
$checked = ppw_core_get_setting_type_bool_by_option_name( $no_reload_page, PPW_Constants::MISC_OPTIONS ) ? 'checked' : '';
|
||||
$message = array(
|
||||
'label' => 'Unlock Protected Content without Page Refresh',
|
||||
'description' => '<a target="_blank" rel="noreferrer noopener" href="https://passwordprotectwp.com/docs/unlock-password-protected-content-without-page-refresh/?utm_source=user-website&utm_medium=settings-advanced-tab&utm_campaign=ppwp-free">Use Ajax to display protected content</a> without having to reload the entire page. It will help improve user experience and avoid server caching after users enter their passwords.'
|
||||
);
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td>
|
||||
<label class="pda_switch" for="<?php echo esc_attr( $no_reload_page ); ?>">
|
||||
<input type="checkbox"
|
||||
id="<?php echo esc_attr( $no_reload_page ); ?>" <?php echo esc_attr( $checked ); ?>/>
|
||||
<span class="pda-slider round"></span>
|
||||
</label>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<label><?php echo esc_html__( $message['label'], $no_reload_page ); ?>
|
||||
</label>
|
||||
<?php echo __( $message['description'], $no_reload_page ) // phpcs:ignore -- There is no value to escape on description ?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
$checked = ppw_core_get_setting_type_bool_by_option_name( PPW_Constants::PROTECT_EXCERPT, PPW_Constants::MISC_OPTIONS ) ? 'checked' : '';
|
||||
?>
|
||||
<tr>
|
||||
<td>
|
||||
<label class="pda_switch" for="<?php echo esc_attr( PPW_Constants::PROTECT_EXCERPT ); ?>">
|
||||
<input type="checkbox" id="<?php echo esc_attr( PPW_Constants::PROTECT_EXCERPT ); ?>" <?php echo esc_html( $checked ); ?>/>
|
||||
<span class="pda-slider round"></span>
|
||||
</label>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<label><?php echo esc_html__( 'Show Post Excerpt', 'password-protect-page' ); ?></label>
|
||||
<?php echo wp_kses_post( __( '<a target="_blank" href="https://passwordprotectwp.com/docs/display-featured-image-password-protected-excerpt/?utm_source=user-website&utm_medium=settings-advanced-tab&utm_campaign=ppwp-free">Display excerpt</a> of password protected posts. You can also <a target="_blank" href="https://passwordprotectwp.com/docs/display-featured-image-password-protected-excerpt/?utm_source=user-website&utm_medium=settings-advanced-tab&utm_campaign=ppwp-free#customize-default">customize the default excerpt</a> using a custom code snippet.', 'password-protect-page' ) ); ?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
global $password_recovery_service;
|
||||
|
||||
$num_wp_passwords = PPW_Repository_Passwords::get_instance()->count_wp_post_passwords();
|
||||
$is_running = $password_recovery_service->is_running();
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="feature-input"></span>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<label><?php echo esc_html__( 'Restore Default WordPress Passwords', 'password-protect-page' ); ?></label>
|
||||
<a target="_blank" rel="noopener noreferrer"
|
||||
href="https://passwordprotectwp.com/docs/password-migration/?utm_source=user-website&utm_medium=settings-advanced-tab&utm_campaign=ppwp-free#backup">Restore all your backup
|
||||
passwords</a> to maintain your content's protection status after plugin deactivation.
|
||||
<br>
|
||||
The process runs in the background. You will get a notification once it’s completed.
|
||||
<p>
|
||||
<?php
|
||||
if ( $is_running ) {
|
||||
echo esc_html__( 'Restoring ', 'password-protect-page' ) . '<b>' . esc_html( $num_wp_passwords ) . '</b>' . esc_html__( ' backup password(s)...', 'password-protect-page' );
|
||||
} else {
|
||||
echo esc_html__( 'There are ', 'password-protect-page' ) . '<b>' . esc_html( $num_wp_passwords ) . '</b>' . esc_html__( ' backup password(s).', 'password-protect-page' );
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
</p>
|
||||
<p>
|
||||
<input id="ppw-restore-passwords" <?php echo ! $num_wp_passwords || $is_running ? 'disabled="true"' : '' ?>
|
||||
type="button"
|
||||
class="button button-primary"
|
||||
value="Restore Now"
|
||||
>
|
||||
<div class="ppw-warning">
|
||||
<strong><?php echo esc_html__( 'Warning', 'password-protect-page' ) ?></strong>: <?php echo esc_html__( 'Do not restore default WordPress
|
||||
passwords unless you are to deactivate our plugins', 'password-protect-page' ) ?>
|
||||
</div>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
$checked = ppw_core_get_setting_type_bool_by_option_name( PPW_Constants::USE_CUSTOM_FORM_ACTION, PPW_Constants::MISC_OPTIONS ) ? 'checked' : '';
|
||||
$message = array(
|
||||
'label' => 'Use Custom Form Action',
|
||||
'description' => 'Enable this option when <a target="_blank" rel="noopener noreferrer" href="https://passwordprotectwp.com/docs/custom-login-page-compatibility/">the password protection doesn\'t work</a>, e.g. users get redirected to homepage or 404 error page.'
|
||||
);
|
||||
|
||||
?>
|
||||
<tr <?php echo $checked === 'checked' ? 'style="color: gray;"' : ''; ?>>
|
||||
<td>
|
||||
<label class="pda_switch" for="<?php echo esc_attr( PPW_Constants::USE_CUSTOM_FORM_ACTION ); ?>">
|
||||
<input type="checkbox"
|
||||
id="<?php echo esc_attr( PPW_Constants::USE_CUSTOM_FORM_ACTION ); ?>" <?php echo esc_attr( $checked ); ?> <?php echo $checked === 'checked' ? 'disabled' : ''; ?>/>
|
||||
<span class="pda-slider round"></span>
|
||||
</label>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<label><?php echo esc_html__( $message['label'], PPW_Constants::USE_CUSTOM_FORM_ACTION ) ?></label>
|
||||
<?php echo _e( $message['description'], PPW_Constants::USE_CUSTOM_FORM_ACTION ) ?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
Reference in New Issue
Block a user