Seo Optimized Images - Version 1.2

Version Description

  1. Added support to show post categores in title and alt image attributes.
Download this release

Release Info

Developer priyanshu.mittal
Plugin Icon 128x128 Seo Optimized Images
Version 1.2
Comparing to
See all releases

Code changes from version 1.1 to 1.2

readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.webriti.com/
4
  Tags: seo, images, seo for images, alt , alt tag, alt attribute, traffic, title tag, traffic, title attribute, seo optimization, optimization, image optimization, cool seo,search engine optimized images, search engine optimization, seo friendly images,seo friendly images plugin, google search optimized images,search friendly
5
  Requires at least: 3.3+
6
  Tested up to: 4.3
7
- Stable tag: 1.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -15,7 +15,7 @@ Seo Optmized Images Plugin lets you dynamically insert Seo Friendly alt and titl
15
  The **SEO Optimized Images** plugin Seo Optmized Images Plugin lets you dynamically insert Seo Friendly alt attributes and title attributes to your Images . Simply activate the plugin, provide the pattern and you are ready to go.
16
 
17
  The plugin dynamically replaces the alt tags, title tags and does not make changes to the database. So if you deactivate the plugin, everything will be back to as it was.
18
-
19
  Give **SEO Optmized Images** a try. We are sure you will like it.
20
 
21
  In case you face any problem, contact us via the [Forums](https://wordpress.org/support/plugin/seo-optimized-images).
@@ -45,6 +45,8 @@ In case you face any problem, contact us via the [Forums](https://wordpress.org/
45
 
46
  == Changelog ==
47
 
 
 
48
  = 1.1 =
49
  1. Added title tag support
50
  2. Removed background.
4
  Tags: seo, images, seo for images, alt , alt tag, alt attribute, traffic, title tag, traffic, title attribute, seo optimization, optimization, image optimization, cool seo,search engine optimized images, search engine optimization, seo friendly images,seo friendly images plugin, google search optimized images,search friendly
5
  Requires at least: 3.3+
6
  Tested up to: 4.3
7
+ Stable tag: 1.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
15
  The **SEO Optimized Images** plugin Seo Optmized Images Plugin lets you dynamically insert Seo Friendly alt attributes and title attributes to your Images . Simply activate the plugin, provide the pattern and you are ready to go.
16
 
17
  The plugin dynamically replaces the alt tags, title tags and does not make changes to the database. So if you deactivate the plugin, everything will be back to as it was.
18
+ You can insert image name, post title and post category in title an alt attributes of image.
19
  Give **SEO Optmized Images** a try. We are sure you will like it.
20
 
21
  In case you face any problem, contact us via the [Forums](https://wordpress.org/support/plugin/seo-optimized-images).
45
 
46
  == Changelog ==
47
 
48
+ = 1.2 =
49
+ 1. Added support to show post categores in title and alt image attributes.
50
  = 1.1 =
51
  1. Added title tag support
52
  2. Removed background.
seo-optimized-images-settings.php CHANGED
@@ -99,8 +99,10 @@ if(isset($_POST['submit_general_settings_tab'])){
99
  <th scope="row"><?php _e('Alt Attribute Value','seoimages');?></th>
100
  <td><input type="text" name="soi_alt_value" value="<?php echo esc_attr( $soi_options_array['soi_alt_value'] ); ?>" />
101
  <p class=""><?php _e('The Alt attributes will be dynamically replaced by the above value.', 'seoimages') ?></p>
102
- <p class=""> %name - It will insert Image Name,<br> %title- It will insert Post Title.</p>
103
-
 
 
104
  </td>
105
  </tr>
106
 
@@ -175,9 +177,10 @@ if(isset($_POST['submit_general_settings_tab'])){
175
  </div>
176
 
177
  <p><span class="description">1. The plugin dynamically replaces the alt tags with the pattern specified by you. It makes no changes to the database. </span></p>
178
- <p><span class="description">2. Since there are no changes to the databaee, one can have different alt tags for same images on different pages / posts.</span></p>
179
- <p><span class="description">3. %name - It will insert Image Name, %title- It will insert Post Title. </span></p>
180
-
 
181
  </div>
182
 
183
  <div class="inside">
99
  <th scope="row"><?php _e('Alt Attribute Value','seoimages');?></th>
100
  <td><input type="text" name="soi_alt_value" value="<?php echo esc_attr( $soi_options_array['soi_alt_value'] ); ?>" />
101
  <p class=""><?php _e('The Alt attributes will be dynamically replaced by the above value.', 'seoimages') ?></p>
102
+ <p class="">
103
+ %name - It will insert Image Name.<br> %title- It will insert Post Title.<br>
104
+ %category - It will insert Post Categories.
105
+ </p>
106
  </td>
107
  </tr>
108
 
177
  </div>
178
 
179
  <p><span class="description">1. The plugin dynamically replaces the alt tags with the pattern specified by you. It makes no changes to the database. </span></p>
180
+ <p><span class="description">2. Since there are no changes to the database, one can have different alt tags for same images on different pages / posts.</span></p>
181
+ <p><span class="description">3. %name - It will insert Image Name.</span></p>
182
+ <p><span class="description">4. %title- It will insert Post Title.</span></p>
183
+ <p><span class="description">5. %category - It will insert Post Categories. </span></p>
184
  </div>
185
 
186
  <div class="inside">
seo-optimized-images.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: SEO Optimized Images
5
  Plugin URI: http://webriti.com
6
  Description: The **SEO Optimized Images** plugin Seo Optmized Images Plugin lets you dynamically insert Seo Friendly alt attributes and title attributes to your Images . Simply activate the plugin, provide the pattern and you are ready to go.
7
- Version: 1.1
8
  Author: priyanshu.mittal
9
  Author URI: http://webriti.com
10
 
@@ -87,14 +87,29 @@ function soi_replace_tags ($content, $alt_text='',$title='')
87
  $get_file_name = pathinfo($matches[1][0]);
88
  $image_file_name = $get_file_name['filename'];
89
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
  // Replace the Values for alt tag
91
 
92
  $alt_text = str_replace('%title',$post_title,$alt_text );
93
  $alt_text = str_replace('%name',$image_file_name,$alt_text );
 
94
 
95
  // replace the values for title tag.
96
  $title_text = str_replace('%title',$post_title,$title_text );
97
  $title_text = str_replace('%name',$image_file_name,$title_text );
 
98
 
99
  //configure tags with specified values from option panel.
100
  $t = 'alt = "'.$alt_text.'"';
4
  Plugin Name: SEO Optimized Images
5
  Plugin URI: http://webriti.com
6
  Description: The **SEO Optimized Images** plugin Seo Optmized Images Plugin lets you dynamically insert Seo Friendly alt attributes and title attributes to your Images . Simply activate the plugin, provide the pattern and you are ready to go.
7
+ Version: 1.2
8
  Author: priyanshu.mittal
9
  Author URI: http://webriti.com
10
 
87
  $get_file_name = pathinfo($matches[1][0]);
88
  $image_file_name = $get_file_name['filename'];
89
 
90
+
91
+ // Get post categories
92
+ $postcategories = get_the_category();
93
+ $post_category='';
94
+ if ($postcategories) {
95
+ foreach($postcategories as $category) {
96
+ $post_category .= $category->name .' ';
97
+ }
98
+ }
99
+
100
+
101
+
102
+
103
  // Replace the Values for alt tag
104
 
105
  $alt_text = str_replace('%title',$post_title,$alt_text );
106
  $alt_text = str_replace('%name',$image_file_name,$alt_text );
107
+ $alt_text = str_replace('%category',$post_category,$alt_text );
108
 
109
  // replace the values for title tag.
110
  $title_text = str_replace('%title',$post_title,$title_text );
111
  $title_text = str_replace('%name',$image_file_name,$title_text );
112
+ $title_text = str_replace('%category',$post_category,$title_text );
113
 
114
  //configure tags with specified values from option panel.
115
  $t = 'alt = "'.$alt_text.'"';