ARCANEDEV / SEO-Helper

:mag: SEO Helper is a package that provides tools and helpers for SEO (Search Engine Optimization).
MIT License
322 stars 49 forks source link

Graph multiple properties with identical names #31

Closed BakuDev closed 6 years ago

BakuDev commented 6 years ago

Description:

It's impossible to add multiple properties to Graph with identical names.

Steps To Reproduce:

$this->seoGraph()->addProperty('locale:alternate', 'en');
$this->seoGraph()->addProperty('locale:alternate', 'ru');

Will output only last one in rendered HTML.

arcanedev-maroc commented 6 years ago

I've implemented two methods to manage the locales:

// For `og:locale` property
$this->seoGraph()->setLocale('fr_FR');

// For `og:locale:alternate` property
$this->seoGraph()->setAlternativeLocales(['fr_FR', 'es_ES']); 
BakuDev commented 6 years ago

Hi there!

Cool! Thank you! Please merge so we can update via composer.

arcanedev-maroc commented 6 years ago

Released: 1.4.1

BakuDev commented 6 years ago

Unfortunately, getting error after update to 1.4.1:

Call to undefined method Arcanedev\SeoHelper\SeoOpenGraph::setLocale() Same for setAlternativeLocales()

arcanedev-maroc commented 6 years ago

My bad 😜: #33

arcanedev-maroc commented 6 years ago

Fixed: v1.4.2