Skip to content

Instantly share code, notes, and snippets.

@stefanledin
Created February 22, 2022 13:18
Embed
What would you like to do?
<?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