I'm using custom fields as captions. That works well, thanks to #1290208: Custom captions using placeholder tokens.

However, when the field is empty, the token itself shows up as the caption. I'd rather have no caption at all in that case. That can easily be fixed with the following patch.

CommentFileSizeAuthor
colorbox-clear-tokens.patch703 bytesdavid lesieur

Comments

frjo’s picture

Category: bug » feature
frjo’s picture

Status: Needs review » Fixed

Committed to 7-dev, thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

aasarava’s picture

Status: Closed (fixed) » Needs work

Sorry to reopen, but it doesn't work in the dev version. The 'clear' option can't be combined into the array for the second parameter. It has to be in the options array, which is the third parameter to the token_replace() function.

frjo’s picture

Status: Needs work » Fixed

Thanks for noticing this bug! I believe I have fixed it in 7-dev now.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.