Function Reference: geodir_cpt_loc_term_count

Summary

Filter the terms count by location.

Parameters

$terms_count
(array) (required) Array of term count row.

Default: None
$terms
(array) (required) Array of terms.

Default: None

Return Values

(array)
  • Array of term count row.

Change Log

Since: 1.1.6

Source File

geodir_cpt_loc_term_count() is located in geodir_custom_posts/geodir_cp_functions.php [Line: 1474]

Source Code

function geodir_cpt_loc_term_count( $terms_count, $terms ) {
	if ( !empty( $terms_count ) ) {
		foreach ( $terms as $term ) {
			if ( isset( $term->taxonomy ) && geodir_cpt_no_location( $term->taxonomy, true ) ) {
				$terms_count[$term->term_id] = $term->count;
			}
		}
	}
	return $terms_count;
}