aioseo_local_business_address_tags

Purpose

This filter can be used to add or remove address format tags.

Arguments (1)

  1. $tags (array) – An array of tags.

Example code snippet

The code snippet below is just an example of how this filter can be used. In the example below we’ll remove the ‘streetLineTwo’ tag.

add_filter( 'aioseo_local_business_output_business_info_location_data', add_filter( 'aioseo_local_business_address_tags', 'aioseo_change_local_business_address_tags' );

function aioseo_change_local_business_address_tags( $tags ) {
	foreach ( $tags as $key => $tag ) {
		if ( 'streetLineTwo' === $tag['id'] ) {
			unset( $tags[ $key ] );
		}
	}

	return $tags;
}