data->ID ); $cars_total = ( class_exists( \MotorsVehiclesListing\User\UserListingsController::class ) ) ? \MotorsVehiclesListing\User\UserListingsController::get_listings_count( $user->ID ) : 0; $my_fav = get_the_author_meta( 'stm_user_favourites', $user->ID ); if ( ! empty( $my_fav ) ) { $my_fav = count( array_filter( explode( ',', $my_fav ) ) ); } else { $my_fav = 0; } ?>