[wp-trac] [WordPress Trac] #23206: Cache incrementors for wp_get_archives()
WordPress Trac
noreply at wordpress.org
Sun Feb 25 07:44:35 UTC 2024
#23206: Cache incrementors for wp_get_archives()
------------------------------+---------------------
Reporter: ryan | Owner: ryan
Type: task (blessed) | Status: closed
Priority: normal | Milestone: 3.6
Component: Cache API | Version: 3.5
Severity: normal | Resolution: fixed
Keywords: has-patch commit | Focuses:
------------------------------+---------------------
Comment (by mbalt214):
How about this code?
{{{#!php
add_filter( 'get_archives_link', function( $link_html, $url, $text,
$format, $before, $after ) {
if ( 'custom' == $format ) {
$link_html = "\t<li value=\"". esc_attr( $text ) ."\" data-filter-
value=\".classof". esc_attr( $text ) ."\">$before<a
href='$url'>$text</a>$after</li>\n";
}
return $link_html;
}, 10, 6 );
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/23206#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list