Closed bmarwell closed 8 years ago
I say let make a list of variables at top of the plugin. Start with a hardcoded default logo and later will pull important variable values from plugin options. I can help with a basic options admin page, it can be styled at a later stage. Still my coding quality will require improvements but I can save you some time.
Options 2, 3 or 4 will still require admin interface to select from media library or upload a custom file somwhere because as in my case I had to tune my usual logo to fit Google requirements then upload it. I think is too complicated to ask website admins to manually upload specific files via ftp.
Then maybe someone else comes with a better view of solving this issue
:+1:
About option 2/3/4: They have fixed paths, they must be in the (sub-)domain's root folder, so we actually don't need the media library interface here. Let's ship a default one for version 0.4 and resolve the other points in another issue.
I was giving this some more thought and will start work on this item next.
The user should have the maximum flexibility as a priority, and then choose the most proper possible fallbacks.
This will give this priority list:
Implement a settings field
needs UI setting - stalled until version 1.0.0, will create a different issue for this.
use /organization-500.png (or sth similar)
(a custom picture they can put at their root). user/admin can choose their very own and override everything else.
use google plus page icon.
that's an icon they already made public themselves, so why not use it? But how do we get to know their google plus page (publisher)?
use https://logo.clearbit.com/ <domain>
if there is an icon at this address, it is most probably the publisher/organization icon. But it was set by a third party.
use apple-touch-icon.png and similar named (including sizes).
let's not put this before the others mentioned, because the site's touch icon is almost never the same icon as the publishers one. But for blogs, it is fairly possible and recognizable.
/speeddial-160px.png
Used by opera. Rarely used and probably better than nothing or the default.
$plugindir
/img/default-publisher-icon.png
Fallback. Artwork needed.
So, this is the list.
Fixed using: https://github.com/bmhm/wp-jsonld/commit/9be4cd4a6362002756f80eee2ac34774831b4e33
Due to the size restrictions, other options will be implemented later. Upload form for publisher logo will be tracked in #14.
What can be done, if:
We need to specify some kind of logo, because Google says so:
Source: https://developers.google.com/structured-data/rich-snippets/articles?hl=de
Suggestions (multiple can be implemented):
I'd say to use to use (1) in either way, because I don't want to have invalid syntax. 2.-5. can have any priority. As I am not a good interface designer, I'd go for 2. & 3. first.