: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
* Contains instance or null
private static $instance = null ;
* Returns instance of PS_Form.
public static function get_instance()
if ( null === self::$instance ) {
self::$instance = new self();
* Get password form markup and replace placeholders
public static function get_password_form() : string
$options = get_option( 'passster' );
include apply_filters( 'passster_password_form', PASSSTER_PATH . '/inc/templates/password-form.php' );
$password_form = ob_get_contents();
$password_form_placeholders = array(
'[PASSSTER_AUTH]' => 'passster_password',
'[PS_AJAX_LOADER]' => PASSSTER_URL . '/assets/public/ps-loader.svg',
$show_password = $options['show_password'];
$password_form_placeholders['[PASSSTER_SHOW_PASSWORD]'] = '<label for="passster-password-hint"><input name="passster-password-hint" id="passster-password-hint" type="checkbox" onclick="showPassword()"/> ' . esc_html__( 'Show Password', 'content-protector' ) . '</label>';
$password_form_placeholders['[PASSSTER_SHOW_PASSWORD]'] = '';
foreach ( $password_form_placeholders as $placeholder => $string ) {
$password_form = str_replace( $placeholder, $string, $password_form );