a rel=license missing (machine readable license)
Closed this issue · 4 comments
Hey,
I did a quick test and it seems that the rel=”license” tag is not used?
Google (and other search engines) index it, it can be used in googles advanced search afterwards.
See e.g. https://smartcopying.edu.au/how-to-find-creative-commons-materials-using-google/
CC Choose tool also includes rel=license in the generated source code, see https://creativecommons.org/choose/
Thanks in advance!
Best regards,
Matthias
(Also posted this here a month ago https://wordpress.org/support/topic/a-rellicense-missing-machine-readable-license/)
Anyone working on this?
After installing the plugin to test this issue I see that rel="license" does exist on the footer versions of each of the licenses. It exists on both the link around the CC image and the link to the CC explanation -
But when the Gutenberg block of each of the CC types is used the CC image is no longer linked, and the explanation link is indeed missing the rel="license" -
In /includes/class-creativecommons.php It is evident where the footer content is defined and why it already includes rel="license", as this is in the function license_html_rdfa() where the HTML is directly defined. This function is called inside of print_license_html() where it gets the data needed and is originally called in /widgets/creativecommons-widget.php from the functions print_license_widget() | print_license_footer().
The footer is added through and add_action to wp_footer where it calls print_license_footer() as described above.
I'm unsure why running print_license_html() within print_license_widget() produces a different result than within print_license_footer().
This roadblock led me to find the block.js files defined within the /src/ directories, these seem to include direct HTML that shows why the non-footer versions (widgets/blocks) are missing rel="license".
But when including rel="license" in this HTML nothing changes on the front end, and I'm not quite sure where to go from here.
@CRortyDG I just installed the plugin, I can see the rel="license" attribute on widget on the rightside bar? can you confirm if its still reproducebale?