Make WordPress Core

Opened 8 years ago

Last modified 4 years ago

#36244 assigned enhancement

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

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

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 8 years ago.
36244.patch (7.0 KB) - added by pbearne 4 years ago.
refreshed patch and move option to function args
36244-with-filter.patch (7.2 KB) - added by pbearne 4 years ago.
with filter
36244-allout-patch.patch (7.4 KB) - added by pbearne 4 years ago.
this patch adds translation support to string for right to left support

Download all attachments as: .zip

Change History (17)

#1 @SergeyBiryukov
8 years ago

  • Focuses template added

#2 @chriscct7
8 years ago

  • Version trunk deleted

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


4 years ago

#4 @pyronaur
4 years ago

  • Component changed from General to 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
4 years ago

  • Keywords needs-refresh added

#6 @noisysocks
4 years ago

  • Owner set to pbearne
  • Status changed from new to assigned

@pbearne
4 years ago

refreshed patch and move option to function args

#7 @pbearne
4 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
4 years ago

with filter

#8 @pbearne
4 years ago

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

#9 @pbearne
4 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 4 years ago by pbearne (previous) (diff)

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


4 years ago

#11 @SergeyBiryukov
4 years ago

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

#12 @pbearne
4 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 4 years ago by pbearne (previous) (diff)

@pbearne
4 years ago

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

#13 @desrosj
4 years ago

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