• Resolved ashf

    (@ashf)


    Is there a hook to filter “passwords” shortcode attribute?
    I’d like to change passwords conditionally.

    or should I use “shortcode_atts_ppwp” hook?

    I’m creating restricted content with partial protection on Block Editor.

    • This topic was modified 4 years, 4 months ago by ashf.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello @ashf,

    Thanks for reaching out to us last night.

    Yes, there is a hook to filter “passwords” shortcode attribute.

    Can you please use the following hook and let us know if it works for you?

    add_filter( 'ppw_shortcode_passwords', 'ppw_filter_shortcode_passwords' );
    /**
     * Filter PPWP Passwords.
     * 
     * @param array $passwords Array shortcode passwords.
     * 
     * @return array
     */
    function ppw_filter_shortcode_passwords( $passwords ) {
    	// Filter array passwords.
    	return $passwords;
    }
    Thread Starter ashf

    (@ashf)

    Awesome!
    That’s very useful.

    I’m so glad it helps, @ashf.

    How’s your experience with our PPWP plugin so far, by the way?

    Elena

    Thread Starter ashf

    (@ashf)

    It’s good.
    I just left 5 star review.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Change passwords conditionally?’ is closed to new replies.