https://github.com/webdeveric/date-format-shortcode
https://github.com/webdeveric/date-format-shortcode
date-format shortcode wordpress
Last synced: 18 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/webdeveric/date-format-shortcode
- Owner: webdeveric
- Created: 2016-04-03T20:01:06.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-04-18T04:08:12.000Z (about 10 years ago)
- Last Synced: 2025-03-01T18:15:39.769Z (over 1 year ago)
- Topics: date-format, shortcode, wordpress
- Language: PHP
- Size: 1000 Bytes
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Date Format Shortcode
This plugin provides a shortcode that allows you to format a timestamp.
## Shortcode Attributes
### format
See [date](php.net/manual/en/function.date.php) for possible values.
This defaults to the date and time format defined on the general settings page in wp-admin.
### timestamp
This is a Unix timestamp or any string that can be parsed by [strtotime](http://php.net/strtotime).
This defaults to the current time.
## Example usage
**Now**
```
[date-format]
```
**Tomorrow**
```
[date-format timestamp="+1 day"]
```
**Values returned from other shortcodes**
```
[date-format format="F j, Y"][post-content id="123" autop="false" shortcode="false" field="post_date"][/date-format]
```