{"id":1587261,"date":"2010-07-17T14:55:55","date_gmt":"2010-07-17T14:55:55","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/delete-post-link\/"},"modified":"2016-08-19T18:43:43","modified_gmt":"2016-08-19T18:43:43","slug":"delete-post-link","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/delete-post-link\/","title":{"rendered":"Delete Post Link"},"content":{"rendered":"<p>This function which adds a Delete link to the admin should work but it doesn&#8217;t.<\/p>\n<pre><code>function delete_post_link()\n{\n\tglobal $post;\n\techo &quot;&lt;a href=&#039;&quot; . wp_nonce_url( get_bloginfo(&#039;url&#039;) . &quot;\/wp-admin\/post.php?post%3D&quot; . $post-&gt;ID . &quot;&amp;action%3Ddelete&amp;&quot;, &#039;delete-post_&#039; . $post-&gt;ID) . &quot;&#039;&gt;Delete&lt;\/a&gt;&quot;;\n}<\/code><\/pre>\n<p>I get this:<br \/>\nAre you sure you want to do this?<br \/>\nPlease try again.<\/p>\n<p>I think it has to do with wp_nonce_url. Any ideas?<\/p>\n<p>Thanks.<\/p>\n","protected":false},"template":"","class_list":["post-1587261","topic","type-topic","status-closed","hentry","topic-tag-delete","topic-tag-link","topic-tag-post","topic-tag-wp_nonce_url"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/1587261","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/1587261\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=1587261"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}