Version Description
- Code optimization and improvements
- Fixed a really bad html bug, please update asap
=
Download this release
Release Info
Developer | PascalBajorat |
Plugin | PB SEO Friendly Images |
Version | 1.3.2 |
Comparing to | |
See all releases |
Code changes from version 1.3.0 to 1.3.2
- inc/settings.php +1 -1
- pb-seo-friendly-images.php +26 -13
- readme.txt +8 -1
inc/settings.php
CHANGED
@@ -19,7 +19,7 @@ if( !class_exists('pbSEOFriendlyImagesSettings') ):
|
|
19 |
|
20 |
$showUpgradeBanner = get_option('pbsfi_upgrade_notice');
|
21 |
|
22 |
-
if( $showUpgradeBanner != self::$verMajor &&
|
23 |
add_action( 'admin_notices', array(__CLASS__, 'adminUpgradeNotice') );
|
24 |
}
|
25 |
}
|
19 |
|
20 |
$showUpgradeBanner = get_option('pbsfi_upgrade_notice');
|
21 |
|
22 |
+
if( $showUpgradeBanner != self::$verMajor && self::getArrayKey('page', $_GET) != 'pb-seo-friendly-images' ) {
|
23 |
add_action( 'admin_notices', array(__CLASS__, 'adminUpgradeNotice') );
|
24 |
}
|
25 |
}
|
pb-seo-friendly-images.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: PB SEO Friendly Images
|
4 |
Plugin URI: http://wordpress.org/extend/plugins/pb-seo-friendly-images/
|
5 |
Description: This plugin is a full-featured solution for SEO friendly images. Optimize "alt" and "title" attributes for all images and post thumbnails. This plugin helps you to improve your traffic from search engines.
|
6 |
-
Version: 1.3.
|
7 |
Author: Pascal Bajorat
|
8 |
Author URI: https://www.pascal-bajorat.com
|
9 |
Text Domain: pb-seo-friendly-images
|
@@ -18,6 +18,10 @@ if ( !class_exists('WP') ) {
|
|
18 |
die();
|
19 |
}
|
20 |
|
|
|
|
|
|
|
|
|
21 |
if( ! defined('pbsfi_plugin_path') ) {
|
22 |
define('pbsfi_plugin_path', plugin_dir_path(__FILE__));
|
23 |
}
|
@@ -35,14 +39,14 @@ if( !class_exists('pbSEOFriendlyImages') ):
|
|
35 |
class pbSEOFriendlyImages
|
36 |
{
|
37 |
public static $verMajor = 1.3;
|
38 |
-
public static $verMinor =
|
39 |
|
40 |
|
41 |
public static $basename = false;
|
42 |
public static $userSettings = array();
|
43 |
public static $proVersion = false;
|
|
|
44 |
public static $proURL = 'http://bit.ly/seo-friendly-images-pro';
|
45 |
-
public static $updateURL = 'https://pb-seo-friendly-images.s3-eu-west-1.amazonaws.com/pb-seo-friendly-images-pro.json';
|
46 |
|
47 |
/**
|
48 |
* Init function
|
@@ -101,18 +105,25 @@ if( !class_exists('pbSEOFriendlyImages') ):
|
|
101 |
}
|
102 |
} else {
|
103 |
add_action( 'admin_enqueue_scripts', function(){
|
104 |
-
wp_register_style( 'pbsfi-admin-css', plugins_url(dirname(
|
105 |
wp_enqueue_style( 'pbsfi-admin-css' );
|
106 |
} );
|
107 |
}
|
|
|
108 |
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
}
|
117 |
}
|
118 |
|
@@ -213,11 +224,13 @@ if( !class_exists('pbSEOFriendlyImages') ):
|
|
213 |
$src = $data_src;
|
214 |
}
|
215 |
|
|
|
|
|
|
|
216 |
/**
|
217 |
* Override Area
|
218 |
*/
|
219 |
if( self::$userSettings['override_alt'] ) {
|
220 |
-
|
221 |
$alt = trim(self::convertReplacements(
|
222 |
self::$userSettings['alt_scheme'],
|
223 |
$src
|
@@ -277,7 +290,7 @@ if( !class_exists('pbSEOFriendlyImages') ):
|
|
277 |
}
|
278 |
}
|
279 |
|
280 |
-
return $document->saveHTML();
|
281 |
}
|
282 |
|
283 |
/**
|
3 |
Plugin Name: PB SEO Friendly Images
|
4 |
Plugin URI: http://wordpress.org/extend/plugins/pb-seo-friendly-images/
|
5 |
Description: This plugin is a full-featured solution for SEO friendly images. Optimize "alt" and "title" attributes for all images and post thumbnails. This plugin helps you to improve your traffic from search engines.
|
6 |
+
Version: 1.3.2
|
7 |
Author: Pascal Bajorat
|
8 |
Author URI: https://www.pascal-bajorat.com
|
9 |
Text Domain: pb-seo-friendly-images
|
18 |
die();
|
19 |
}
|
20 |
|
21 |
+
if( ! defined('pbsfi_file') ) {
|
22 |
+
define('pbsfi_file', __FILE__);
|
23 |
+
}
|
24 |
+
|
25 |
if( ! defined('pbsfi_plugin_path') ) {
|
26 |
define('pbsfi_plugin_path', plugin_dir_path(__FILE__));
|
27 |
}
|
39 |
class pbSEOFriendlyImages
|
40 |
{
|
41 |
public static $verMajor = 1.3;
|
42 |
+
public static $verMinor = 2;
|
43 |
|
44 |
|
45 |
public static $basename = false;
|
46 |
public static $userSettings = array();
|
47 |
public static $proVersion = false;
|
48 |
+
|
49 |
public static $proURL = 'http://bit.ly/seo-friendly-images-pro';
|
|
|
50 |
|
51 |
/**
|
52 |
* Init function
|
105 |
}
|
106 |
} else {
|
107 |
add_action( 'admin_enqueue_scripts', function(){
|
108 |
+
wp_register_style( 'pbsfi-admin-css', plugins_url(dirname(pbSEOFriendlyImages::$basename)).'/css/admin.css', false, '1.0.0' );
|
109 |
wp_enqueue_style( 'pbsfi-admin-css' );
|
110 |
} );
|
111 |
}
|
112 |
+
}
|
113 |
|
114 |
+
/**
|
115 |
+
* get array key
|
116 |
+
*
|
117 |
+
* @param $key
|
118 |
+
* @param $array
|
119 |
+
* @return bool
|
120 |
+
*/
|
121 |
+
public static function getArrayKey($key, $array)
|
122 |
+
{
|
123 |
+
if( array_key_exists($key, $array) ) {
|
124 |
+
return $array[$key];
|
125 |
+
} else {
|
126 |
+
return false;
|
127 |
}
|
128 |
}
|
129 |
|
224 |
$src = $data_src;
|
225 |
}
|
226 |
|
227 |
+
|
228 |
+
|
229 |
+
|
230 |
/**
|
231 |
* Override Area
|
232 |
*/
|
233 |
if( self::$userSettings['override_alt'] ) {
|
|
|
234 |
$alt = trim(self::convertReplacements(
|
235 |
self::$userSettings['alt_scheme'],
|
236 |
$src
|
290 |
}
|
291 |
}
|
292 |
|
293 |
+
return preg_replace('/^<!DOCTYPE.+?>/', '', str_replace( array('<html>', '</html>', '<body>', '</body>'), array('', '', '', ''), $document->saveHTML()));
|
294 |
}
|
295 |
|
296 |
/**
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.pascal-bajorat.com/spenden/
|
|
4 |
Tags: seo, images, Post, admin, google, attachment, optimize, photo, picture, image, media, photos, pictures, alt, title
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 4.7.3
|
7 |
-
Stable tag: 1.3.
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -55,6 +55,13 @@ If you have any questions or problems, you can ask me: [Pascal Bajorat - Webdesi
|
|
55 |
* Code optimization and improvements
|
56 |
* Added a new auto title for links function (pro only)
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
== License ==
|
59 |
|
60 |
GNU General Public License v.3 - http://www.gnu.org/licenses/gpl-3.0.html
|
4 |
Tags: seo, images, Post, admin, google, attachment, optimize, photo, picture, image, media, photos, pictures, alt, title
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 4.7.3
|
7 |
+
Stable tag: 1.3.2
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
55 |
* Code optimization and improvements
|
56 |
* Added a new auto title for links function (pro only)
|
57 |
|
58 |
+
= 1.3.1 =
|
59 |
+
* Code optimization and improvements
|
60 |
+
|
61 |
+
= 1.3.2 =
|
62 |
+
* Code optimization and improvements
|
63 |
+
* Fixed a really bad html bug, please update asap
|
64 |
+
|
65 |
== License ==
|
66 |
|
67 |
GNU General Public License v.3 - http://www.gnu.org/licenses/gpl-3.0.html
|