Make WordPress Core

Opened 15 years ago

Closed 15 years ago

#12427 closed enhancement (invalid)

locating the_time function

Reported by: daniel's profile DaNiel Owned by: nbachiyski's profile nbachiyski
Milestone: Priority: normal
Severity: normal Version:
Component: I18N Keywords: close
Focuses: multisite Cc:

Description

After many years of never translatable the_time function in the default theme, classic, etc, i beg for using at least something like
<?php the_time(('F j, Y','wordpress')); ?>
so we can manipulate this US format in some other usage...

Change History (10)

#1 @DaNiel
15 years ago

sorry, there is a little error: there is no " ; "at the end of the function... ;-)

#2 @scribu
15 years ago

  • Component changed from Date/Time to i18n
  • Milestone Unassigned deleted
  • Resolution set to worksforme
  • Status changed from new to closed

You can set the format from wp-admin/options-general.php Date Format.

Additionally, you have two filters: 'the_time' and 'get_the_time'.

#3 follow-up: @DaNiel
15 years ago

  • Resolution worksforme deleted
  • Status changed from closed to reopened

Changing the admin option never influenced the blogs (on a wpmu install, it only applies on the main blog).

I'm speaking about the defaut & classic theme files. the_time filter has to be handled manually, and that is exactly what i don't want to do at each update. So why it is so complicated to make this filter translatable ?

#4 in reply to: ↑ 3 @scribu
15 years ago

  • Keywords multisite added
  • Milestone set to 3.0
  • Owner set to nbachiyski
  • Status changed from reopened to assigned

Replying to DaNiel:

Changing the admin option never influenced the blogs (on a wpmu install, it only applies on the main blog).

That's something that should be fixed then.

#5 @wpmuguru
15 years ago

Anyone have a solution to suggest?

#6 follow-up: @dd32
15 years ago

Anyone have a solution to suggest?

Do New sites inherit the current options from the main site, or is it a complete static list? IIRC, It uses a static list? Perhaps certain options should be inherited from the main blog upon creation.

#7 in reply to: ↑ 6 @wpmuguru
15 years ago

Replying to dd32:

Do New sites inherit the current options from the main site, or is it a complete static list? IIRC, It uses a static list? Perhaps certain options should be inherited from the main blog upon creation.

Most settings are the same as a newly installed single WP. A few are conditional in populate_options. Also, in the Super Admin -> Options screen there are setting that affect a new site (ex. first post title & content).

#8 @DaNiel
15 years ago

i found some time/date functions translated in wpmu today... but on a singular manner (one i didn't know in fact) and i found it only because i construct my own pot file with poEdit and find some great difféerence with the latest wpmu pot (2.9.2)

strings contain _x or esc_attr_e or esc_attr
This didn't sure resolve the problem, but we have 3 other different manner to declare the time on the template script...

#9 @nacin
15 years ago

  • Keywords close added
  • Milestone 3.0 deleted

I'll be honest, I'm not sure what this ticket is asking for. They are translatable, and they should be in the pot file.

the_time() calls get_the_time() which calls get_post_time() with a $translate argument of true (default false), which then passes that $translate argument to mysql2date(), which then uses date_i18n().

Alternatively, if the_time() is used without any arguments, then it uses the blog setting, which can be localized by the user.

Removing the milestone and suggesting close, pending feedback.

#10 @nbachiyski
15 years ago

  • Resolution set to invalid
  • Status changed from assigned to closed

TwentyTen uses the default date/time formats and we have minimzed the usage of custom formats in other parts of core.

In mutlisite this is the expected behaviour. There is no master option for setting the time/date format of each new blog.

Note: See TracTickets for help on using tickets.