• Resolved osilayer8

    (@osilayer8)


    Hello, i am searching a way to change my template while the password form is active. Is there a way to check via php if the current page is protected by Passster? Similar to the check of wordpress own password protection:
    if ( post_password_required() )

Viewing 1 replies (of 1 total)
  • Plugin Author patrickposner

    (@patrickposner)

    Hey @osilayer8,

    you can do something like this:

    echo do_shortcode( '[passster password="123"]' );
    
    $atts  = array( 'password' => '123' );
    $valid = passster\PS_Conditional::is_valid( $atts );
    
    if ( $valid ) {
      // Do something.
    }
Viewing 1 replies (of 1 total)
  • The topic ‘php condition, if page is protected’ is closed to new replies.