Compatibility Issue with Easy Social Share Buttons for WordPress

This topic has 4 replies, 2 voices, and was last updated 9 years, 5 months ago ago by Jack Richardson

  • Avatar: robertstaddon
    robertstaddon
    Participant
    July 8, 2015 at 07:07

    TheLeader does not test to see if the Twitter OAuth is already loaded before loading it. This puts it in conflict with “Easy Social Share Buttons for WordPress” (http://codecanyon.net/item/easy-social-share-buttons-for-wordpress/6394476) and any other plugin that utilizes the Twitter OAuth.

    The following error appears in the PHP error logs: “PHP Fatal error: Cannot redeclare class OAuthSig natureMethod_HMAC_SHA1 in /themes/theleader/framework/twitteroauth/OAuth.php on line 120”

    A quick search of this forum shows that others have experienced this same problem.

    A simple, responsible solution would be for TheLeader theme to quickly check to see if the “TwitterOAuth” class exists before attempting to load it with a require_once statement. By adding a quick test on line 36 of /theleader/framework/init.php, the problem is solved:

    if ( !class_exists( ‘TwitterOAuth’ ) )
    require_once( trailingslashit(ETHEME_CODE_DIR). ‘twitteroauth/twitteroauth.php’ );

    Would you be able to update TheLeader theme with this line of code so that it would work with “Easy Social Share Buttons for WordPress” and any other plugin that uses Twitter OAuth?

    Thank you!

    3 Answers
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    July 13, 2015 at 09:13

    Hello,

    Please take our apologies for the delay.
    Thank you for provided recommendation regarding the “TwitterOAuth” class checking issue. We will add this solution in the next theme update.

    Best regards,
    Jack Richardson.

    Avatar: robertstaddon
    robertstaddon
    Participant
    July 13, 2015 at 14:51

    Great! Thanks.

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    July 13, 2015 at 16:44

    Hello,

    You are welcome.

    Best regards,
    Jack Richardson.

  • Viewing 4 results - 1 through 4 (of 4 total)

The issue related to '‘Compatibility Issue with Easy Social Share Buttons for WordPress’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.