Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We just need to creating the file and load it via config
- Loading branch information
Showing
5 changed files
with
25 additions
and
10 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73e103b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This approach is neat, but it leaves the problem on how to format dates in themes. Currently the
strftime
function is used with a global variable$date_format
. What should be used instead? Format%x
is locale dependent but only numbers which doesn't look too good on a blog.73e103b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bluebirch perhaps we should creating new function eg. format_date and than proceeding all of the things there. With this we will have flexibility:
Old ways
New ways (perhaps):
73e103b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@danpros I support that idea. Currently, both
<?php echo date( 'F d, Y', $p->date ) ?>
and<?php echo strftime( $date_format, $p->date )
are used throughout the themes, with$date_format
defined as a global variable. Aformat_date()
function would make things cleaner.