{"id":303,"date":"2024-02-17T20:34:57","date_gmt":"2024-02-17T20:34:57","guid":{"rendered":"https:\/\/www.simons.tools\/en\/?p=303"},"modified":"2024-02-17T20:35:14","modified_gmt":"2024-02-17T20:35:14","slug":"","status":"publish","type":"post","link":"https:\/\/www.simons.tools\/de\/wordpress-post-password-in-url\/","title":{"rendered":"Unbenannt","raw":""},"content":{"rendered":"","protected":false,"raw":""},"excerpt":{"rendered":"","protected":false,"raw":""},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_en_post_content":"<!-- wp:codemirror-blocks\/code-block {\"fileName\":\"index.html\",\"mode\":\"htmlmixed\",\"mime\":\"text\/html\"} -->\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>function try_auto_login() {\n\tif (!isset($_GET['pw']))return;\n  global $wp_hasher;\n  if ( empty( $wp_hasher ) ) {\n    require_once( ABSPATH . 'wp-includes\/class-phpass.php' );\n    $wp_hasher = new PasswordHash(8, true);\n  }\n\n  setcookie( 'wp-postpass_' . COOKIEHASH, $wp_hasher-&gt;HashPassword( stripslashes( $_GET['pw'] ) ), 0, COOKIEPATH );\n\n  wp_redirect( &quot;\/&quot; );exit();\n}\nadd_action('template_redirect','try_auto_login');<\/pre><\/div>\n<!-- \/wp:codemirror-blocks\/code-block -->","_en_post_name":"wordpress-post-password-in-url","_en_post_excerpt":"","_en_post_title":"WordPress Post Password in URL","_de_post_content":"","_de_post_name":"","_de_post_excerpt":"","_de_post_title":"","edit_language":"de","footnotes":""},"categories":[12],"tags":[],"class_list":["post-303","post","type-post","status-publish","format-standard","hentry","category-uncategorized","entry"],"_links":{"self":[{"href":"https:\/\/www.simons.tools\/de\/wp-json\/wp\/v2\/posts\/303","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.simons.tools\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.simons.tools\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.simons.tools\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.simons.tools\/de\/wp-json\/wp\/v2\/comments?post=303"}],"version-history":[{"count":1,"href":"https:\/\/www.simons.tools\/de\/wp-json\/wp\/v2\/posts\/303\/revisions"}],"predecessor-version":[{"id":304,"href":"https:\/\/www.simons.tools\/de\/wp-json\/wp\/v2\/posts\/303\/revisions\/304"}],"wp:attachment":[{"href":"https:\/\/www.simons.tools\/de\/wp-json\/wp\/v2\/media?parent=303"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.simons.tools\/de\/wp-json\/wp\/v2\/categories?post=303"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.simons.tools\/de\/wp-json\/wp\/v2\/tags?post=303"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}