Make WordPress Core

Opened 11 years ago

Last modified 6 years ago

#36244 assigned enhancement

added a filter to allow the separator in the week date range to be changed

Reported by: pbearne Owned by: pbearne
Priority: normal Milestone: Future Release
Component: Themes Version:
Severity: normal Keywords: has-patch needs-dev-note needs-docs
Cc: Focuses: template

Description

added a new filter 'getarchives_week_separator' in wp_get_archives() to allow the separator used in the weekly archive text to changed

Attachments (4)

general-template_new_fliter.php.patch​ (787 bytes ) - added by pbearne 11 years ago.
36244.patch​ (7.0 KB ) - added by pbearne 7 years ago.
refreshed patch and move option to function args
36244-with-filter.patch​ (7.2 KB ) - added by pbearne 7 years ago.
with filter
36244-allout-patch.patch​ (7.4 KB ) - added by pbearne 7 years ago.
this patch adds translation support to string for right to left support

Download all attachments as: .zip

Change History (17)

#1 @SergeyBiryukov
11 years ago

  • Focuses template added

#2 @chriscct7
11 years ago

  • Version trunk

This ticket was mentioned in ​Slack in #core by noisysocks. ​View the logs.


7 years ago

#4 @pyronaur
7 years ago

  • Component General → Themes

Hi @pbearne !

This came up in the #core triage today - thanks for opening the ticket and working on it!

To avoid filter clutter - perhaps it would be better to allow customization of the separator through the arguments variable instead?

Moving this to Themes as it seems more related to theming.

#5 @pyronaur
7 years ago

  • Keywords needs-refresh added

#6 @noisysocks
7 years ago

  • Owner set to pbearne
  • Status new → assigned

@pbearne
7 years ago

refreshed patch and move option to function args

#7 @pbearne
7 years ago

I like having a filter for this so that a Theme can set it globally

so am adding a second patch with a filter as well

@pbearne
7 years ago

with filter

#8 @pbearne
7 years ago

  • Keywords has-patch needs-dev-note needs-docs added; needs-refresh removed

#9 @pbearne
7 years ago

I am going to ask the polygots if this should be translated and if the string should be swapped for the right to left langs

Last edited 7 years ago by pbearne (previous) (diff)

This ticket was mentioned in ​Slack in #polyglots by pbearne. ​View the logs.


7 years ago

#11 @SergeyBiryukov
7 years ago

Thanks for the patch! What would be a use case for changing this separator?

#12 @pbearne
7 years ago

I can't remember the actual use-case that caused me to create the patch but I think it was for a CPT archive for something like events where the client what to use the words "from to" I think did it via JS in the end !!!

Last edited 7 years ago by pbearne (previous) (diff)

@pbearne
7 years ago

this patch adds translation support to string for right to left support

#13 @desrosj
6 years ago

  • Milestone → Future Release
Note: See TracTickets for help on using tickets.