WordPress.org

Support

Support » Plugins and Hacks » MMWW » [Resolved] {iptc:} templates are printed if the field does not exist

[Resolved] {iptc:} templates are printed if the field does not exist

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author OllieJones

    @olliejones

    You can use parentheses to get this plugin to replace metadata tags with empty strings.

    It works like this:

    Suppose you wish to display the IPTC rights usage terms in the item description, if there are any. You put this string into the image description field on the Settings > Media Metadata panel.

    (Terms of use: {iptc:rightsusageterms} )

    If the “iptc:rightsusageterms” metadata item is in the file, you’ll get something like this:

    Terms of use: Evaluation Only

    But, if that metadata item is absent, you’ll get nothing.

    Notice that it’s helpful to precede each ) with a space so when you have multiple optional items they’re separated by spaces.

    Thanks. It appears I completely misunderstood the syntax.

    Plugin Author OllieJones

    @olliejones

    It’s not the easiest syntax to understand. Thanks for using my plugin!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] {iptc:} templates are printed if the field does not exist’ is closed to new replies.
Skip to toolbar