: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
* 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 );
<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, PPW_Constants::DOMAIN ); ?>