| 543 | | return _get_custom_object_labels( $tax, $nohier_vs_hier_defaults ); |
| | 543 | $labels = _get_custom_object_labels( $tax, $nohier_vs_hier_defaults ); |
| | 544 | |
| | 545 | $taxonomy = $tax->name; |
| | 546 | |
| | 547 | $default_labels = clone $labels; |
| | 548 | |
| | 549 | /** |
| | 550 | * Filter the labels of a specific taxonomy. |
| | 551 | * |
| | 552 | * The dynamic portion of the hook name, `$taxonomy`, refers to |
| | 553 | * the taxonomy slug. |
| | 554 | * |
| | 555 | * @since 4.4.0 |
| | 556 | * |
| | 557 | * @see get_taxonomy_labels() for the full list of labels. |
| | 558 | * |
| | 559 | * @param object $labels Object with labels for the taxonomy as member variables. |
| | 560 | */ |
| | 561 | $labels = apply_filters( "taxonomy_labels_{$taxonomy}", $labels ); |
| | 562 | |
| | 563 | // Ensure that the filtered labels contain all required default values. |
| | 564 | $labels = (object) array_merge( (array) $default_labels, (array) $labels ); |
| | 565 | |
| | 566 | return $labels; |