Try using the “edit_link_category_form” hook instead.
Thread Starter
Anonymous User 1143575
(@anonymized-1143575)
But actually where do you find it? There’s nothing about that in the documentation (http://ww.wp.xz.cn/search/edit_link_category_form)
Hum, it seems like there’s a ‘edit_category_form’ but damn, I can’t understand such a thing -_-‘
The documentation is not complete, so I found it by looking at the actual WordPress code.
At the bottom of edit-link-category-form.php is where it makes the call to the ‘edit_link_category_form’ action.
Edit: Whoops, I was looking at Link Categories. My bad. You are correct, use the ‘edit_category_form’ action hook.
Thread Starter
Anonymous User 1143575
(@anonymized-1143575)
Does it meen that when there is something like this in core’s code:
<?php do_action('edit_link_category_form', $category); ?>
‘edit_link_category_form’ is a action hook :/ ?
Thread Starter
Anonymous User 1143575
(@anonymized-1143575)
Ok, actually it looks like it works: http://img140.imageshack.us/img140/7838/thankyouag6.jpg π
Thanks man, cya for another question ^^
Does it meen that when there is something like this in core’s code:
<?php do_action(‘edit_link_category_form’, $category); ?>
‘edit_link_category_form’ is a action hook :/ ?
Yes, that’s exactly what it means.
Thread Starter
Anonymous User 1143575
(@anonymized-1143575)
Hey, back again with another question ^^
I finally created my 2 new inputs in the Category Form and I can see them under the submit button ( http://img201.imageshack.us/img201/390/inputproblemml0.jpg ). But actually where does the 2 new datas go when the User will submit?
According to the core code:
<p class="submit"><input type="submit" name="submit" value="<?php echo $submit_text ?>" />
<?php do_action('edit_category_form', $category); ?>
</form>
My 2 new data are a part of the form so they will be treated in the “categories.php”. But because it’s not a part of the default settings there is nothing about them in the categories.php file :/ Where can I catch them?
I think I can create a new form with the help of Javascript and flip the hook so the final code will look like that:
<p class="submit"><input type="submit" name="submit" value="<?php echo $submit_text ?>" />
<!-- Here was the hook but It will be placed under thanks to JS -->
</form>
<form name="my_form" id="my_form_cat" method="post" action="my_plugin.php">
</form>
And then I will be able to play with my form, but what about if User disable JS :S ? Is it a good solution?
Actually I think you can use edit_category_form_fields to do as you are suggesting as opposed to edit_category_form.
I really wish that there was more documentation on this though as I’ve been trying to add fields to the category form for each category but it’s tough to find any info on it.
I unfortunately have NO IDEA how to submit those form fields to the database. >_<