Files
szkoleniauryzaj.pl/wp-content/plugins/password-protect-page/includes/views/misc/view-ppw-use-another-action-url.php
2026-04-26 23:47:49 +02:00

24 lines
1.1 KiB
PHP

<?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>