pippinsplugins / WordPress-Plugin-Update-Notifier-for-Code-Canyon

This is a project that helps to provide an update notification system for WordPress plugins sold through the Envaro Code Canyon marketplace.
http://pippinsplugins.com
MIT License
64 stars 15 forks source link

Theme Check Plugin #5

Open gasatrya opened 11 years ago

gasatrya commented 11 years ago

Hello Pippin,

It seems the code is not too different with https://github.com/unisphere/unisphere_notifier/blob/master/update-notifier.php

Is it possible to change these lines https://github.com/pippinsplugins/WordPress-Plugin-Update-Notifier-for-Code-Canyon/blob/master/update-notifier.php#L116-L125 with wp_remote_get or something?

I got a warning from theme check plugin

Thanks.

pippinsplugins commented 11 years ago

Yes, it was based off of that code.

It is definitely possible. How familiar are you with wp_remote_get/post()?

gasatrya commented 11 years ago

I'm not familiar with wp_remote_get/post() :(. Could you help me to show some sample code?

pippinsplugins commented 11 years ago

Are you reasonably comfortable with PHP?

mwordpress commented 9 years ago

tested but too late $response = wp_remote_get( $notifier_file_url, array( 'timeout' => 15 ) ); if( ! is_wp_error( $response ) && isset( $response['response']['code'] ) && 200 === $response['response']['code'] ) { $cache = wp_remote_retrieve_body( $response ); }