PB SEO Friendly Images - Version 2.3.0

Version Description

  • Fixed a Firefox bug
  • Added Filter to the core functions. You can use "pbsfi-alt", "pbsfi-title", "pbsfi-wc-alt" and "pbsfi-wc-title" as filter to change the attributes of your images in a more custom way. The "wc" filter is specially for the woocommerce attributes of the pro version.
Download this release

Release Info

Developer PascalBajorat
Plugin Icon 128x128 PB SEO Friendly Images
Version 2.3.0
Comparing to
See all releases

Code changes from version 2.2.2 to 2.3.0

css/admin.css CHANGED
@@ -79,6 +79,7 @@
79
  .pb-wp-app-wrapper .pb-section-wrap p:last-child, .pb-wp-app-wrapper .form-table p:last-child {
80
  margin-bottom: 0; }
81
  .pb-wp-app-wrapper .pb-section-wrap input[type="text"], .pb-wp-app-wrapper .pb-section-wrap textarea, .pb-wp-app-wrapper .pb-section-wrap select, .pb-wp-app-wrapper .form-table input[type="text"], .pb-wp-app-wrapper .form-table textarea, .pb-wp-app-wrapper .form-table select {
 
82
  width: 100%;
83
  margin-left: 0;
84
  border-radius: 4px;
@@ -101,7 +102,8 @@
101
  cursor: not-allowed;
102
  opacity: .75; }
103
  .pb-wp-app-wrapper .pb-section-wrap select, .pb-wp-app-wrapper .form-table select {
104
- height: 39px; }
 
105
  .pb-wp-app-wrapper .button.button-primary {
106
  text-shadow: none;
107
  -webkit-transition: background .5s;
79
  .pb-wp-app-wrapper .pb-section-wrap p:last-child, .pb-wp-app-wrapper .form-table p:last-child {
80
  margin-bottom: 0; }
81
  .pb-wp-app-wrapper .pb-section-wrap input[type="text"], .pb-wp-app-wrapper .pb-section-wrap textarea, .pb-wp-app-wrapper .pb-section-wrap select, .pb-wp-app-wrapper .form-table input[type="text"], .pb-wp-app-wrapper .form-table textarea, .pb-wp-app-wrapper .form-table select {
82
+ box-sizing: content-box;
83
  width: 100%;
84
  margin-left: 0;
85
  border-radius: 4px;
102
  cursor: not-allowed;
103
  opacity: .75; }
104
  .pb-wp-app-wrapper .pb-section-wrap select, .pb-wp-app-wrapper .form-table select {
105
+ height: 39px;
106
+ padding: 3px 7px; }
107
  .pb-wp-app-wrapper .button.button-primary {
108
  text-shadow: none;
109
  -webkit-transition: background .5s;
css/admin.css.map CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "version": 3,
3
- "mappings": "AAAQ,4EAAoE;AAM5E,kBAAmB;EACf,UAAU,EAAE,UAAU;EACtB,WAAW,EAAE,uBAAuB;EACpC,SAAS,EAAE,IAAI;EACf,OAAO,EAAE,IAAI;EAEb,oBAAE;IACE,UAAU,EAAE,UAAU;EAG1B,oBAAE;IACE,SAAS,EAAE,IAAI;EAGnB,+BAAa;IACT,SAAS,EAAE,IAAI;IACf,UAAU,EAAE,cAAc;IAC1B,QAAQ,EAAE,QAAQ;IAClB,UAAU,EAAE,MAAM;IAClB,MAAM,EAAE,aAAa;IAErB,oCAAK;MACD,GAAG,EAAE,KAAK;MACV,QAAQ,EAAE,QAAQ;MAClB,UAAU,EAAE,OAAO;MACnB,OAAO,EAAE,MAAM;EAIvB,8BAAY;IACR,OAAO,EAAE,IAAI;IAEb,uCAAS;MACL,KAAK,EAAE,kBAAkB;MACzB,aAAa,EAAE,IAAI;MACnB,SAAS,EAAE,MAAM;IAGrB,0CAAY;MACR,KAAK,EAAE,KAAK;MACZ,WAAW,EAAE,IAAI;MAEjB,yDAAe;QACX,UAAU,EAAE,CAAC;QACb,KAAK,EAAE,IAAI;IAInB,6FAAgC;MAC5B,UAAU,EAAE,IAAI;MAChB,OAAO,EAAE,SAAS;MAClB,OAAO,EAAE,EAAE;MACX,aAAa,EAAE,IAAI;MACnB,kBAAkB,EAAE,WAAW;MAC/B,eAAe,EAAE,WAAW;MAC5B,UAAU,EAAE,WAAW;MAGvB,yGAAQ;QACJ,OAAO,EAAE,CAAC;MAGd,mGAAG;QACC,UAAU,EAAE,CAAC;QACb,OAAO,EAAE,IAAI;QACb,+GAAM;UACF,KAAK,EAAE,IAAI;UACX,MAAM,EAAE,IAAI;UAEZ,uHAAI;YACA,SAAS,EAAE,IAAI;YACf,MAAM,E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B,aAAa,EAAE,IAAI;EACnB,eAAe,EAAE,qCAAiC;EAClD,kBAAkB,EAAG,qCAAiC;EACtD,UAAU,EAAE,qCAAiC;EAE7C,oBAAE;IACE,SAAS,EAAE,IAAI;EAGnB,uBAAO;IACH,UAAU,EAAE,0CAA0C;IACtD,eAAe,EAAE,OAAO;IACxB,eAAe,EAAE,IAAI;IACrB,kBAAkB,EAAG,IAAI;IACzB,UAAU,EAAE,IAAI;EAGpB,uBAAO;IACH,UAAU,EAAE,6CAA6C;IACzD,eAAe,EAAE,OAAO;EAG5B,0BAAQ;IACJ,MAAM,EAAE,OAAO;IACf,eAAe,EAAE,IAAI;IACrB,WAAW,EAAE,MAAM;IACnB,MAAM,EAAE,CAAC;IACT,aAAa,EAAE,GAAG;IAClB,gBAAgB,EAAE,OAAO;IACzB,KAAK,EAAE,IAAI;IACX,OAAO,EAAE,SAAS;IAClB,cAAc,EAAE,SAAS;IACzB,WAAW,EAAE,IAAI;IACjB,kBAAkB,EAAE,cAAc;IAClC,eAAe,EAAE,cAAc;IAC/B,UAAU,EAAE,cAAc;IAE1B,gCAAQ;MACJ,gBAAgB,EAAE,OAAmB",
4
  "sources": ["admin.scss"],
5
  "names": [],
6
  "file": "admin.css"
css/admin.scss CHANGED
@@ -128,6 +128,7 @@
128
  }
129
 
130
  input[type="text"], textarea, select {
 
131
  width: 100%;
132
  margin-left: 0;
133
  border-radius: 4px;
@@ -159,7 +160,9 @@
159
 
160
  select {
161
  height: 39px;
 
162
  }
 
163
  }
164
 
165
  .button.button-primary {
128
  }
129
 
130
  input[type="text"], textarea, select {
131
+ box-sizing: content-box;
132
  width: 100%;
133
  margin-left: 0;
134
  border-radius: 4px;
160
 
161
  select {
162
  height: 39px;
163
+ padding: 3px 7px;
164
  }
165
+
166
  }
167
 
168
  .button.button-primary {
pb-seo-friendly-images.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: PB SEO Friendly Images
4
  Plugin URI: https://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: 2.2.2
7
  Author: Pascal Bajorat
8
  Author URI: https://www.pascal-bajorat.com
9
  Text Domain: pb-seo-friendly-images
@@ -30,16 +30,14 @@ if( ! defined('pbsfi_plugin_pro_path') ) {
30
  define('pbsfi_plugin_pro_path', pbsfi_plugin_path.'inc'.DIRECTORY_SEPARATOR.'pro.php');
31
  }
32
 
33
-
34
-
35
  require_once 'inc'.DIRECTORY_SEPARATOR.'pbSettingsFramework.php';
36
 
37
  if( !class_exists('pbSEOFriendlyImages') ):
38
 
39
  class pbSEOFriendlyImages
40
  {
41
- public static $verMajor = '2.2';
42
- public static $verMinor = '2';
43
 
44
  public static $basename = false;
45
  public static $userSettings = array();
@@ -235,6 +233,7 @@ if( !class_exists('pbSEOFriendlyImages') ):
235
  return $content;
236
 
237
  $charset = DB_CHARSET || 'utf-8';
 
238
 
239
  $document = new DOMDocument();
240
  if( function_exists('mb_convert_encoding') ) {
@@ -271,9 +270,12 @@ if( !class_exists('pbSEOFriendlyImages') ):
271
  $imageID
272
  ));
273
 
 
 
274
  $tag->setAttribute('alt', $alt);
275
  } else {
276
  $alt = trim($tag->getAttribute('alt'));
 
277
  }
278
 
279
  if( pbSEOFriendlyImages::$userSettings['override_title'] ) {
@@ -284,9 +286,12 @@ if( !class_exists('pbSEOFriendlyImages') ):
284
  $imageID
285
  ));
286
 
 
 
287
  $tag->setAttribute('title', $title);
288
  } else {
289
  $title = trim($tag->getAttribute('title'));
 
290
  }
291
 
292
  /**
@@ -294,11 +299,13 @@ if( !class_exists('pbSEOFriendlyImages') ):
294
  */
295
  if( !empty($alt) && empty($title) && (pbSEOFriendlyImages::$userSettings['sync_method'] == 'both' || pbSEOFriendlyImages::$userSettings['sync_method'] == 'alt' ) ) {
296
 
 
297
  $tag->setAttribute('title', $alt);
298
  $title = $alt;
299
 
300
  } else if( empty($alt) && !empty($title) && (pbSEOFriendlyImages::$userSettings['sync_method'] == 'both' || pbSEOFriendlyImages::$userSettings['sync_method'] == 'title' ) ) {
301
 
 
302
  $tag->setAttribute('alt', $title);
303
  $alt = $title;
304
 
@@ -314,6 +321,7 @@ if( !class_exists('pbSEOFriendlyImages') ):
314
  $imageID
315
  ));
316
 
 
317
  $tag->setAttribute('alt', $alt);
318
  }
319
 
@@ -324,6 +332,7 @@ if( !class_exists('pbSEOFriendlyImages') ):
324
  $imageID
325
  ));
326
 
 
327
  $tag->setAttribute('title', $title);
328
  }
329
  }
@@ -352,8 +361,8 @@ if( !class_exists('pbSEOFriendlyImages') ):
352
  /// Get title
353
  $title = get_post_field( 'post_title', $parent);
354
 
355
- $attr['alt'] = $title;
356
- $attr['title'] = $title;
357
 
358
  return $attr;
359
  }
@@ -392,6 +401,9 @@ if( !class_exists('pbSEOFriendlyImages') ):
392
 
393
  }
394
 
 
 
 
395
  return $attr;
396
  }
397
 
3
  Plugin Name: PB SEO Friendly Images
4
  Plugin URI: https://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: 2.3.0
7
  Author: Pascal Bajorat
8
  Author URI: https://www.pascal-bajorat.com
9
  Text Domain: pb-seo-friendly-images
30
  define('pbsfi_plugin_pro_path', pbsfi_plugin_path.'inc'.DIRECTORY_SEPARATOR.'pro.php');
31
  }
32
 
 
 
33
  require_once 'inc'.DIRECTORY_SEPARATOR.'pbSettingsFramework.php';
34
 
35
  if( !class_exists('pbSEOFriendlyImages') ):
36
 
37
  class pbSEOFriendlyImages
38
  {
39
+ public static $verMajor = '2.3';
40
+ public static $verMinor = '0';
41
 
42
  public static $basename = false;
43
  public static $userSettings = array();
233
  return $content;
234
 
235
  $charset = DB_CHARSET || 'utf-8';
236
+ $charset = apply_filters('pbsfi-charset', $charset);
237
 
238
  $document = new DOMDocument();
239
  if( function_exists('mb_convert_encoding') ) {
270
  $imageID
271
  ));
272
 
273
+ $alt = apply_filters('pbsfi-alt', $alt);
274
+
275
  $tag->setAttribute('alt', $alt);
276
  } else {
277
  $alt = trim($tag->getAttribute('alt'));
278
+ $alt = apply_filters('pbsfi-alt', $alt);
279
  }
280
 
281
  if( pbSEOFriendlyImages::$userSettings['override_title'] ) {
286
  $imageID
287
  ));
288
 
289
+ $title = apply_filters('pbsfi-title', $title);
290
+
291
  $tag->setAttribute('title', $title);
292
  } else {
293
  $title = trim($tag->getAttribute('title'));
294
+ $title = apply_filters('pbsfi-title', $title);
295
  }
296
 
297
  /**
299
  */
300
  if( !empty($alt) && empty($title) && (pbSEOFriendlyImages::$userSettings['sync_method'] == 'both' || pbSEOFriendlyImages::$userSettings['sync_method'] == 'alt' ) ) {
301
 
302
+ $alt = apply_filters('pbsfi-title', $alt);
303
  $tag->setAttribute('title', $alt);
304
  $title = $alt;
305
 
306
  } else if( empty($alt) && !empty($title) && (pbSEOFriendlyImages::$userSettings['sync_method'] == 'both' || pbSEOFriendlyImages::$userSettings['sync_method'] == 'title' ) ) {
307
 
308
+ $title = apply_filters('pbsfi-alt', $title);
309
  $tag->setAttribute('alt', $title);
310
  $alt = $title;
311
 
321
  $imageID
322
  ));
323
 
324
+ $alt = apply_filters('pbsfi-alt', $alt);
325
  $tag->setAttribute('alt', $alt);
326
  }
327
 
332
  $imageID
333
  ));
334
 
335
+ $title = apply_filters('pbsfi-title', $title);
336
  $tag->setAttribute('title', $title);
337
  }
338
  }
361
  /// Get title
362
  $title = get_post_field( 'post_title', $parent);
363
 
364
+ $attr['alt'] = apply_filters('pbsfi-wc-alt', $title);
365
+ $attr['title'] = apply_filters('pbsfi-wc-title', $title);
366
 
367
  return $attr;
368
  }
401
 
402
  }
403
 
404
+ $attr['alt'] = apply_filters('pbsfi-alt', $attr['alt']);
405
+ $attr['title'] = apply_filters('pbsfi-title', $attr['title']);
406
+
407
  return $attr;
408
  }
409
 
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: pascalbajorat
3
  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.8
7
- Stable tag: 2.2.2
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -42,6 +42,10 @@ If you have any questions or problems, you can ask me: [Pascal Bajorat - Webdesi
42
 
43
  == Changelog ==
44
 
 
 
 
 
45
  = 2.2.2 =
46
  * Fixed a bug with The Events Calendar plugin
47
  * Fixed a bug with Facebook Instant Articles and RSS Feeds
@@ -101,4 +105,4 @@ If you have any questions or problems, you can ask me: [Pascal Bajorat - Webdesi
101
 
102
  == License ==
103
 
104
- GNU General Public License v.3 - http://www.gnu.org/licenses/gpl-3.0.html
3
  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.8.1
7
+ Stable tag: 2.3.0
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
42
 
43
  == Changelog ==
44
 
45
+ = 2.3.0 =
46
+ * Fixed a Firefox bug
47
+ * Added Filter to the core functions. You can use "pbsfi-alt", "pbsfi-title", "pbsfi-wc-alt" and "pbsfi-wc-title" as filter to change the attributes of your images in a more custom way. The "wc" filter is specially for the woocommerce attributes of the pro version.
48
+
49
  = 2.2.2 =
50
  * Fixed a bug with The Events Calendar plugin
51
  * Fixed a bug with Facebook Instant Articles and RSS Feeds
105
 
106
  == License ==
107
 
108
+ GNU General Public License v.3 - http://www.gnu.org/licenses/gpl-3.0.html