Hooks & Filter

Passster provides a lot of useful filters and actions to modify the behavior of the plugin. This docs section is dedicated to developers, so expect a lot of code to read.

Action Hooks

passster_validation_success

This is an action hook that contains the password that was used to successfully unlock a password-protected area. It’s useful to implement basic tracking or other actions based on the used password.

Hooks & Filter 1

passster_validation_success_list

This is an enhancement to the action above which is specific to the usage of password lists. It provides the password, the list which contains the password, and the post ID of the unlocked post.

Hooks & Filter 2

Filter Hooks

passster_disable_base_encryption

You may want to disable the encryption of passwords for specific reasons. This filter can be used as a toggle to deactivate the encryption within cookies, AJAX validation, and server-side processing.

Hooks & Filter 3

passster_compatibility_actions

This filter provides ways to further customize the protected content. You may have some kind of special shortcode or rendering method that needs to happen before the content gets unlocked. It’s also used internally to provide support for most page builders and other third-party plugins with the Ajax functionality of Passster.

Hooks & Filter 4

passster_password_form

You can overwrite the template that is being used in the frontend with your own. You will find all available templates within /wp-content/plugins/content-protector/src/templates. Copy and paste them into your child theme and use the following code snippet to load your own template instead of the provided one:

Hooks & Filter 5