Version Description
Download this release
Release Info
Developer | alexdunae |
Plugin | Smush Image Compression and Optimization |
Version | 1.1.2 |
Comparing to | |
See all releases |
Code changes from version 1.1.1 to 1.1.2
- history.txt +3 -0
- readme.txt +2 -2
- smush.php +1 -1
- wp-smushit.php +10 -4
history.txt
CHANGED
@@ -1,5 +1,8 @@
|
|
1 |
=== WP Smush.it Release History ===
|
2 |
|
|
|
|
|
|
|
3 |
== 1.1.1 ==
|
4 |
* added error message on PHP copy error
|
5 |
|
1 |
=== WP Smush.it Release History ===
|
2 |
|
3 |
+
== 1.1.2 ==
|
4 |
+
* added test for allow_url_fopen
|
5 |
+
|
6 |
== 1.1.1 ==
|
7 |
* added error message on PHP copy error
|
8 |
|
readme.txt
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
=== WP Smush.it ===
|
2 |
Plugin Name: WP Smush.it
|
3 |
-
Version: 1.1
|
4 |
Author: Dialect
|
5 |
Author URI: http://dialect.ca/?wp_smush_it
|
6 |
Contributors: alexdunae
|
7 |
Tags: images, image, attachments, attachment
|
8 |
Requires at least: 2.5
|
9 |
Tested up to: 2.7
|
10 |
-
Stable tag: 1.1.
|
11 |
|
12 |
Reduce image file sizes and improve performance using the <a href="http://smush.it/">Smush.it</a> API within WordPress.
|
13 |
|
1 |
=== WP Smush.it ===
|
2 |
Plugin Name: WP Smush.it
|
3 |
+
Version: 1.1.2
|
4 |
Author: Dialect
|
5 |
Author URI: http://dialect.ca/?wp_smush_it
|
6 |
Contributors: alexdunae
|
7 |
Tags: images, image, attachments, attachment
|
8 |
Requires at least: 2.5
|
9 |
Tested up to: 2.7
|
10 |
+
Stable tag: 1.1.2
|
11 |
|
12 |
Reduce image file sizes and improve performance using the <a href="http://smush.it/">Smush.it</a> API within WordPress.
|
13 |
|
smush.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* Expects an `attachment_ID` in the query string.
|
6 |
*
|
7 |
-
* @version 1.1.
|
8 |
* @package WP_SmushIt
|
9 |
*/
|
10 |
|
4 |
*
|
5 |
* Expects an `attachment_ID` in the query string.
|
6 |
*
|
7 |
+
* @version 1.1.2
|
8 |
* @package WP_SmushIt
|
9 |
*/
|
10 |
|
wp-smushit.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Integrate the Smush.it API into WordPress.
|
4 |
-
* @version 1.1.
|
5 |
* @package WP_SmushIt
|
6 |
*/
|
7 |
/*
|
@@ -9,7 +9,7 @@ Plugin Name: WP Smush.it
|
|
9 |
Plugin URI: http://dialect.ca/code/wp-smushit/
|
10 |
Description: Reduce image file sizes and improve performance using the <a href="http://smush.it/">Smush.it</a> API within WordPress.
|
11 |
Author: Dialect
|
12 |
-
Version: 1.1.
|
13 |
Author URI: http://dialect.ca/?wp_smush_it
|
14 |
*/
|
15 |
|
@@ -59,8 +59,8 @@ add_action('admin_init', 'wp_smushit_init');
|
|
59 |
*/
|
60 |
function wp_smushit($file) {
|
61 |
// dont't run on localhost
|
62 |
-
if( '127.0.0.1' == $_SERVER['SERVER_ADDR'] )
|
63 |
-
return array($file, __('Not processed (local file)', WP_SMUSHIT_DOMAIN));
|
64 |
|
65 |
|
66 |
$file_path = $file;
|
@@ -78,6 +78,12 @@ function wp_smushit($file) {
|
|
78 |
|
79 |
$req = sprintf( SMUSHIT_REQ_URL, urlencode( $file_url ) );
|
80 |
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
$fh = @fopen( $req, 'r' ); // post to Smush.it
|
82 |
|
83 |
if ( !$fh )
|
1 |
<?php
|
2 |
/**
|
3 |
* Integrate the Smush.it API into WordPress.
|
4 |
+
* @version 1.1.2
|
5 |
* @package WP_SmushIt
|
6 |
*/
|
7 |
/*
|
9 |
Plugin URI: http://dialect.ca/code/wp-smushit/
|
10 |
Description: Reduce image file sizes and improve performance using the <a href="http://smush.it/">Smush.it</a> API within WordPress.
|
11 |
Author: Dialect
|
12 |
+
Version: 1.1.2
|
13 |
Author URI: http://dialect.ca/?wp_smush_it
|
14 |
*/
|
15 |
|
59 |
*/
|
60 |
function wp_smushit($file) {
|
61 |
// dont't run on localhost
|
62 |
+
// if( '127.0.0.1' == $_SERVER['SERVER_ADDR'] )
|
63 |
+
// return array($file, __('Not processed (local file)', WP_SMUSHIT_DOMAIN));
|
64 |
|
65 |
|
66 |
$file_path = $file;
|
78 |
|
79 |
$req = sprintf( SMUSHIT_REQ_URL, urlencode( $file_url ) );
|
80 |
|
81 |
+
// test for allow_url_fopen -- this is temporary and will be replaced with the new
|
82 |
+
// WP_Http class in the near future
|
83 |
+
// borrowed from wp-includes/http.php, line 696
|
84 |
+
if ( ! function_exists('fopen') || (function_exists('ini_get') && true != ini_get('allow_url_fopen')) )
|
85 |
+
return array($file, __('Remote fopen is not enabled (<a href="http://dialect.ca/code/wp-smushit/#fopen_note" target="_blank">more info</a>)', WP_SMUSHIT_DOMAIN));
|
86 |
+
|
87 |
$fh = @fopen( $req, 'r' ); // post to Smush.it
|
88 |
|
89 |
if ( !$fh )
|