-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[last_modified] not in <time> format #2
Comments
well, to stay as compatible as possible i added a new shortcode and tested changed works fine for me. |
Perhaps a good middle ground would be to include the standard YYYY-MM-DD format inside the <time datetime="2015-04-21">21 April 2014</time> |
w3c validator accepts it and pubdate is not used anymore. So I think yours is the best solution for a footer. I do it like this looking at http://html5doctor.com/time-and-data-element/ maybe this would be nice for google and co: |
I've updated the code to use the first format. I'm not entirely sure about using the second method; it looks more suited to a local article footer such as the area where categories, tags, published date, etc are displayed, not a global footer area which could be virtually anywhere. |
[last_modified] output is not html standard
is: 11/04/2015
should: 2015-04-11
see https://html.spec.whatwg.org/multipage/infrastructure.html#valid-date-string
function shortcode_last_modified() {
return the_modified_date( 'd/m/Y', '', '', false );
return the_modified_date( 'Y-m-d', '', '', false );
It would be also nice to have a shortcode to get the date using the WP date format as set in settings.
The text was updated successfully, but these errors were encountered: