WP External Links (nofollow new tab seo) - Version 0.20

Version Description

  • Put icon styles in external stylesheet
  • Can use "ext-icon-..." to show a specific icon on a link
  • Added option to set your own No-Icon class
  • Made "Class" optional, so it's not used for showing icons anymore
  • Added 3 more icons
Download this release

Release Info

Developer freelancephp
Plugin Icon 128x128 WP External Links (nofollow new tab seo)
Version 0.20
Comparing to
See all releases

Code changes from version 0.12 to 0.20

css/external-links.css ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* WP External Links Plugin */
2
+ .ext-icon-1 { background: url( ../images/external-1.png ) no-repeat 100% 50%; padding-right: 15px; }
3
+ .ext-icon-2 { background: url( ../images/external-2.png ) no-repeat 100% 50%; padding-right: 15px; }
4
+ .ext-icon-3 { background: url( ../images/external-3.png ) no-repeat 100% 50%; padding-right: 15px; }
5
+ .ext-icon-4 { background: url( ../images/external-4.png ) no-repeat 100% 50%; padding-right: 15px; }
6
+ .ext-icon-5 { background: url( ../images/external-5.png ) no-repeat 100% 50%; padding-right: 15px; }
7
+ .ext-icon-6 { background: url( ../images/external-6.png ) no-repeat 100% 50%; padding-right: 15px; }
8
+ .ext-icon-7 { background: url( ../images/external-7.png ) no-repeat 100% 50%; padding-right: 15px; }
9
+ .ext-icon-8 { background: url( ../images/external-8.png ) no-repeat 100% 50%; padding-right: 15px; }
10
+ .ext-icon-9 { background: url( ../images/external-9.png ) no-repeat 100% 50%; padding-right: 15px; }
11
+ .ext-icon-10 { background: url( ../images/external-10.png ) no-repeat 100% 50%; padding-right: 15px; }
12
+ .ext-icon-11 { background: url( ../images/external-11.png ) no-repeat 100% 50%; padding-right: 15px; }
13
+ .ext-icon-12 { background: url( ../images/external-12.png ) no-repeat 100% 50%; padding-right: 15px; }
14
+ .ext-icon-13 { background: url( ../images/external-13.png ) no-repeat 100% 50%; padding-right: 15px; }
15
+ .ext-icon-14 { background: url( ../images/external-14.png ) no-repeat 100% 50%; padding-right: 15px; }
16
+ .ext-icon-15 { background: url( ../images/external-15.png ) no-repeat 100% 50%; padding-right: 15px; }
17
+ .ext-icon-16 { background: url( ../images/external-16.png ) no-repeat 100% 50%; padding-right: 15px; }
18
+ .ext-icon-17 { background: url( ../images/external-17.png ) no-repeat 100% 50%; padding-right: 15px; }
19
+ .ext-icon-18 { background: url( ../images/external-18.png ) no-repeat 100% 50%; padding-right: 15px; }
20
+ .ext-icon-19 { background: url( ../images/external-19.png ) no-repeat 100% 50%; padding-right: 15px; }
21
+ .ext-icon-20 { background: url( ../images/external-20.png ) no-repeat 100% 0; padding-right: 12px; }
images/external-12_1.png DELETED
Binary file
images/external-13_1.png DELETED
Binary file
images/external-14_1.png DELETED
Binary file
images/external-15_1.png DELETED
Binary file
images/external-18.png ADDED
Binary file
images/external-19.png ADDED
Binary file
images/external-20.png ADDED
Binary file
js/external-links.js CHANGED
@@ -1,4 +1,4 @@
1
- // WP External Links Plugin
2
  (function( w, $ ){
3
 
4
  var addEvt = function ( el, evt, fn ) {
1
+ /* WP External Links Plugin */
2
  (function( w, $ ){
3
 
4
  var addEvt = function ( el, evt, fn ) {
readme.txt CHANGED
@@ -3,9 +3,9 @@ Contributors: freelancephp
3
  Tags: links, external, new window, icon, target, _blank, _new, rel, nofollow, javascript, xhtml strict
4
  Requires at least: 2.7.0
5
  Tested up to: 3.1.0
6
- Stable tag: 0.12
7
 
8
- Manage the external links on your site: opening in a new window, set link icon, set "external" and/or "nofollow", set css-class.
9
 
10
  == Description ==
11
 
@@ -15,7 +15,7 @@ Manage the external links on your site.
15
  * Opening external links in a new window
16
  * Adding "external" and/or "nofollow" value to rel-attribute
17
  * Choose an icon for external links
18
- * Add a css Class-name
19
  * Unobtrusive JavaScript method wich is XHTML Strict compliant
20
  * Supports PHP4.3+ and up to latest WP version
21
 
@@ -37,6 +37,13 @@ More info at [FreelancePHP.net](http://www.freelancephp.net/wp-external-links-pl
37
 
38
  == Changelog ==
39
 
 
 
 
 
 
 
 
40
  = 0.12 =
41
  * Options are organized more logical
42
  * Added some more icons
3
  Tags: links, external, new window, icon, target, _blank, _new, rel, nofollow, javascript, xhtml strict
4
  Requires at least: 2.7.0
5
  Tested up to: 3.1.0
6
+ Stable tag: 0.20
7
 
8
+ Manage the external links on your site: opening in a new window, set link icon, set "external" and/or "nofollow", set No-Icon or additional css-class.
9
 
10
  == Description ==
11
 
15
  * Opening external links in a new window
16
  * Adding "external" and/or "nofollow" value to rel-attribute
17
  * Choose an icon for external links
18
+ * Choose a No-Icon class and an additional class (for your own styling)
19
  * Unobtrusive JavaScript method wich is XHTML Strict compliant
20
  * Supports PHP4.3+ and up to latest WP version
21
 
37
 
38
  == Changelog ==
39
 
40
+ = 0.20 =
41
+ * Put icon styles in external stylesheet
42
+ * Can use "ext-icon-..." to show a specific icon on a link
43
+ * Added option to set your own No-Icon class
44
+ * Made "Class" optional, so it's not used for showing icons anymore
45
+ * Added 3 more icons
46
+
47
  = 0.12 =
48
  * Options are organized more logical
49
  * Added some more icons
screenshot-1.png CHANGED
Binary file
wp-external-links.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: WP External Links
4
  Plugin URI: http://www.freelancephp.net/
5
  Description: Manage the external links on your site: opening in a new window, set link icon, set "external", set "nofollow", set css-class.
6
  Author: Victor Villaverde Laan
7
- Version: 0.12
8
  Author URI: http://www.freelancephp.net
9
  License: Dual licensed under the MIT and GPL licenses
10
  */
@@ -15,6 +15,12 @@ License: Dual licensed under the MIT and GPL licenses
15
  */
16
  class WP_External_Links {
17
 
 
 
 
 
 
 
18
  /**
19
  * Used as prefix for options entry and could be used as text domain (for translations)
20
  * @var string
@@ -22,11 +28,13 @@ class WP_External_Links {
22
  var $domain = 'WP_External_Links';
23
 
24
  /**
 
25
  * @var string
26
  */
27
  var $options_name = 'WP_External_Links_options';
28
 
29
  /**
 
30
  * @var array
31
  */
32
  var $options = array(
@@ -36,7 +44,8 @@ class WP_External_Links {
36
  'external' => TRUE,
37
  'nofollow' => TRUE,
38
  'icon' => 1,
39
- 'class_name' => 'external-link',
 
40
  );
41
 
42
  /**
@@ -97,9 +106,12 @@ class WP_External_Links {
97
  // add wp_head for setting js vars and css style
98
  add_action( 'wp_head', array( $this, 'wp_head' ) );
99
 
 
 
 
100
  // set js file
101
  if ( $this->options[ 'use_js' ] ) {
102
- wp_enqueue_script( 'external-links', plugins_url( 'js/external-links.js', __FILE__ ), array( 'jquery' ), '0.11' );
103
  }
104
  }
105
  }
@@ -108,40 +120,41 @@ class WP_External_Links {
108
  * Callback wp_head
109
  */
110
  function wp_head() {
 
111
  ?>
112
- <?php if ( $this->options[ 'use_js' ] ): ?>
113
- <!-- JS External Links Plugin -->
114
- <script language="javascript">
115
- /* <![CDATA[ */
116
  var gExtLinks = {
117
  baseUrl: '<?php echo get_bloginfo( 'url' ) ?>',
118
  target: '<?php echo $this->options[ 'target' ] ?>'
119
  };
120
- /* ]]> */
121
- </script>
122
- <!-- /JS External Links Plugin -->
123
- <?php endif; ?>
124
- <?php if ( $this->options[ 'class_name' ] AND $this->options[ 'icon' ] > 0 ): ?>
125
- <!-- Style External Links Plugin -->
126
- <style type="text/css">
127
- .<?php echo $this->options[ 'class_name' ] ?> {
128
- background: url( <?php echo plugins_url( 'images/external-'. $this->options[ 'icon' ] .'.png', __FILE__ ) ?> ) no-repeat right center;
129
- padding-right: 15px;
130
- };
131
- </style>
132
- <!-- /Style External Links Plugin -->
133
- <?php endif; ?>
134
  <?php
 
135
  }
136
 
137
  /**
138
  * Filter content
 
 
139
  */
140
  function filter_content( $content ) {
 
 
 
 
 
 
 
141
  $a_pattern = '/<[aA](.*?)>(.*?)<\/[aA][\s+]*>/i';
142
  return preg_replace_callback( $a_pattern, array( $this, 'parse_link' ), $content );
143
  }
144
 
 
 
 
 
 
145
  function parse_link( $match ) {
146
  $attrs = shortcode_parse_atts( $match[ 1 ] );
147
 
@@ -168,7 +181,16 @@ var gExtLinks = {
168
  : $attrs[ 'rel' ] .' nofollow';
169
  }
170
 
171
- // set class
 
 
 
 
 
 
 
 
 
172
  if ( ! empty( $this->options[ 'class_name' ] ) AND ( empty( $attrs[ 'class' ] ) OR strpos( $attrs[ 'class' ], $this->options[ 'class_name' ] ) === FALSE ) ){
173
  $attrs[ 'class' ] = ( empty( $attrs[ 'class' ] ) )
174
  ? $this->options[ 'class_name' ]
@@ -214,10 +236,20 @@ var gExtLinks = {
214
  ?>
215
  <script language="javascript">
216
  jQuery(function( $ ){
217
- $( 'input#new_window' ).change(function(){
218
- var anim = $( this ).attr( 'checked' ) ? 'slideDown' : 'slideUp';
219
- $( 'div.new_window_options' )[ anim ]();
220
- })
 
 
 
 
 
 
 
 
 
 
221
  })
222
  </script>
223
  <div class="wrap">
@@ -244,28 +276,29 @@ jQuery(function( $ ){
244
  <td>
245
  <label><input type="checkbox" name="<?php echo $this->options_name ?>[new_window]" id="new_window" value="1" <?php checked( '1', (int) $options['new_window'] ); ?> />
246
  <span><?php _e( 'Open external links in a new window (or tab)', $this->domain ) ?></span></label>
247
- <div class="new_window_options">
248
- <p><label><input type="checkbox" name="<?php echo $this->options_name ?>[use_js]" value="1" <?php checked( '1', (int) $options['use_js'] ); ?> />
249
- <span><?php _e( 'Use JavaScript method (for XHTML Strict compliance)', $this->domain ) ?></span></label>
250
- </p><p><span><?php _e( 'Target:', $this->domain ) ?></span>
251
- <br/><label><input type="radio" name="<?php echo $this->options_name ?>[target]" value="_blank" <?php checked( '_blank', $options['target'] ); ?> />
252
- <span><?php _e( '_blank, opens every external link in a new window (or tab)', $this->domain ) ?></span></label>
253
- <br/><label><input type="radio" name="<?php echo $this->options_name ?>[target]" value="_new" <?php checked( '_new', $options['target'] ); ?> />
254
- <span><?php _e( '_new, opens all external link in the same new window (or tab)', $this->domain ) ?></span></label>
255
- </p>
 
256
  </div>
257
  </td>
258
  </tr>
259
  <tr>
260
  <th><?php _e( 'Add "external"', $this->domain ) ?></th>
261
  <td><label><input type="checkbox" id="<?php echo $this->options_name ?>[external]" name="<?php echo $this->options_name ?>[external]" value="1" <?php checked('1', (int) $options['external']); ?> />
262
- <span><?php _e( 'Automatically add "external" to the rel-attribute of external links <code>rel="external"</code>', $this->domain ) ?></span></label>
263
  </td>
264
  </tr>
265
  <tr>
266
  <th><?php _e( 'Add "nofollow"', $this->domain ) ?></th>
267
  <td><label><input type="checkbox" id="<?php echo $this->options_name ?>[nofollow]" name="<?php echo $this->options_name ?>[nofollow]" value="1" <?php checked('1', (int) $options['nofollow']); ?> />
268
- <span><?php _e( 'Automatically add "nofollow" to the rel-attribute of external links <code>rel="nofollow"</code> (except to links that already contain "follow")', $this->domain ) ?></span></label>
269
  </td>
270
  </tr>
271
  </table>
@@ -283,31 +316,41 @@ jQuery(function( $ ){
283
  <div class="inside">
284
  <fieldset class="options">
285
  <table class="form-table">
286
- <tr>
287
- <th><?php _e( 'Classname', $this->domain ) ?></th>
288
- <td><label><input type="text" id="<?php echo $this->options_name ?>[class_name]" name="<?php echo $this->options_name ?>[class_name]" value="<?php echo $options['class_name']; ?>" />
289
- <span><?php _e( 'Add this classname to external links (or leave blank)', $this->domain ) ?></span></label></td>
290
- </tr>
291
  <tr>
292
  <th><?php _e( 'Show icon', $this->domain ) ?>
293
  </th>
294
  <td>
295
- <div style="width:74%;float:right"><?php _e( 'Icon Example:', $this->domain ) ?>
296
- <br/>
297
- <br/><img src="<?php echo plugins_url( 'images/link-icon-example.png', __FILE__ ) ?>" />
298
- <br/>
299
- <br/><span class="description"><?php _e( 'Note: icon only works if classname is given', $this->domain ) ?></span>
300
- </div>
301
- <div style="width:25%;float:left">
302
- <label><input type="radio" name="<?php echo $this->options_name ?>[icon]" value="0" <?php checked('0', (int) $options['icon']); ?> />
303
- <span><?php _e( 'No icon', $this->domain ) ?></span></label>
304
- <?php for ( $x = 1; $x <= 17; $x++ ): ?>
305
- <br/><label><input type="radio" name="<?php echo $this->options_name ?>[icon]" value="<?php echo $x ?>" <?php checked( $x, (int) $options['icon'] ); ?> />
306
- <img src="<?php echo plugins_url( 'images/external-'. $x .'.png', __FILE__ ) ?>" /></label>
307
- <?php endfor; ?>
 
 
 
 
 
308
  </div>
309
  </td>
310
  </tr>
 
 
 
 
 
 
 
 
 
 
311
  </table>
312
  </fieldset>
313
  <p class="submit">
@@ -322,7 +365,7 @@ jQuery(function( $ ){
322
  <div style="margin:0 5px;">
323
  <div class="postbox">
324
  <div class="handlediv" title="<?php _e( 'Click to toggle' ) ?>"><br/></div>
325
- <h3 class="hndle"><?php _e( 'About' ) ?> WP External Links</h3>
326
  <div class="inside">
327
  <ul>
328
  <li><a href="<?php echo plugins_url( 'readme.txt', __FILE__ ) ?>" target="_blank">readme.txt</a></li>
@@ -381,6 +424,9 @@ jQuery(function( $ ){
381
  $this->options['external'] = ! empty( $saved_options['external'] );
382
  $this->options['nofollow'] = ! empty( $saved_options['nofollow'] );
383
  $this->options['icon'] = $saved_options['icon'];
 
 
 
384
  $this->options['class_name'] = $saved_options['class_name'];
385
  }
386
  }
4
  Plugin URI: http://www.freelancephp.net/
5
  Description: Manage the external links on your site: opening in a new window, set link icon, set "external", set "nofollow", set css-class.
6
  Author: Victor Villaverde Laan
7
+ Version: 0.20
8
  Author URI: http://www.freelancephp.net
9
  License: Dual licensed under the MIT and GPL licenses
10
  */
15
  */
16
  class WP_External_Links {
17
 
18
+ /**
19
+ * Current version
20
+ * @var string
21
+ */
22
+ var $version = '0.20';
23
+
24
  /**
25
  * Used as prefix for options entry and could be used as text domain (for translations)
26
  * @var string
28
  var $domain = 'WP_External_Links';
29
 
30
  /**
31
+ * Name of the options
32
  * @var string
33
  */
34
  var $options_name = 'WP_External_Links_options';
35
 
36
  /**
37
+ * Options to be saved
38
  * @var array
39
  */
40
  var $options = array(
44
  'external' => TRUE,
45
  'nofollow' => TRUE,
46
  'icon' => 1,
47
+ 'no_icon_class' => 'no-ext-icon',
48
+ 'class_name' => 'ext-link',
49
  );
50
 
51
  /**
106
  // add wp_head for setting js vars and css style
107
  add_action( 'wp_head', array( $this, 'wp_head' ) );
108
 
109
+ // add stylesheet
110
+ wp_enqueue_style( 'wp-external-links', plugins_url( 'css/external-links.css', __FILE__ ), FALSE, $this->version );
111
+
112
  // set js file
113
  if ( $this->options[ 'use_js' ] ) {
114
+ wp_enqueue_script( 'wp-external-links', plugins_url( 'js/external-links.js', __FILE__ ), array( 'jquery' ), $this->version );
115
  }
116
  }
117
  }
120
  * Callback wp_head
121
  */
122
  function wp_head() {
123
+ if ( $this->options[ 'use_js' ] ):
124
  ?>
125
+ <script language="javascript">/* <![CDATA[ */
126
+ /* WP External Links Plugin */
 
 
127
  var gExtLinks = {
128
  baseUrl: '<?php echo get_bloginfo( 'url' ) ?>',
129
  target: '<?php echo $this->options[ 'target' ] ?>'
130
  };
131
+ /* ]]> */</script>
 
 
 
 
 
 
 
 
 
 
 
 
 
132
  <?php
133
+ endif;
134
  }
135
 
136
  /**
137
  * Filter content
138
+ * @param string $content
139
+ * @return string
140
  */
141
  function filter_content( $content ) {
142
+ // remove style when no icon classes are found
143
+ if ( strpos( $content, 'ext-icon-' ) == FALSE ) {
144
+ // remove style with id wp-external-links-css
145
+ $content = preg_replace( '/<link(.*?)wp-external-links-css(.*?)\/>[\s+]*/i','' ,$content );
146
+ }
147
+
148
+ // get <a> elements
149
  $a_pattern = '/<[aA](.*?)>(.*?)<\/[aA][\s+]*>/i';
150
  return preg_replace_callback( $a_pattern, array( $this, 'parse_link' ), $content );
151
  }
152
 
153
+ /**
154
+ * Make a clean <a> code
155
+ * @param array $match Result of a preg call in filter_content()
156
+ * @return string Clean <a> code
157
+ */
158
  function parse_link( $match ) {
159
  $attrs = shortcode_parse_atts( $match[ 1 ] );
160
 
181
  : $attrs[ 'rel' ] .' nofollow';
182
  }
183
 
184
+ // set icon class, unless no-icon class isset or another icon class ('ext-icon-...') is found
185
+ if ( $this->options[ 'icon' ] > 0 AND ( empty( $this->options[ 'no_icon_class' ] ) OR strpos( $attrs[ 'class' ], $this->options[ 'no_icon_class' ] ) === FALSE ) AND strpos( $attrs[ 'class' ], 'ext-icon-' ) === FALSE ){
186
+ $icon_class = 'ext-icon-'. $this->options[ 'icon' ];
187
+
188
+ $attrs[ 'class' ] = ( empty( $attrs[ 'class' ] ) )
189
+ ? $icon_class
190
+ : $attrs[ 'class' ] .' '. $icon_class;
191
+ }
192
+
193
+ // set user-defined class
194
  if ( ! empty( $this->options[ 'class_name' ] ) AND ( empty( $attrs[ 'class' ] ) OR strpos( $attrs[ 'class' ], $this->options[ 'class_name' ] ) === FALSE ) ){
195
  $attrs[ 'class' ] = ( empty( $attrs[ 'class' ] ) )
196
  ? $this->options[ 'class_name' ]
236
  ?>
237
  <script language="javascript">
238
  jQuery(function( $ ){
239
+ // remove message
240
+ $( '.settings-error' )
241
+ .hide()
242
+ .slideDown( 600 )
243
+ .delay( 3000 )
244
+ .slideUp( 600 );
245
+
246
+ // option slide effect
247
+ $( 'input#new_window' )
248
+ .change(function(){
249
+ var anim = $( this ).attr( 'checked' ) ? 'slideDown' : 'slideUp';
250
+ $( 'div.new_window_options' )[ anim ]();
251
+ })
252
+ .change();
253
  })
254
  </script>
255
  <div class="wrap">
276
  <td>
277
  <label><input type="checkbox" name="<?php echo $this->options_name ?>[new_window]" id="new_window" value="1" <?php checked( '1', (int) $options['new_window'] ); ?> />
278
  <span><?php _e( 'Open external links in a new window (or tab)', $this->domain ) ?></span></label>
279
+ <div class="new_window_options" style="display:none">
280
+ <p><label><input type="checkbox" name="<?php echo $this->options_name ?>[use_js]" value="1" <?php checked( '1', (int) $options['use_js'] ); ?> />
281
+ <span><?php _e( 'Use JavaScript method (for XHTML Strict compliance)', $this->domain ) ?></span></label>
282
+ </p>
283
+ <p><span><?php _e( 'Target:', $this->domain ) ?></span>
284
+ <br/><label><input type="radio" name="<?php echo $this->options_name ?>[target]" value="_blank" <?php checked( '_blank', $options['target'] ); ?> />
285
+ <span><?php _e( '<code>_blank</code>, opens every external link in a new window (or tab)', $this->domain ) ?></span></label>
286
+ <br/><label><input type="radio" name="<?php echo $this->options_name ?>[target]" value="_new" <?php checked( '_new', $options['target'] ); ?> />
287
+ <span><?php _e( '<code>_new</code>, opens all external link in the same new window (or tab)', $this->domain ) ?></span></label>
288
+ </p>
289
  </div>
290
  </td>
291
  </tr>
292
  <tr>
293
  <th><?php _e( 'Add "external"', $this->domain ) ?></th>
294
  <td><label><input type="checkbox" id="<?php echo $this->options_name ?>[external]" name="<?php echo $this->options_name ?>[external]" value="1" <?php checked('1', (int) $options['external']); ?> />
295
+ <span><?php _e( 'Automatically add <code>"external"</code> to the rel-attribute of external links', $this->domain ) ?></span></label>
296
  </td>
297
  </tr>
298
  <tr>
299
  <th><?php _e( 'Add "nofollow"', $this->domain ) ?></th>
300
  <td><label><input type="checkbox" id="<?php echo $this->options_name ?>[nofollow]" name="<?php echo $this->options_name ?>[nofollow]" value="1" <?php checked('1', (int) $options['nofollow']); ?> />
301
+ <span><?php _e( 'Automatically add <code>"nofollow"</code> to the rel-attribute of external links (except to links that already contain <code>"follow"</code>)', $this->domain ) ?></span></label>
302
  </td>
303
  </tr>
304
  </table>
316
  <div class="inside">
317
  <fieldset class="options">
318
  <table class="form-table">
 
 
 
 
 
319
  <tr>
320
  <th><?php _e( 'Show icon', $this->domain ) ?>
321
  </th>
322
  <td>
323
+ <div>
324
+ <div style="width:15%;float:left">
325
+ <label><input type="radio" name="<?php echo $this->options_name ?>[icon]" value="0" <?php checked('0', (int) $options['icon']); ?> />
326
+ <span><?php _e( 'No icon', $this->domain ) ?></span></label>
327
+ <?php for ( $x = 1; $x <= 20; $x++ ): ?>
328
+ <br/>
329
+ <label title="<?php _e( 'Choose this icon to show in all external links. You can also add the class \'ext-icon-'. $x .'\' to a specific link.' ) ?>"><input type="radio" name="<?php echo $this->options_name ?>[icon]" value="<?php echo $x ?>" <?php checked( $x, (int) $options['icon'] ); ?> />
330
+ <img src="<?php echo plugins_url( 'images/external-'. $x .'.png', __FILE__ ) ?>" /></label>
331
+ <?php if ( $x % 5 == 0 ): ?>
332
+ </div>
333
+ <div style="width:15%;float:left">
334
+ <?php endif; ?>
335
+ <?php endfor; ?>
336
+ </div>
337
+ <div style="width:29%;float:left;"><?php _e( 'Example:', $this->domain ) ?>
338
+ <br/><img src="<?php echo plugins_url( 'images/link-icon-example.png', __FILE__ ) ?>" />
339
+ </div>
340
+ <br style="clear:both" />
341
  </div>
342
  </td>
343
  </tr>
344
+ <tr>
345
+ <th><?php _e( 'No-Icon Class', $this->domain ) ?></th>
346
+ <td><label><input type="text" id="<?php echo $this->options_name ?>[no_icon_class]" name="<?php echo $this->options_name ?>[no_icon_class]" value="<?php echo $options['no_icon_class']; ?>" />
347
+ <span><?php _e( 'Use this class when a link should not show any icon', $this->domain ) ?></span></label></td>
348
+ </tr>
349
+ <tr>
350
+ <th><?php _e( 'Additional Class (optional)', $this->domain ) ?></th>
351
+ <td><label><input type="text" id="<?php echo $this->options_name ?>[class_name]" name="<?php echo $this->options_name ?>[class_name]" value="<?php echo $options['class_name']; ?>" />
352
+ <span><?php _e( 'Add extra class to external links (or leave blank)', $this->domain ) ?></span></label></td>
353
+ </tr>
354
  </table>
355
  </fieldset>
356
  <p class="submit">
365
  <div style="margin:0 5px;">
366
  <div class="postbox">
367
  <div class="handlediv" title="<?php _e( 'Click to toggle' ) ?>"><br/></div>
368
+ <h3 class="hndle"><?php _e( 'About' ) ?> WP External Links (v<?php echo $this->version ?>)</h3>
369
  <div class="inside">
370
  <ul>
371
  <li><a href="<?php echo plugins_url( 'readme.txt', __FILE__ ) ?>" target="_blank">readme.txt</a></li>
424
  $this->options['external'] = ! empty( $saved_options['external'] );
425
  $this->options['nofollow'] = ! empty( $saved_options['nofollow'] );
426
  $this->options['icon'] = $saved_options['icon'];
427
+ $this->options['no_icon_class'] = ( ! isset( $saved_options['no_icon_class'] ) )
428
+ ? $this->options['no_icon_class']
429
+ : $saved_options['no_icon_class'];
430
  $this->options['class_name'] = $saved_options['class_name'];
431
  }
432
  }