PublishPress-Planner icon indicating copy to clipboard operation
PublishPress-Planner copied to clipboard

Add "type" and "format" param to the "psppno_post meta" shortcode allowing to display formatted values

Open andergmartins opened this issue 3 years ago • 0 comments

A user created an editorial metadata field of type "user". The field works great, but he is trying to display the selected value in the content of notifications. He is trying to use the following shortcode:

[psppno_post meta:_pp_editorial_meta_user_jr-editor]

The field jr-editor is a user field, which stores the user ID. So the notifications display the user ID instead of the user name or other user field. If we add a "format" param for those shortcodes we can make sure the user is able to select what type of information he wants to display.

Initially, we could support the following types:

  • user: this one can accept specific fields for users, like: user.display_name, user.user_email, etc. Maybe in the format param?
  • date: this one could replace the meta-date param), and accept a format param
  • filter: this could accept any filter, so users can create custom filters and use them here to format the output. filter:a_custom_filter

andergmartins avatar Mar 12 '21 01:03 andergmartins