lundi 29 décembre 2014

Update Term Description in Admin Panel


I've replaced the default description with a Rich Editor ( wp_editor ) using the {$taxonomy}_edit_form_fields hook and saving them using the edited_{$taxonomy} hook. Originally, I thought I could use that same hook, check if my editor had content, then use wp_update_term to save it into the actual term description. I ended up running into a infinite loop as it turns out that wp_update_term actually also runs edited_{$taxonomy} and thus calls itself again and again...


What would be a good way to circumvent this problem? Is there a filter the the form update runes that wp_update_term does not?





Aucun commentaire:

Enregistrer un commentaire