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

19 lines
719 B
PHP

<?php
/**
* Password Protected Service
*/
$service = new PPW_Password_Services();
$is_protected = $service->is_protected_content( $post_id );
$icon_class = $is_protected ? 'dashicons-lock' : 'dashicons-unlock';
$color_class = $is_protected ? 'ppw_protected_color' : 'ppw_unprotected_color';
$status = $is_protected ? 'protected' : 'unprotected';
$post = get_post( $post_id );
?>
<div class="ppw-column">
<span id="ppw-badge-protection_<?php echo esc_attr( $post_id ); ?>"
class="ppw-badge-protection <?php echo esc_attr( $color_class ); ?>">
<i class="dashicons <?php echo esc_attr( $icon_class ); ?>"></i> <?php echo esc_html( $status, 'password-protect-page' ); ?>
</span>
</div>