post_name ); $id = absint( $post -> ID ); $unique = $slug . $id; // Build the form label. $label = __( 'To view this protected post, enter the password below:', 'anchorage' ); // Build the url to which the form submits. $url = esc_url( site_url( 'wp-login.php?action=postpass', 'login_post' ) ); // The form submit text. $submit = esc_attr__( 'Submit', 'anchorage' ); $out = "
"; /** * This function will get hit with whatever filters hit the_content, to include wpautop, * so let's strip any line breaks to avoid unwantedtags. */ $out = trim( preg_replace( '/\s+/', ' ', $out ) ); return $out; } } add_filter( 'the_password_form', 'anchorage_get_post_password_form' ); /** * The cancel-reply-link is clutter. * * @since anchorage 1.0 */ add_filter( 'cancel_comment_reply_link', '__return_false' );