• Hello “addthis” maintainers!

    I’ve been using this WordPress plug-in for quite some time on some projects and it has presented us with a conflict with another plug-in called “WordPress SEO by Yoast”. The problem is related to the Javascript file added by “addthis” which is prevented of being added by the other plug-in mentioned. The issue is described in details on this post: http://ww.wp.xz.cn/support/topic/addthis-widget-buttons-inactive-with-wp36

    While trying to figure out why this was happening on “addthis” source-code I have found out a quite complex logic to search for a footer on the site theme and also force a HTML comment on it. It’s error prone because we also use another plugin intended to compress the HTML output which also removes any comments, thus this flow does not work on our setup.

    My proposal, as you can check on this pull request diff, is to add an Option on the Advanced settings tab so the user can choose whether or not to add the javascript on their site’s footer instead of the header. This is a recommended approach specially for elements that are not indeed necessary for the page to be loaded or functional, such as the Add This feature. Besides that the page load from a user perspective is improved. For this I also removed the logic mentioned above as it’s fallible and not necessary.

    It’s important to note this change does not fix the conflict with the other plug-in, but instead it gives us the option to mitigate it and with a better approach than the current one to use the “footer feature”.

    Could you please review the code and approve it if it’s alright?
    Please refer to this pull request in order to check for the code changes we are suggesting: https://github.com/wp-plugins/addthis/pull/1

    Thanks in advance!

    https://ww.wp.xz.cn/plugins/addthis/

The topic ‘Add option to include Javascript on footer’ is closed to new replies.