Skip to content

Instantly share code, notes, and snippets.

@aristath
Forked from charlieussery/gist:6037323
Last active December 19, 2015 23:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aristath/6037489 to your computer and use it in GitHub Desktop.
Save aristath/6037489 to your computer and use it in GitHub Desktop.
$label = 'pwbox-' . rand();
return '<form action="' . admin_url('admin-ajax.php') . '" method="post"><input type="hidden" name="action" value="psc-set" />
<p>' . __("This content is password protected. To view it please email us here: <a href="mailto:charlie@example.com">charlie@example.com</a> and we'll email you the password", 'psc') . '</p>
<p><label for="' . $label . '">' . __("Password:", 'psc') . ' <input name="post_password" id="' . $label . '" type="password" size="20" /></label> <input type="submit" name="Submit" value="' . esc_attr__("Submit", 'psc') . '" /></p>
</form>
';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment