brainstormforce / all-in-one-schemaorg-rich-snippets

WordPress Plugin that Boost CTR. Improve SEO & Rankings. Supports most of the content type. Works perfectly with Google, Bing, Yahoo & Facebook.
http://wordpress.org/plugins/all-in-one-schemaorg-rich-snippets/
115 stars 44 forks source link

Location: Street Address is adding one extra div #44

Open metodiew opened 7 years ago

metodiew commented 7 years ago

Hey guys,

We had an issue with one of our websites- when you a street name, you have an opening div https://github.com/brainstormforce/all-in-one-schemaorg-rich-snippets/blob/master/functions.php#L999, but if you don't fill the field, you have an extra closing </div> here https://github.com/brainstormforce/all-in-one-schemaorg-rich-snippets/blob/master/functions.php#L1009

I've fixed the issue, adding the same check if(trim($service_street) != "") for the closing </div> item, even if it doesn't WordPress Coding Standards, which seems to be working fine for the project I'm working on.

Would you check the submitted PR and see if there is anything else that needs to be fixed?

Cheers