Notice: There is no legacy documentation available for this item, so you are seeing the current documentation.
Purpose
This filter can be used to change the location information.
Arguments (1)
- $information (object) – The location information.
- $postId (int) – The location ID.
Example code snippet
The code snippet below is just an example of how this filter can be used. In the example below we add ‘LLC’ to the business name for a specific location.
add_filter( 'aioseo_local_business_get_location', 'aioseo_change_local_business_get_location', 10, 2 );
function aioseo_change_local_business_get_location( $information, $postId ) {
if ( 19 === $postId ) {
$information->locations->business->name .= ' LLC';
}
return $information;
}