Post Snippets - Version 1.4.5

Version Description

Download this release

Release Info

Developer artstorm
Plugin Icon 128x128 Post Snippets
Version 1.4.5
Comparing to
See all releases

Code changes from version 1.4.4 to 1.4.5

Files changed (2) hide show
  1. post-snippets.php +5 -5
  2. readme.txt +5 -1
post-snippets.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Post Snippets
4
  Plugin URI: http://coding.cglounge.com/wordpress-plugins/post-snippets/
5
  Description: Stores snippets of HTML code or reoccurring text that you often use in your posts. You can use predefined variables to replace parts of the snippet on insert. All snippets are available in the post editor with a TinyMCE button or Quicktags.
6
- Version: 1.4.4
7
  Author: Johan Steen
8
  Author URI: http://coding.cglounge.com/
9
  Text Domain: post-snippets
@@ -243,7 +243,7 @@ JAVASCRIPT;
243
  $snippets[$i]['vars'] = trim($_POST[$i.'_vars']);
244
  $snippets[$i]['shortcode'] = $_POST[$i.'_shortcode'] == true ? true : false;
245
  $snippets[$i]['quicktag'] = $_POST[$i.'_quicktag'] == true ? true : false;
246
- $snippets[$i]['snippet'] = trim(stripslashes($_POST[$i.'_snippet']));
247
  }
248
  update_option($this->plugin_options, $snippets);
249
  $this->admin_message( __( 'Snippets have been updated.', 'post-snippets' ) );
@@ -287,8 +287,8 @@ JAVASCRIPT;
287
  <th scope="col" style="width: 180px;"><?php _e( 'Title', 'post-snippets' ) ?></th>
288
  <th scope="col" style="width: 180px;"><?php _e( 'Variables', 'post-snippets' ) ?></th>
289
  <th scope="col"><?php _e( 'Snippet', 'post-snippets' ) ?></th>
290
- <th scope="col" style="width: 16px;"><?php _e( 'SC', 'post-snippets' ) ?></th>
291
- <th scope="col" style="width: 16px;"><?php _e( 'QT', 'post-snippets' ) ?></th>
292
  </tr>
293
  </thead>
294
 
@@ -312,7 +312,7 @@ JAVASCRIPT;
312
  <th scope='row' class='check-column'><input type='checkbox' name='checked[]' value='<?php echo $i; ?>' /></th>
313
  <td class='row-title'><input type='text' name='<?php echo $i; ?>_title' value='<?php echo $snippets[$i]['title']; ?>' /></td>
314
  <td class='name'><input type='text' name='<?php echo $i; ?>_vars' value='<?php echo $snippets[$i]['vars']; ?>' /></td>
315
- <td class='desc'><textarea name="<?php echo $i; ?>_snippet" class="large-text" rows="3"><?php echo $snippets[$i]['snippet']; ?></textarea></td>
316
  <td class='name'><input type='checkbox' name='<?php echo $i; ?>_shortcode' value='true'<?php if ($snippets[$i]['shortcode'] == true) { echo " checked"; }?> /></td>
317
  <td class='name'><input type='checkbox' name='<?php echo $i; ?>_quicktag' value='true'<?php if ($snippets[$i]['quicktag'] == true) { echo " checked"; }?> /></td>
318
  </tr>
3
  Plugin Name: Post Snippets
4
  Plugin URI: http://coding.cglounge.com/wordpress-plugins/post-snippets/
5
  Description: Stores snippets of HTML code or reoccurring text that you often use in your posts. You can use predefined variables to replace parts of the snippet on insert. All snippets are available in the post editor with a TinyMCE button or Quicktags.
6
+ Version: 1.4.5
7
  Author: Johan Steen
8
  Author URI: http://coding.cglounge.com/
9
  Text Domain: post-snippets
243
  $snippets[$i]['vars'] = trim($_POST[$i.'_vars']);
244
  $snippets[$i]['shortcode'] = $_POST[$i.'_shortcode'] == true ? true : false;
245
  $snippets[$i]['quicktag'] = $_POST[$i.'_quicktag'] == true ? true : false;
246
+ $snippets[$i]['snippet'] = htmlspecialchars_decode( trim(stripslashes($_POST[$i.'_snippet'])), ENT_NOQUOTES);
247
  }
248
  update_option($this->plugin_options, $snippets);
249
  $this->admin_message( __( 'Snippets have been updated.', 'post-snippets' ) );
287
  <th scope="col" style="width: 180px;"><?php _e( 'Title', 'post-snippets' ) ?></th>
288
  <th scope="col" style="width: 180px;"><?php _e( 'Variables', 'post-snippets' ) ?></th>
289
  <th scope="col"><?php _e( 'Snippet', 'post-snippets' ) ?></th>
290
+ <th scope="col" style="width: 20px;"><?php _e( 'SC', 'post-snippets' ) ?></th>
291
+ <th scope="col" style="width: 20px;"><?php _e( 'QT', 'post-snippets' ) ?></th>
292
  </tr>
293
  </thead>
294
 
312
  <th scope='row' class='check-column'><input type='checkbox' name='checked[]' value='<?php echo $i; ?>' /></th>
313
  <td class='row-title'><input type='text' name='<?php echo $i; ?>_title' value='<?php echo $snippets[$i]['title']; ?>' /></td>
314
  <td class='name'><input type='text' name='<?php echo $i; ?>_vars' value='<?php echo $snippets[$i]['vars']; ?>' /></td>
315
+ <td class='desc'><textarea name="<?php echo $i; ?>_snippet" class="large-text" rows="3"><?php echo htmlspecialchars($snippets[$i]['snippet'], ENT_NOQUOTES); ?></textarea></td>
316
  <td class='name'><input type='checkbox' name='<?php echo $i; ?>_shortcode' value='true'<?php if ($snippets[$i]['shortcode'] == true) { echo " checked"; }?> /></td>
317
  <td class='name'><input type='checkbox' name='<?php echo $i; ?>_quicktag' value='true'<?php if ($snippets[$i]['quicktag'] == true) { echo " checked"; }?> /></td>
318
  </tr>
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://coding.cglounge.com/wordpress-plugins/post-snippets/#pintwar
4
  Tags: post, admin, snippet, html, custom, page, dynamic, editor, quicktag
5
  Requires at least: 2.7
6
  Tested up to: 2.7.1
7
- Stable tag: 1.4.4
8
 
9
  Store snippets of HTML code or reoccurring text that you often use in your posts. Custom variables can be used.
10
 
@@ -47,6 +47,10 @@ Meditation.
47
 
48
  == Changelog ==
49
 
 
 
 
 
50
  = Version 1.4.4 - 19 Apr 2009 =
51
  * Minor fix with quicktags and certain snippets that was left out in the last update.
52
 
4
  Tags: post, admin, snippet, html, custom, page, dynamic, editor, quicktag
5
  Requires at least: 2.7
6
  Tested up to: 2.7.1
7
+ Stable tag: 1.4.5
8
 
9
  Store snippets of HTML code or reoccurring text that you often use in your posts. Custom variables can be used.
10
 
47
 
48
  == Changelog ==
49
 
50
+ = Version 1.4.5 - 24 Apr 2009 =
51
+ * Fixed a problem in the admin options that didn't allow a form with a textarea to be used as a snippet.
52
+ * Widened the columns for SC and QT sligtly in the options panel so they should look a bit better on the mac.
53
+
54
  = Version 1.4.4 - 19 Apr 2009 =
55
  * Minor fix with quicktags and certain snippets that was left out in the last update.
56