All in One SEO Pack - Version 1.3.8

Version Description

Download this release

Release Info

Developer uberdose
Plugin Icon 128x128 All in One SEO Pack
Version 1.3.8
Comparing to
See all releases

Code changes from version 1.3.7.9 to 1.3.8

Files changed (1) hide show
  1. all_in_one_seo_pack.php +22 -10
all_in_one_seo_pack.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: All in One SEO Pack
5
  Plugin URI: http://wp.uberdose.com/2007/03/24/all-in-one-seo-pack/
6
  Description: Out-of-the-box SEO for your Wordpress blog.
7
- Version: 1.3.7.9
8
  Author: uberdose
9
  Author URI: http://wp.uberdose.com/
10
  */
@@ -28,7 +28,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
28
 
29
  class All_in_One_SEO_Pack {
30
 
31
- var $version = "1.3.7.9";
32
 
33
  /** Max numbers of chars in auto-generated description */
34
  var $maximum_description_length = 160;
@@ -56,6 +56,9 @@ class All_in_One_SEO_Pack {
56
  /** Any error in upgrading. */
57
  var $upgrade_error;
58
 
 
 
 
59
  function template_redirect() {
60
  if (is_feed()) {
61
  return;
@@ -608,26 +611,35 @@ class All_in_One_SEO_Pack {
608
  return implode(',', $keywords_ar);
609
  }
610
 
611
- function get_url($filename) {
612
  if (function_exists('file_get_contents')) {
613
- $file = @file_get_contents($filename);
614
  } else {
615
- $curl = curl_init($filename);
616
  curl_setopt($curl, CURLOPT_HEADER, 0);
617
  curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
618
  $file = curl_exec($curl);
 
619
  }
620
  return $file;
621
  }
622
 
623
  function download_newest_version() {
624
  $success = true;
625
- $file = $this->get_url("http://downloads.wordpress.org/plugin/all-in-one-seo-pack.zip");
626
- $fh = fopen($this->upgrade_filename, 'w');
627
- if (!fwrite($fh, $file)) {
628
- $success = false;
 
 
 
 
 
 
 
 
 
629
  }
630
- fclose($fh);
631
  return $success;
632
  }
633
 
4
  Plugin Name: All in One SEO Pack
5
  Plugin URI: http://wp.uberdose.com/2007/03/24/all-in-one-seo-pack/
6
  Description: Out-of-the-box SEO for your Wordpress blog.
7
+ Version: 1.3.8
8
  Author: uberdose
9
  Author URI: http://wp.uberdose.com/
10
  */
28
 
29
  class All_in_One_SEO_Pack {
30
 
31
+ var $version = "1.3.8";
32
 
33
  /** Max numbers of chars in auto-generated description */
34
  var $maximum_description_length = 160;
56
  /** Any error in upgrading. */
57
  var $upgrade_error;
58
 
59
+ /** Which zip to download in order to upgrade .*/
60
+ var $upgrade_url = 'http://downloads.wordpress.org/plugin/all-in-one-seo-pack.zip';
61
+
62
  function template_redirect() {
63
  if (is_feed()) {
64
  return;
611
  return implode(',', $keywords_ar);
612
  }
613
 
614
+ function get_url($url) {
615
  if (function_exists('file_get_contents')) {
616
+ $file = file_get_contents($url);
617
  } else {
618
+ $curl = curl_init($url);
619
  curl_setopt($curl, CURLOPT_HEADER, 0);
620
  curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
621
  $file = curl_exec($curl);
622
+ curl_close($curl);
623
  }
624
  return $file;
625
  }
626
 
627
  function download_newest_version() {
628
  $success = true;
629
+ $file = $this->get_url($this->upgrade_url);
630
+ if (strlen($file) < 100) {
631
+ $this->upgrade_error = "Could not download distribution ($this->upgrade_url): $file";
632
+ $success = false;
633
+ } else if ($file === false) {
634
+ $this->upgrade_error = "Could not download distribution ($this->upgrade_url)";
635
+ $success = false;
636
+ } else {
637
+ $fh = fopen($this->upgrade_filename, 'w');
638
+ if (!fwrite($fh, $file)) {
639
+ $success = false;
640
+ }
641
+ fclose($fh);
642
  }
 
643
  return $success;
644
  }
645