Remove HTML from Cutsom Field when creating automatic maps

Home Forums MapPress Support Remove HTML from Cutsom Field when creating automatic maps

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #15934
    besserdich
    Participant

    Hi There,

    is there a way to remove html tags (like php strip_tags) from the custom fields that are used to create automatic maps?

    thank you!

    #15936
    Chris
    Keymaster

    Hi

    No, the plugin uses the custom fields as they were saved. I looked through the WP code and there aren’t any actions or filters to use when reading custom field data.

    One solution might be to use these hooks to strip the tags when the custom fields are saved, or you could use them to save the stripped data to a new field:

    add_{$meta_type}_meta
    update_{$meta_type}_meta

    There is some more info here and in the WordPRess codex:
    https://developer.wordpress.org/reference/hooks/add_meta_type_meta/

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.