@mosabua,
The <%= description =%>
field in info-window.html
is actually pulled from the excerpt. When there is no excerpt defined, it will pull from the content. Since the address is added to the content via the single.php
file, the output is actually controlled by the $address->render()
code in that template.
I was just looking at the render()
method in the Stellar_Places_Postal_Address
and realized that the stellar_places_postal_address_html
filter doesn’t necessarily provide access to everything you would need to properly filter the output for your use case.
One approach would be to copy the code in the get_html()
method from the Stellar_Places_Postal_Address
class into your single.php
template, reorder things as needed and then output the result.
If you are going to be working with a heterogenous collection of international addresses, then you may just want to replace $address->render()
with this:
echo esc_html( get_post_meta( get_the_ID(), '_stlr_places_formatted_address', true ) );
It looks like I need to think about a better way to handle international addresses. Perhaps a filter that would allow you to update the output based on the country would be appropriate.