rankmath / seo-by-rank-math

Rank Math is a revolutionary WordPress SEO Plugin that combines the features of many SEO tools and lets you multiply your traffic in the easiest way possible :bulb: :chart_with_upwards_trend: →
https://rankmath.com
107 stars 52 forks source link

Fixed #131: Schema Module: Incompatibility with Molongui Authorship #141

Closed bmos closed 1 year ago

bmos commented 1 year ago

The Guest Author feature of the Molongui Authorship plugin (which allows posts with no user or conventional author defined) caused an error as described in #131. When merged, this [Closes/Fixes #131].

Essentially, because $data['ProfilePage'] exists for guest authors but $data['ProfilePage']['@id'] does not, the error occurs. This is due to the remove_person_entity function only checking for the existence of $data['ProfilePage'], when what really matters is the existence of $data['ProfilePage']['@id']. The easiest solution is thus to add an additional check for $data['ProfilePage']['@id'] if $data['ProfilePage'] is found.

Also, apologies for the duplicate PR, but I didn't realize I was supposed to name the branch fixed-131.