• Hello.

    I have been working alot with two plugins that relate to and affect categories in WordPress. However these plugins did not play nice with eachother at first and I decided to find out why.

    After alot of code reading I found that the reason they weren’t working well together is because the edit_category_form-hook occurs AFTER the submit button for the edit/add category-forms and they both want to be BEFORE the submit button of course.

    I’ve hacked the plugins so that they work together now but I still think the placement of the hook is wrong. Anyone who wants to add a form field to the category form will most likely want to add it before the submit button, not after. Having to resort to either javascript or other hacks just to get your form field in the right place isn’t very good.

    All that needs to be done is to move the hook to before the table is closed in edit-category-form.php and moving it up above the p-tag with the class submit in categories.php.

    If there’s a special reason that the hook must be placed after the submit button there should be another hook for those who want to add form fields to the category forms.

    Kindly, Marcus.

Viewing 4 replies - 1 through 4 (of 4 total)
  • 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.

    Mark

    (@codeispoetry)

    Yep, I can confirm that edit_category_form_fields places the stuff before the submit button.

    agree

    Hi,

    edit_category_form_fields is only used in the edit-category-form.php file.

    The form that adds a category on the main categories page does not make any reference to edit_category_form_fields and just like the edit-category-form file, the edit_category_form action is after the submit button

    Is there any reason why there could not be an add_category_form_fields action added in the future? Or at least just call the edit_category_form_fields in categories.php.

    Would be nice anyway

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Please move the edit_category_form hook’ is closed to new replies.