Time (wp-time) - WordPress Plugin

JavaScript tool for conditionally displaying an element depending on time.

Example:

Show current time

[wp-time format="h:MM:ss"]
<span data-time="h:MM:ss"></span>

Detail documentation for Date/Time format at https://github.com/felixge/node-dateformat

Conditional display

[wp-time-on on="0/10 * * * * *" off="5/10 * * * * *"]

Show on each 0s (0s 10s 20s...) and Hide on each 5s (5s 15s 25s...) 
<span data-on-time='{"on":"0/10 * * * * *","off":"5/10 * * * * *"}'>Show 0-5s</span>
 <span data-on-time='{"on":"0/10 * * * *","off":"5/10 * * * *"}'>Show 0-5m</span>
 <span data-on-time='{"on":"5/10 * * * *","off":"10/10 * * * *"}'>Show 5-10m</span>

Detail documentation for Cron Expression at https://github.com/harrisiirak/cron-parser#readme

Compose / Test Crom Expression at https://crontab.guru/

Update dependencies

npm install

Compile JS

pnpm run build

Create plugin archive

./compress.sh