-2

Please help me in solving these warnings, in order to submit the theme for submission. Thanks in Advance.

I have found many warnings and have solved many of them thanks to wordpress.stackexchange.com but still unable to solve the below arors, please help me.

WARNING: Found base64_encode in the file twitteroauth.php. base64_encode() is not allowed.
Line 123: return base64_encode(hash_hmac('sha1', $base_string, $key, true));
Line 203: return base64_encode($signature);

WARNING: Found base64_decode in the file twitteroauth.php. base64_decode() is not allowed.
Line 207: $decoded_sig = base64_decode($signature);

WARNING: file_get_contents was found in the file twitteroauth.php File operations should use the WP_Filesystem methods instead of direct PHP filesystem calls.
Line 277: 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 1084: $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 1110: $response = curl_exec($ci);

REQUIRED: plugin-activation.php. Themes should use add_theme_page() for adding admin pages.
Line 335: add_submenu_page(

REQUIRED: innovative_panel_functions.php. Themes should use add_theme_page() for adding admin pages.
Line 143: add_menu_page(theme_name.' Settings', theme_name ,'install_themes', 'panel'

RECOMMENDED: Possible variable $instance found in translation function in plugin-activation.php. Translation function calls must NOT contain PHP variables.
Line 2043: echo '<p><a href='' . add_query_arg( 'page', TGM_Plugin_Activation::$instance->menu, admin_url( TGM_Plugin_Activation::$instance->parent_url_slug ) ) . '' title='' . esc_attr( TGM_Plugin_Activation::$instance->strings['return'] ) . '' target='_parent'>' . __( TGM_Plugin_Activation::$instance->strings['return'], 'tgmpa' ) . '</a><

closed as too broad by Chip Bennett, s_ha_dum Jan 28 '14 at 22:05

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    Well, each error gives you explanatory message, what doesn't make sense? It would help you gave you a link to view your theme in action. Also, if you've submitted your theme, what does your reviewer say? If you haven't, have you emailed the theme review list for clarification on rules you don't understand? – Andrew Bartel Dec 26 '13 at 8:46
  • No i haven't submitted the theme neither emailed these errors to theme reviewer, the market place for which i am working don't tell that how to solve these issues or any clarification regarding the errors. It just say that you have to resolve your errors which theme check generates.. – Furqan Mahmood Dec 26 '13 at 9:39
  • These problems are pretty basic, it's telling you that themes that you submit are not allowed to use these features. You need to either change the way it's being done. Most of the time it is telling you what you need to use instead. – hornj Jan 1 '14 at 13:53
  • but what to do in place of CURL ??? as i am using twitters php library for generating the tweets – Furqan Mahmood Jan 3 '14 at 14:16
  • As-written, this question is a debug/QA my code/work-for-me-for-free question, and omits relevant code. Please review the WPSE FAQ for guidance on how to write good-quality questions. – Chip Bennett Jan 28 '14 at 21:41
2
File operations should use the WP_Filesystem methods instead of direct PHP filesystem calls.

The WordPress coding styles require that you make use of the WP Filesystem instead of using direct PHP file functions. You can replace your file_get_contents call easily with:

$response = wp_remote_get($feed_url);
$file_content = $response['body'];

For more specific infos just take a look at: "A Look at the WordPress HTTP API: A Practical Example of wp_remote_get".

If the file you want to read is not a local file, then please refer to the WordPress Filesystem_API.

Not the answer you're looking for? Browse other questions tagged or ask your own question.