You appear to be a bot. Output may be restricted
Description
Update site_transient_update_plugins for each of our pluginsOn the second call to this function we perform our own checks to see if the plugins have been updated. The response array is updated for each plugin with a new version.
Usage
$array = oik_lazy_altapi_check( $transient );
Parameters
- $transient
- ( array ) required – structure as in example below
Returns
array $transient – with updates to the response array $plugin_slug is the path and plugin name e.g. oik/oik.php [last_checked] => 1342601824 [checked] => Array ( [backwpup/backwpup.php] => 2.1.11 [oik-pro/oik-altapi.php] => 1.0 ) [response] => Array ( [backwpup/backwpup.php] => stdClass Object ( [id] => 8736 [slug] => backwpup [new_version] => 2.1.12 [url] => http://wordpress.org/extend/plugins/backwpup/ [package] => http://downloads.wordpress.org/plugin/backwpup.2.1.12.zip ) )Source
File name: oik/includes/oik-remote.incLines:
1 to 32 of 32
function oik_lazy_altapi_check( $transient ) { bw_backtrace(); static $checks = 0; static $responses = array(); static $responses_built = false; $checks++; bw_trace2( $checks, "checks" ); if ( !$responses_built ) { $checked = bw_array_get( $transient, "checked", null ); if ( $checked ) { $responses = oik_check_checked_for_update( $checked ); /* foreach ( $checked as $plugin => $version ) { $response = oik_check_for_update( $plugin, $version ); if ( $response && !is_wp_error( $response ) ) { $responses[$plugin] = $response; } } */ $responses_built = true; } } bw_trace2( $responses, "responses", false ); if ( $responses_built ) { foreach ( $responses as $plugin => $response ) { $transient->response[$plugin] = $response; } } bw_trace2( $transient, "transient updated", false ); return( $transient ); }View on GitHub View on Trac