WordPress.org

Ready to get started?Download WordPress

Forums

[closed] New media modal and and add_fields_to_edit with HTML fields (4 posts)

  1. pepe
    Member
    Posted 1 year ago #

    Is there a new and approved way to add JS snippets to extra edit fields in the new media modal?

    I'm trying to fix a plugin that adds JS code in the 'html'-key of a $form_field and this variant is silently dropped by get_compat_media_markup(). So far, I haven't been able to find any documentation on extending the new modal.

  2. pepe
    Member
    Posted 1 year ago #

    After further analysis, the 'html' is handled fine, but something somewhere down the line filters out all <script> tags. At least until wp_prepare_attachment_for_js everything is fine and it's not the json_encode either. I'm really stumped.

  3. Scott Bressler
    Member
    Posted 10 months ago #

    Did you figure this one out?

  4. esmi
    Forum Moderator
    Posted 10 months ago #

    @Scott Bressler: As per the Forum Welcome, please post your own topic. This is an 8 month old topic that references an old copy of WordPress.

Topic Closed

This topic has been closed to new replies.

About this Topic