Open MirandaEcho opened 4 years ago
wp-content/themes/goliath/theme/templates/full-width-image.php:29:
wp-content/themes/goliath/theme/templates/limited-width-image.php:38:
Both post templates load this sharing code on the page at the top:
However, it looks like whatever's supposed to be here is loaded dynamically, via the "sharrre" jquery plugin:
sharrre
comes from the vendored library, https://github.com/INN/umbrella-ghn/blob/master/wp-content/themes/goliath/theme/assets/js/vendor/jquery.sharrre.min.js
That the header in that file notes that it's a beta version of version 1.3.5 of that library, and has been modified.
version 1.3.5 of Sharrre was released in 2013, with a 2.0.1 release in 2016, and no releases thereafter: https://github.com/Julienh/Sharrre/releases
Do we want to try to get the footer social share count buttons to appear at the top of the page instead of fixing the maybe-button that's there now?
These buttons also depend on sharrre
, and assume Google Plus and StumbleUpon. The hacked version of sharrre
used in this theme tries to query a REST API endpoint registered by the theme as a CORS workaround for Google Plus (rip) and Stumbleupon (?) share counts, but that query doesn't work because the request URL is malformed because in theme.js
they're setting the query URL to be ajax_object.ajaxurl + '?action=sharrre'
, and then sharrre
builds its query URLs with string manipulation that doesn't check to see whether there's already a URL parameter specified with ?
in the URL.
tl;dr: nooooooooope, don't even want to touch the sharrre stuff; it was dead five years ago and it's still dead now.
Gonna try to patch Largo's code into this, in the child theme.
@MirandaEcho did they tell us what social share buttons they wanted?
They have Facebook and twitter in the header and footer, so lets start with those for now and we can more in later if they want.
As part of the site-speed improvements, can we remove the JS powering the broken share counters, and the share counters themselves?
Basically: If we remove the share counters, the site can be faster and this ticket gets simpler.
Yes, scrap the social share counters.
If I'm reading
/wp-admin/admin.php?page=goliath-admin
right:The share buttons should already be enabled.
But they are not showing up.