WordPress.org

Make WordPress Core

Ticket #45163: get_term_by_ID.patch

File get_term_by_ID.patch, 650 bytes (added by emrikol, 3 years ago)

Patch against trunk for get_term_by

  • wp-includes/taxonomy.php

     
    919919 *                             or `$term` was not found.
    920920 */
    921921function get_term_by( $field, $value, $taxonomy = '', $output = OBJECT, $filter = 'raw' ) {
     922       // 'ID' is an alias of 'id'.
     923       if ( 'ID' === $field ) {
     924               $field = 'id';
     925       }
    922926
    923927       // 'term_taxonomy_id' lookups don't require taxonomy checks.
    924928       if ( 'term_taxonomy_id' !== $field && ! taxonomy_exists( $taxonomy ) ) {