You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Comment by funkjedi Tuesday Mar 10, 2015 at 06:04 GMT
There are two specific use cases both relating to adding and removing custom fields on the fly.
1) ACF keeps a set of dummy fields which are cloned in JS when a user adds a new row of repeatable fields. The problem is that when on post.php or post-new.php all textareas with the .wp-editor-area class automatically have content hooks added to them. This means the hidden dummy fields now have content hooks. When these fields are cloned to make the new set of fields it copies the modifications made by the content hooks. Which prevents us from adding content hooks to the new fields.
2) If the user removes a set of repeatable fields the content hooks need to be removed. Otherwise when the form is submitted the mlContentField fields will still contain the deleted fields. Resulting in the data not actually being deleted.
Issue by funkjedi
Thursday Mar 05, 2015 at 18:21 GMT
Originally opened as qTranslate-Team/qtranslate-x#69
Adding method that will remove a content hook and restore the field back to its initial state.
funkjedi included the following code: https://github.com/qTranslate-Team/qtranslate-x/pull/69/commits
The text was updated successfully, but these errors were encountered: