Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Added sslverify option to config array #4

Merged
merged 1 commit into from

2 participants

@thehelvetian

No description provided.

@jkudish jkudish merged commit c23dd39 into from
@jkudish

Thanks @pmichael, now merged!

@thehelvetian

You're welcome ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 28, 2011
  1. Added sslverify option to config

    Peter Michael authored
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 4 deletions.
  1. +5 −4 updater.php
View
9 updater.php
@@ -40,8 +40,9 @@ function __construct($config = array()) {
'raw_url' => 'https://raw.github.com/jkudish/WordPress-GitHub-Plugin-Updater/master',
'github_url' => 'https://github.com/jkudish/WordPress-GitHub-Plugin-Updater',
'zip_url' => 'https://github.com/jkudish/WordPress-GitHub-Plugin-Updater/zipball/master',
- 'requires' => $wp_version,
- 'tested' => $wp_version,
+ 'sslverify' => true,
+ 'requires' => $wp_version,
+ 'tested' => $wp_version,
);
$this->config = wp_parse_args($config, $defaults);
@@ -89,7 +90,7 @@ function get_new_version() {
$version = get_site_transient($this->config['slug'].'_new_version');
if (!isset($version) || !$version || $version == '') {
- $raw_response = wp_remote_get($this->config['raw_url'].'/README.md');
+ $raw_response = wp_remote_get($this->config['raw_url'].'/README.md', $this->config['sslverify']);
if (is_wp_error($raw_response))
return false;
@@ -105,7 +106,7 @@ function get_new_version() {
function get_github_data() {
$github_data = get_site_transient($this->config['slug'].'_github_data');
if (!isset($github_data) || !$github_data || $github_data == '') {
- $github_data = wp_remote_get($this->config['api_url']);
+ $github_data = wp_remote_get($this->config['api_url'], $this->config['sslverify']);
if (is_wp_error($github_data))
return false;
Something went wrong with that request. Please try again.