From 055a8a215fa83cd334d71120c1bd049672cea531 Mon Sep 17 00:00:00 2001 From: woodandgold Date: Sun, 4 Mar 2012 21:22:01 +0100 Subject: [PATCH 1/2] updated wpuf_edit_attachment() so it's wrapped in a form to get rid of nonce error. --- wpuf-functions.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/wpuf-functions.php b/wpuf-functions.php index 3c4a1a55a..e16163962 100755 --- a/wpuf-functions.php +++ b/wpuf-functions.php @@ -302,12 +302,19 @@ function wpuf_edit_attachment( $post_id ) { if ( $attach ) { $count = 1; foreach ($attach as $a) { - $param = "?pid={$post_id}&attach_id={$a['id']}&action=del"; - $text .= 'Attachment ' . $count . ': ' . $a['title'] . ''; - $text .= ' - Delete
'; + + echo 'Attachment ' . $count . ': ' . $a['title'] . ''; + echo "
"; + echo ""; + echo ""; + wp_nonce_field( 'wpuf_attach_del'); + echo ''; + echo "
"; + echo "
"; $count++; + } - echo $text; + } } From a2dff3dcc95d01ab4c94f8a81ca8caa5b6189050 Mon Sep 17 00:00:00 2001 From: woodandgold Date: Sun, 4 Mar 2012 21:24:56 +0100 Subject: [PATCH 2/2] moved wpuf_edit_attachment() to get rid of nonce error --- wpuf-edit-post.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wpuf-edit-post.php b/wpuf-edit-post.php index a4b718349..8085f303a 100755 --- a/wpuf-edit-post.php +++ b/wpuf-edit-post.php @@ -133,7 +133,7 @@ function wpuf_edit_show_form( $post ) { - ID ); ?> + ID ); ?> @@ -145,6 +145,10 @@ function wpuf_edit_show_form( $post ) { +
+ ID ); ?> +
+