WordPress.org

Forums

base64_encode() is not allowed. (9 posts)

  1. Spyroweb
    Member
    Posted 1 year ago #

    i have developed a theme when i check it with theme check plugin its give the followings warnings.

    WARNING: Found base64_encode in the file OAuth.php. base64_encode() is not allowed.

    Line 116: return base64_encode(hash_hmac('sha1', $base_string, $key, true));

    WARNING: file_get_contents was found in the file OAuth.php File operations should use the WP_Filesystem methods instead of direct PHP filesystem calls.

    Line 270: file_get_contents(self::$POST_INPUT)

    WARNING: curl_init was found in the file twitteroauth.php File operations should use the WP_Filesystem methods instead of direct PHP filesystem calls.

    Line 195: $ci = curl_init();

    WARNING: curl_exec was found in the file twitteroauth.php File operations should use the WP_Filesystem methods instead of direct PHP filesystem calls.

    Line 221: $response = curl_exec($ci);

    please any one know what should i replace instead of all these to remove the warnings!

  2. @mercime
    Volunteer Moderator
    Posted 1 year ago #

    Simply means that you have to remove those items listed in each WARNING i.e., base64_encode, file_get_contents, curl_init, curl_exec, etc. or your theme won't be accepted for review by volunteers of the WP Theme Review Team.

  3. Spyroweb
    Member
    Posted 1 year ago #

    @mercime i dont agree with you i have developed several theme for themeforest and they approve it. but this time my client dont want these warnings i want to remove theses all but how i remove it and what i should replace instead of these i use twitter api and without these its not working please any one know that what should i replace for all these.

  4. esmi
    Forum Moderator
    Posted 1 year ago #

    With all due respect, whether you agree or not is immaterial. The Theme Check plugin was developed for themes that are to be uploaded to the wordpress.org Theme Repository. And the wordpress.org theme guidelines specifically do not allow to any base64 encoding, so the plugin dutifully, and quite correctly, flags this up.

    If you do not intend to code themes in line with the WPORG guidelines, then I would suggest that this plugin is not for you.

  5. Spyroweb
    Member
    Posted 1 year ago #

    @esmi can you help me how to remove these warnings what should i replace instead of each that my twitter also work and i also remove these warnings.

  6. esmi
    Forum Moderator
    Posted 1 year ago #

    Can I answer that with another question? Why do you need to build a Twitter feed into your theme? Why not use a plugin and then style it appropriately within your theme?

  7. Spyroweb
    Member
    Posted 1 year ago #

    good idea but i have my own framework and i dont want to use any plugin but if you know any good plugin then please send me that plugin i will try if the warnings removed by that plugin then definitely i will use that plugin

  8. esmi
    Forum Moderator
    Posted 1 year ago #

    Given that Twitter keeps changing it's API etc, I don't know of a good plugin off the top of my head but I'm pretty sure you will find something to suit in the more recent plugins at http://wordpress.org/plugins/search.php?q=twitter

  9. Spyroweb
    Member
    Posted 1 year ago #

    ok thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic