You appear to be a bot. Output may be restricted
Description
Check these plugins for updated versionsPass the array of plugins and their current version to the server and check for updates The server is only expected to return responses for any plugin where there are updates. If the server does not support "check-these" then we'll get an error?
Usage
oik_remote::oik_check_these_for_update( $server, $check_these );
Parameters
- $server
- ( mixed ) required –
- $check_these
- ( mixed ) required –
Returns
voidSource
File name: oik/libs/class-oik-remote.phpLines:
1 to 35 of 35
static function oik_check_these_for_update( $server, $check_these ) { $url = $server; //$url = "http://qw/wordpress"; $url .= '/plugins/check-these/'; $body = array( "action" => "check-these" // , "plugin_name" => $plugin // , "version" => $version // , "apikey" => $apikey , "check" => serialize( $check_these ) ); $args = array( "body" => $body, "timeout" => 20 ); $result = self::bw_remote_post( $url, $args ); if ( $result ) { bw_trace2( $result ); if ( is_wp_error( $result ) ) { $response = $result; } else { //bw_trace2( $result->new_version, "$version!", false ); //$vc = version_compare( $result->new_version, $version, ">" ); //bw_trace2( $result->new_version, "new version", false ); //bw_trace2( $version, "old version", false ); //bw_trace2( $vc, "vc result", false ); // if( isset( $result->new_version ) && version_compare( $result->new_version, $version, '>' ) ) { $response = $result; //bw_trace2( $response, "response", ); if ( !is_array( $response ) && false !== strpos( $response, "Invalid request" ) ) { $response = null; } // } } } else { $response = null; } return( $response ); }View on GitHub View on Trac