Title: First plugin coding. Help Me Please :'(
Last modified: August 19, 2016

---

# First plugin coding. Help Me Please :'(

 *  Resolved Anonymous User 1143575
 * (@anonymized-1143575)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/first-plugin-coding-help-me-please/)
 * Hi all 🙂
 * I have to create a plugin for my work and I’m already lose with all these hooks/
   functions and little thing that provide Plugin API 🙁
 * For the moment I have to add some input in the Manage > Category menu so that
   I will able to add keywords under “Description”.
 * I don’t really know if you can understand me (frenchie sux xD) so I made a screenshot
   of what I want:
    [http://img91.imageshack.us/img91/7941/whereit6.jpg](http://img91.imageshack.us/img91/7941/whereit6.jpg)
 * So I have to add 2 input here so that when someone create or modify category 
   he can add keywords.
 * I’ve tried to add one of those hooks:
 *     ```
       add_action('create_category', 'my_func');
       add_action('add_category', 'my_func');
       ```
   
 * and then in the my_func() function to “echo” something but it looks like it doesn’t
   work 🙁
 * Can someone help me please?

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [17 years, 8 months ago](https://wordpress.org/support/topic/first-plugin-coding-help-me-please/#post-866948)
 * Try using the “edit_link_category_form” hook instead.
 *  Thread Starter Anonymous User 1143575
 * (@anonymized-1143575)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/first-plugin-coding-help-me-please/#post-866954)
 * But actually where do you find it? There’s nothing about that in the documentation(
   [http://wordpress.org/search/edit_link_category_form](http://wordpress.org/search/edit_link_category_form))
 * Hum, it seems like there’s a ‘edit_category_form’ but damn, I can’t understand
   such a thing -_-‘
 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [17 years, 8 months ago](https://wordpress.org/support/topic/first-plugin-coding-help-me-please/#post-866955)
 * 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)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/first-plugin-coding-help-me-please/#post-866957)
 * 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)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/first-plugin-coding-help-me-please/#post-866959)
 * Ok, actually it looks like it works: [http://img140.imageshack.us/img140/7838/thankyouag6.jpg](http://img140.imageshack.us/img140/7838/thankyouag6.jpg)
   😛
 * Thanks man, cya for another question ^^
 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [17 years, 8 months ago](https://wordpress.org/support/topic/first-plugin-coding-help-me-please/#post-866963)
 * > _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)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/first-plugin-coding-help-me-please/#post-867200)
 * 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](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?
 *  [4thfloor](https://wordpress.org/support/users/4thfloor/)
 * (@4thfloor)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/first-plugin-coding-help-me-please/#post-867390)
 * 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.
   >_<

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘First plugin coding. Help Me Please :'(’ is closed to new replies.

## Tags

 * [admin](https://wordpress.org/support/topic-tag/admin/)
 * [api](https://wordpress.org/support/topic-tag/api/)
 * [category](https://wordpress.org/support/topic-tag/category/)

 * 8 replies
 * 3 participants
 * Last reply from: [4thfloor](https://wordpress.org/support/users/4thfloor/)
 * Last activity: [16 years, 9 months ago](https://wordpress.org/support/topic/first-plugin-coding-help-me-please/#post-867390)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
