WordPress.org

Make WordPress Core

Changeset 44325


Ignore:
Timestamp:
12/19/2018 03:47:59 AM (8 months ago)
Author:
boonebgorges
Message:

Ensure that taxonomy name passed to get_term() filters is non-empty.

Since [34997], the $taxonomy parameter of get_term() has been
optional. This created cases where the $taxonomy parameter, used
to concatenate names for some filters and passed as a parameter to
others, would be empty. This changeset ensures that it's never
empty by falling back on the taxonomy of the located term.

Props dlh.
Fixes #45698.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/taxonomy.php

    r44321 r44325  
    841841    }
    842842
     843    // Ensure for filters that this is not empty.
     844    $taxonomy = $_term->taxonomy;
     845
    843846    /**
    844847     * Filters a taxonomy term object.
Note: See TracChangeset for help on using the changeset viewer.