Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Taxonomy menu seems suboptimal: taxonomy_menu($may_cache)
First:
else {
if (is_numeric(arg(3))) {
Why not just an elseif() ?
Second:
if (is_numeric(arg(3))) {
Will hit in for ALL urls with a number on place 3, seems rather nasty to me. Why not check for more?
Comment | File | Size | Author |
---|---|---|---|
#1 | taxonomy_menu_more_precise | 541 bytes | chx |
Comments
Comment #1
chx CreditAttribution: chx commentedComment #2
Bèr Kessels CreditAttribution: Bèr Kessels commentedTested, but not benchmarked.
This should speed up things a little though.
But a -1 on this one, there is still an else and an if inside that, instead of an elseif
Bèr
Comment #3
drummCommitted to HEAD.
Comment #4
(not verified) CreditAttribution: commented