-
-
Save stefanledin/f4586d3af4c1e0a9fe8da0bb3ee8214a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'the_password_form', function( $output ) { | |
$input = '<input type="hidden" name="_wp_http_referer" value="'.get_permalink().'"></form>'; | |
$output = str_replace( '</form>', $input, $output ); | |
return $output; | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment