WordPress.org

Make WordPress Core

Opened 4 years ago

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

Download all attachments as: .zip

Change History (16)

#1 @SergeyBiryukov
4 years ago

  • Focuses template added

#2 @chriscct7
4 years ago

  • Version trunk deleted

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


3 weeks ago

#4 @pyronaur
3 weeks 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
3 weeks ago

  • Keywords needs-refresh added

#6 @noisysocks
3 weeks ago

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

@pbearne
3 weeks ago

refreshed patch and move option to function args

#7 @pbearne
3 weeks 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
3 weeks ago

with filter

#8 @pbearne
3 weeks ago

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

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

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


3 weeks ago

#11 @SergeyBiryukov
3 weeks ago

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

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

@pbearne
2 weeks ago

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

Note: See TracTickets for help on using tickets.