wp_handle_upload => "wrong form input" ("Fehlerhafte Formulareingabe")
-
Hey there,
this is an cross-post i think, to the german forums (http://forum.wordpress-deutschland.org/design/82796-wp_handle_upload-fehlerhafte-formulareingabe.html) where I was searching for an resolution.It don’t look like there’s anyone who can help me.
What I would like to do: upload Images to each category.
What I would not to do: use an plugin.I’d set up my first WordPress-Theme (http://www.oliverlippert.eu) and this is really minimalistic, for me to minimalistic. There should be some images instead of the category names. So I would like to add an “Image” field to the “Edit Category”-Form in WordPress through my design.
actually i got:
define('myCatImages', 'category_image_option'); function set_category_image($tag){ $catImage = get_option(myCatImages); if(isset($catImage)) print_r($catImage[$tag->term_id]['Image']); ?> <label for="Datei">Bild</label>: <input id="Datei" name="Datei" type="file" size="50" accept="image/*"> <?php } function update_category_image($term_id){ if($_POST['taxonomy'] == 'category'){ $catImage = get_option(myCatImages); include_once(ABSPATH . 'wp-admin/includes/file.php'); $target = wp_handle_upload($_FILES['Datei']); $catImage[$term_id]['Image'] = $target; update_option(myCatImages, $catImage); } } if ( function_exists('add_filter') ){ add_filter('edit_category_form', 'set_category_image'); add_filter('edited_terms', 'update_category_image'); }So but if I upload an picture, reopen the “category edit form” again, there is the german message “Fehlerhafte Formulareingabe” what simply means “wrong form input”…
I’d searched the web, nothing found. Everyone can work with the code like this above…What did i do wrong?
-
Hi there!
This this forum is for WordPress.com blogs only I am sorry to tell you that you’re in the wrong forum you will need to head over to WordPress.ORG for support because answers given within the WP.COM forums is tailored for the WP.com multi user platform….
Please consider reading the following.
-
Hey There,
iam rally sorry, please wait with closing this thread down, i move the post to the linked forum. so in 1hour you can close this thread.
- The topic ‘wp_handle_upload => "wrong form input" ("Fehlerhafte Formulareingabe")’ is closed to new replies.