protected function get_term_value( $term ) {
		$meta_key = $this->get_setting( 'meta_key' );

		if ( is_numeric( $term ) ) {
			$term_id = $term;
		} else {
			$term = get_term( $term );

			if ( $term instanceof WP_Term === false ) {
				return 0;
			}

			$term_id = $term->term_id;
		}

		if ( ! empty( $meta_key ) ) {
			$value = get_term_meta( $term_id, $meta_key, true );
		} else {
			$value = $term_id;
		}

		return $value;
	}
protected function get_term_value( $term ) {
		$meta_key = $this->get_setting( 'meta_key' );

		if ( is_numeric( $term ) ) {
			$term_id = $term;
		} else {
			$term = get_term( $term );

			if ( $term instanceof WP_Term === false ) {
				return 0;
			}

			$term_id = $term->term_id;
		}

		if ( ! empty( $meta_key ) ) {
			$value = get_term_meta( $term_id, $meta_key, true );
		} else {
			$value = $term_id;
		}

		return $value;
	}
protected function get_term_value ( $ term ) { $ meta_key = $ this -> get_setting ( 'meta_key' ) ; if ( is_numeric ( $ term ) ) { $ term_id = $ term ; } else { $ term = get_term ( $ term ) ; if ( $ term instanceof WP_Term === false ) { return 0 ; } $ term_id = $ term -> term_id ; } if ( ! empty ( $ meta_key ) ) { $ value = get_term_meta ( $ term_id , $ meta_key , true ) ; } else { $ value = $ term_id ; } return $ value ; }
Get matching value based on key from a term.

@param  mixed $term

@return mixed
Get matching value based on key from a term .