envato / envato-wordpress-toolkit-library

WordPress Toolkit Library for Envato Marketplace hosted items
71 stars 29 forks source link

Theme Check Warnings #2

Closed Pixelous closed 12 years ago

Pixelous commented 12 years ago

Hi, I have several warnings with Theme Check Plugin. Line 264: ini_set('max_execution_time', ETU_MAX_EXECUTION_TIME); WARNING: curl_init was found in the file envato-wordpress-toolkit-library/class-envato-protected-api.php possible file operations. Line 342: $ch = curl_init( $url ); WARNING: curl_exec was found in the file envato-wordpress-toolkit-library/class-envato-protected-api.php possible file operations. Line 345: $data = curl_exec( $ch ); RECOMMENDED: get_themes found in the file envato-wordpress-toolkit-library/class-envato-wordpress-theme-upgrader.php. Deprecated since version 3.4. Use wp_get_themes() instead. Line 72: $result->updated_themes = $this->get_updated_themes(get_themes(), $purchased_themes); Line 226: $installed_themes = get_themes(); RECOMMENDED: get_current_theme found in the file envato-wordpress-toolkit-library/class-envato-wordpress-theme-upgrader.php. Deprecated since version 3.4. Use wp_get_theme() instead. Line 68: $theme_name = get_current_theme(); Line 94: $theme_name = get_current_theme(); INFO: envato-wordpress-toolkit-library/class-envato-wordpress-theme-upgrader.php The theme appears to use include or require. If these are being used to include separate sections of a template from independent files, then get_template_part() should be used instead. Line 11: include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' ); Line 12: include_once( 'class-envato-protected-api.php' );

Could you please fix that?

Japh commented 12 years ago

Hi Slieptsov, please try using the latest version. The warnings for Lines 264, 342 and 345 are all fixed. The warnings relating to WordPress 3.4 will be fixed once we update for WordPress 3.4. The lines relating to include_once are informational only, and the correct approach is already being used.

I hope that helps! :)