Skip to content

Commit

Permalink
QTS: delete unused function raising warning in PHP8.1 (#1103)
Browse files Browse the repository at this point in the history
  • Loading branch information
herrvigg committed Feb 17, 2022
1 parent 153b271 commit daefb9b
Showing 1 changed file with 1 addition and 24 deletions.
25 changes: 1 addition & 24 deletions modules/slugs/includes/termmeta-core.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ function delete_term_meta_by_key( $term_meta_key ) {
*
* @return array
*/
if ( ! function_exists( 'add_term_meta' ) ):
if ( ! function_exists( 'get_term_custom' ) ):
function get_term_custom( $term_id ) {
$term_id = (int) $term_id;

Expand Down Expand Up @@ -204,26 +204,3 @@ function get_term_custom_keys( $term_id ) {
}
}
endif;

/**
* Retrieve values for a custom term field.
*
* The parameters must not be considered optional. All of the term meta fields
* will be retrieved and only the meta field key values returned.
*
* @param string $key Meta field key.
* @param int $term_id Term ID
*
* @return array Meta field values.
*/
if ( ! function_exists( 'get_term_custom_values' ) ):
function get_term_custom_values( $key = '', $term_id ) {
if ( ! $key ) {
return null;
}

$custom = get_term_custom( $term_id );

return isset( $custom[ $key ] ) ? $custom[ $key ] : null;
}
endif;

0 comments on commit daefb9b

Please sign in to comment.