Discussion:
With wordpress 3.7 our function that prevented checking for upgrade on wordpress.org has broken, what has changed?
Nicola Peluchetti
2013-10-26 14:48:09 UTC
Permalink
Hi,

we have a premium version of our plugin which stops checking for updates
from wordpress.org. I guess 3.7 broke that. This is our function

// ================================================

// = Disable updates checking for premium version =

// ================================================

function ai1ec_disable_updates( $r, $url ) {

if ( 0 !== strpos( $url, 'http://api.wordpress.org/plugins/update-check' ) )

return $r; // Not a plugin update request.


$plugins = unserialize( $r['body']['plugins'] );

unset( $plugins->plugins[ plugin_basename( __FILE__ ) ] );

unset( $plugins->active[ array_search( plugin_basename( __FILE__ ),
$plugins->active ) ] );

$r['body']['plugins'] = serialize( $plugins );


return $r;

}

how can i change this to make it work with 3.7?
* *
*Nicola Peluchetti - Senior PHP Developer @ Timely**
*
Twitter: @nik_peluchetti <https://twitter.com/#!/nik_peluchetti>
Facebook: nicola.peluchetti <https://www.facebook.com/nicola.peluchetti>
Stackoverflow: Stackoverflow<http://stackoverflow.com/users/397861/nicola-peluchetti>
Mobile: +39 339 7507235
Ryan McCue
2013-10-26 14:50:51 UTC
Permalink
Post by Nicola Peluchetti
Hi,
we have a premium version of our plugin which stops checking for updates
from wordpress.org. I guess 3.7 broke that. This is our function
This broke because the API changed from serialized data to JSON. See
http://make.wordpress.org/core/2013/10/25/json-encoding-ssl-api-wordpress-3-7/
--
Ryan McCue
<http://ryanmccue.info/>
Nicola Peluchetti
2013-10-26 14:57:18 UTC
Permalink
Thanks.

* *
*Nicola Peluchetti - Senior PHP Developer @ Timely**
*
Twitter: @nik_peluchetti <https://twitter.com/#!/nik_peluchetti>
Facebook: nicola.peluchetti <https://www.facebook.com/nicola.peluchetti>
Stackoverflow: Stackoverflow<http://stackoverflow.com/users/397861/nicola-peluchetti>
Mobile: +39 339 7507235
Post by Ryan McCue
Post by Nicola Peluchetti
Hi,
we have a premium version of our plugin which stops checking for updates
from wordpress.org. I guess 3.7 broke that. This is our function
This broke because the API changed from serialized data to JSON. See
http://make.wordpress.org/core/2013/10/25/json-encoding-ssl-api-wordpress-3-7/
--
Ryan McCue
<http://ryanmccue.info/>
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Loading...