soflyy / breakdance-bugs

Bug reports from Breakdance users.
40 stars 6 forks source link

Dynamic Post Date with Custom Format with just U (timestamp) returns nothing #947

Open zuroma999 opened 12 months ago

zuroma999 commented 12 months ago

Steps to reproduce:

  1. Create a template for any post type
  2. Edit in Breakdance
  3. Add a text field and set it to dynamic and Post Date
  4. Once set, edit the Post Date Options
  5. Set the format to Custom and the Custom Format to just: U
  6. View any post on the frontend and see that nothing is in the text field
  7. Edit the page again and set the custom format to something like: d-U (ie day of month - timestamp)
  8. save and view the template and see that on the frontend that it properly inserts the timestamp after the day of the month. But when the custom format is just U by itself, nothing is put in the dynamic element.

I use custom js to convert all fields tagged with a custom class to local dates/times for the user, so I need the dynamic Post Date element to just return the timestamp. Would save me from replacing them all with custom shortcodes.