Version Description
Note that starting with this version and moving forward, at least PHP v5.2.4 is required to run Post Snippets.
Download this release
Release Info
Developer | artstorm |
Plugin | Post Snippets |
Version | 1.9 |
Comparing to | |
See all releases |
Code changes from version 1.8.9.2 to 1.9
- classes/settings.php +3 -1
- post-snippets.php +31 -15
- readme.txt +301 -284
classes/settings.php
CHANGED
@@ -73,8 +73,10 @@ class Post_Snippets_Settings
|
|
73 |
<?php
|
74 |
$this->checkbox(__('Shortcode', 'post-snippets'), $key.'_shortcode',
|
75 |
$snippet['shortcode']);
|
|
|
|
|
|
|
76 |
?>
|
77 |
-
<!-- <input type='checkbox' name='< ?php echo $i; ? >_php' value='true'< ?php if ($snippets[$i]['php'] == true) { echo " checked"; }? > /> < ?php _e( 'PHP Code', 'post-snippets' ) ? ><br/> -->
|
78 |
</td>
|
79 |
<td class='desc'>
|
80 |
<textarea name="<?php echo $key; ?>_snippet" class="large-text" style='width: 100%;' rows="5"><?php echo htmlspecialchars($snippet['snippet'], ENT_NOQUOTES); ?></textarea>
|
73 |
<?php
|
74 |
$this->checkbox(__('Shortcode', 'post-snippets'), $key.'_shortcode',
|
75 |
$snippet['shortcode']);
|
76 |
+
|
77 |
+
$this->checkbox(__('PHP Code', 'post-snippets'), $key.'_php',
|
78 |
+
$snippet['php']);
|
79 |
?>
|
|
|
80 |
</td>
|
81 |
<td class='desc'>
|
82 |
<textarea name="<?php echo $key; ?>_snippet" class="large-text" style='width: 100%;' rows="5"><?php echo htmlspecialchars($snippet['snippet'], ENT_NOQUOTES); ?></textarea>
|
post-snippets.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Post Snippets
|
4 |
Plugin URI: http://wpstorm.net/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.
|
7 |
Author: Johan Steen
|
8 |
Author URI: http://johansteen.se/
|
9 |
Text Domain: post-snippets
|
@@ -436,19 +436,42 @@ function edOpenPostSnippets(myField) {
|
|
436 |
if ( $content != null )
|
437 |
$attributes["content"] = $content;
|
438 |
|
439 |
-
|
|
|
440 |
$snippet = str_replace("&", "&", $snippet);
|
441 |
|
442 |
foreach ($attributes as $key => $val) {
|
443 |
$snippet = str_replace("{".$key."}", $val, $snippet);
|
444 |
}
|
445 |
-
|
|
|
|
|
|
|
|
|
|
|
446 |
return do_shortcode(stripslashes($snippet));') );
|
447 |
}
|
448 |
}
|
449 |
}
|
450 |
}
|
451 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
452 |
|
453 |
/**
|
454 |
* The Admin Page and all it's functions
|
@@ -782,6 +805,7 @@ class Post_Snippets_Host_Environment
|
|
782 |
if (version_compare(PHP_VERSION, $this->MIN_PHP_VERSION, '<')) {
|
783 |
// Display notice
|
784 |
add_action( 'admin_notices', array(&$this, 'php_version_error') );
|
|
|
785 |
}
|
786 |
|
787 |
// Check if WordPress is too old
|
@@ -797,16 +821,9 @@ class Post_Snippets_Host_Environment
|
|
797 |
*/
|
798 |
function php_version_error() {
|
799 |
echo '<div class="error"><p><strong>';
|
800 |
-
printf(
|
801 |
-
'
|
802 |
-
'When Post Snippets v1.9 will be released, the minimum '.
|
803 |
-
'required PHP Version will be %1$s to be on par with WordPress 3.3.'.
|
804 |
-
'<br/>'.
|
805 |
-
'Please update your '.
|
806 |
-
'PHP installation before updating Post Snippets to v1.9+, or '.
|
807 |
-
'contact the plugin author to plead your case.<br/>'.
|
808 |
'Your installed PHP version: %2$s',
|
809 |
-
'post-snippets'),
|
810 |
$this->MIN_PHP_VERSION, PHP_VERSION);
|
811 |
echo '</strong></p></div>';
|
812 |
}
|
@@ -816,9 +833,8 @@ class Post_Snippets_Host_Environment
|
|
816 |
*/
|
817 |
function wp_version_error() {
|
818 |
echo '<div class="error"><p><strong>';
|
819 |
-
printf(
|
820 |
-
'Error: Post Snippets requires WordPress
|
821 |
-
'post-snippets'),
|
822 |
$this->MIN_WP_VERSION );
|
823 |
echo '</strong></p></div>';
|
824 |
}
|
3 |
Plugin Name: Post Snippets
|
4 |
Plugin URI: http://wpstorm.net/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.9
|
7 |
Author: Johan Steen
|
8 |
Author URI: http://johansteen.se/
|
9 |
Text Domain: post-snippets
|
436 |
if ( $content != null )
|
437 |
$attributes["content"] = $content;
|
438 |
|
439 |
+
|
440 |
+
$snippet = \''. addslashes($snippet["snippet"]) .'\';
|
441 |
$snippet = str_replace("&", "&", $snippet);
|
442 |
|
443 |
foreach ($attributes as $key => $val) {
|
444 |
$snippet = str_replace("{".$key."}", $val, $snippet);
|
445 |
}
|
446 |
+
|
447 |
+
$php = "'. $snippet["php"] .'";
|
448 |
+
if ($php == true) {
|
449 |
+
$snippet = Post_Snippets::php_eval( $snippet );
|
450 |
+
}
|
451 |
+
|
452 |
return do_shortcode(stripslashes($snippet));') );
|
453 |
}
|
454 |
}
|
455 |
}
|
456 |
}
|
457 |
|
458 |
+
/**
|
459 |
+
* Evaluate a snippet as PHP code.
|
460 |
+
*
|
461 |
+
* @since Post Snippets 1.9
|
462 |
+
* @param string $content The snippet to evaluate
|
463 |
+
* @return string The result of the evaluation
|
464 |
+
*/
|
465 |
+
public static function php_eval( $content )
|
466 |
+
{
|
467 |
+
$content = stripslashes($content);
|
468 |
+
|
469 |
+
ob_start();
|
470 |
+
eval ($content);
|
471 |
+
$content = ob_get_clean();
|
472 |
+
|
473 |
+
return addslashes( $content );
|
474 |
+
}
|
475 |
|
476 |
/**
|
477 |
* The Admin Page and all it's functions
|
805 |
if (version_compare(PHP_VERSION, $this->MIN_PHP_VERSION, '<')) {
|
806 |
// Display notice
|
807 |
add_action( 'admin_notices', array(&$this, 'php_version_error') );
|
808 |
+
$this->passed = false;
|
809 |
}
|
810 |
|
811 |
// Check if WordPress is too old
|
821 |
*/
|
822 |
function php_version_error() {
|
823 |
echo '<div class="error"><p><strong>';
|
824 |
+
printf(
|
825 |
+
'Error: Post Snippets requires PHP version %1$s or greater.<br/>'.
|
|
|
|
|
|
|
|
|
|
|
|
|
826 |
'Your installed PHP version: %2$s',
|
|
|
827 |
$this->MIN_PHP_VERSION, PHP_VERSION);
|
828 |
echo '</strong></p></div>';
|
829 |
}
|
833 |
*/
|
834 |
function wp_version_error() {
|
835 |
echo '<div class="error"><p><strong>';
|
836 |
+
printf(
|
837 |
+
'Error: Post Snippets requires WordPress version %s or greater.',
|
|
|
838 |
$this->MIN_WP_VERSION );
|
839 |
echo '</strong></p></div>';
|
840 |
}
|
readme.txt
CHANGED
@@ -1,284 +1,301 @@
|
|
1 |
-
=== Post Snippets ===
|
2 |
-
Contributors: artstorm
|
3 |
-
Donate link: http://wpstorm.net/wordpress-plugins/post-snippets/#donation
|
4 |
-
Tags: post, admin, snippet, html, custom, page, dynamic, editor,
|
5 |
-
Requires at least: 3.0
|
6 |
-
Tested up to: 3.3.1
|
7 |
-
Stable tag: 1.
|
8 |
-
|
9 |
-
Keep a snippet library of text, HTML or PHP code to be used in posts. Variables
|
10 |
-
can be set for more flexibility. Inserts directly or as shortcodes.
|
11 |
-
|
12 |
-
== Description ==
|
13 |
-
|
14 |
-
This admin plugin stores snippets of HTML code or reoccurring text that you
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
* **
|
24 |
-
|
25 |
-
* **
|
26 |
-
|
27 |
-
* **
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
*
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
=
|
55 |
-
|
56 |
-
1.
|
57 |
-
2.
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
==
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
*
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
= Version 1.8.
|
133 |
-
*
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
* Added
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
* Fixed
|
155 |
-
*
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
*
|
160 |
-
|
161 |
-
|
162 |
-
*
|
163 |
-
|
164 |
-
*
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
*
|
170 |
-
*
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
*
|
181 |
-
*
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
*
|
193 |
-
|
194 |
-
*
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
*
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
= Version 1.4.
|
216 |
-
*
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
* Added
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
*
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
*
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
*
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
*
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
*
|
282 |
-
|
283 |
-
|
284 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== Post Snippets ===
|
2 |
+
Contributors: artstorm
|
3 |
+
Donate link: http://wpstorm.net/wordpress-plugins/post-snippets/#donation
|
4 |
+
Tags: post, admin, snippet, shortcode, html, custom, page, dynamic, editor, php
|
5 |
+
Requires at least: 3.0
|
6 |
+
Tested up to: 3.3.1
|
7 |
+
Stable tag: 1.9
|
8 |
+
|
9 |
+
Keep a snippet library of text, HTML or PHP code to be used in posts. Variables
|
10 |
+
can be set for more flexibility. Inserts directly or as shortcodes.
|
11 |
+
|
12 |
+
== Description ==
|
13 |
+
|
14 |
+
This admin plugin stores snippets of HTML code or reoccurring text that you
|
15 |
+
often use in your posts. You can use predefined variables to replace parts of
|
16 |
+
the snippet on insert. All snippets are available in the post editor with a
|
17 |
+
TinyMCE button. The snippet can be inserted as defined, or as a shortcode to
|
18 |
+
keep flexibility for updating the snippet. Also PHP code is supported for
|
19 |
+
snippets inserted as shortcodes.
|
20 |
+
|
21 |
+
= Features =
|
22 |
+
|
23 |
+
* **Insert** All defined snippets is inserted from a button directly in the post
|
24 |
+
editor.
|
25 |
+
* **Shortcodes** You can use this plugin to create your own shortcodes.
|
26 |
+
* **PHP** A shortcode snippet can optionally be evaluated as PHP code.
|
27 |
+
* **Buttons** The snippets are available in the viusal editor with a TinyMCE
|
28 |
+
button and in the HTML editor with a quicktag button.
|
29 |
+
* **Admin** Easy to use administration panel where you can add, edit and remove
|
30 |
+
snippets.
|
31 |
+
* **Variables** Each snippet can have as many custom variables as you like,
|
32 |
+
which can be used on insert.
|
33 |
+
* **Import/Export** Snippets can be imported and exported between sites.
|
34 |
+
* **Uninstall** If you delete the plugin from your plugins panel it cleans up
|
35 |
+
all data it has created in the Wordpress database.
|
36 |
+
|
37 |
+
= Related Links =
|
38 |
+
|
39 |
+
* [Documentation](http://wpstorm.net/wordpress-plugins/post-snippets/
|
40 |
+
"Complete usage instructions")
|
41 |
+
* [Support Forum](http://wordpress.org/tags/post-snippets?forum_id=10
|
42 |
+
"Use this for support and feature requests")
|
43 |
+
|
44 |
+
See the [Changelog](http://wordpress.org/extend/plugins/post-snippets/changelog/) for what's new. Available [Translations](http://wpstorm.net/wordpress-plugins/post-snippets/#translations).
|
45 |
+
|
46 |
+
|
47 |
+
== Installation ==
|
48 |
+
|
49 |
+
= Requirements =
|
50 |
+
|
51 |
+
* PHP version 5.2.4 or greater.
|
52 |
+
* WordPress version 3.0 or greater.
|
53 |
+
|
54 |
+
= Install =
|
55 |
+
|
56 |
+
1. Upload the 'post-snippets' folder to the '/wp-content/plugins/' directory.
|
57 |
+
2. Activate the plugin through the 'Plugins' menu in WordPress.
|
58 |
+
3. Go to Settings -> Post Snippets and start entering your snippets.
|
59 |
+
|
60 |
+
= Uninstall =
|
61 |
+
|
62 |
+
1. Deactivate Post Snippets in the 'Plugins' menu in Wordpress.
|
63 |
+
2. Select Post Snippets in the 'Recently Active Plugins' section and select
|
64 |
+
'Delete' from the 'Bulk Actions' drop down menu.
|
65 |
+
3. This will delete all the plugin files from the server as well as erasing all
|
66 |
+
options the plugin has stored in the database.
|
67 |
+
|
68 |
+
== Frequently Asked Questions ==
|
69 |
+
|
70 |
+
= Why do importing Snippets on a multi site install fail? =
|
71 |
+
|
72 |
+
Upload of zip files must be allowed, enable this in Sites Network Admin -> Settings -> Upload Settings -> Upload file types.
|
73 |
+
|
74 |
+
= How can I use the content in an enclosed shortcode? =
|
75 |
+
|
76 |
+
If the shortcode is enclosed and contains content between the tags in a post.
|
77 |
+
Example: `[shortcode]Some text[/shortcode]` the text within will be availble in
|
78 |
+
a variable called content. So in your snippet use {content} to display it. Don't
|
79 |
+
enter 'content' in the variable field, it's automatically assigned.
|
80 |
+
|
81 |
+
= Where can I get support? =
|
82 |
+
|
83 |
+
Please visit the [Support Forum](http://wordpress.org/tags/post-snippets?forum_id=10 "Use this for support and feature requests")
|
84 |
+
for questions, answers, support and feature requests.
|
85 |
+
|
86 |
+
== Screenshots ==
|
87 |
+
|
88 |
+
1. The Admin page where you set up new snippets.
|
89 |
+
2. The TinyMCE button for Post Snippets.
|
90 |
+
3. The Post Snippet Insert Window.
|
91 |
+
|
92 |
+
== Changelog ==
|
93 |
+
|
94 |
+
= Version 1.9 - 17 Jan 2012 =
|
95 |
+
* Initial implementation to allow snippets to be evaluated as PHP code.
|
96 |
+
[Read more](http://wpstorm.net/wordpress-plugins/post-snippets/#php).
|
97 |
+
* PHP version 5.2.4 or greater is now required to run Post Snippets.
|
98 |
+
|
99 |
+
= Version 1.8.9.2 - 15 Jan 2012 =
|
100 |
+
* Added an additional check to see if Post Snippets is loaded via a
|
101 |
+
bootstrapped WP Admin that doesn't set the is_admin() flag, so it works in
|
102 |
+
that environment as well.
|
103 |
+
|
104 |
+
= Version 1.8.9.1 - 11 Jan 2012 =
|
105 |
+
* A bug fixed with get_post_snippets() that were introduced in the last update.
|
106 |
+
* Unit test for get_post_snippets() added to automate testing that it won't
|
107 |
+
break in future updates.
|
108 |
+
|
109 |
+
= Version 1.8.9 - 10 Jan 2012 =
|
110 |
+
* Updated the help text to take advantage of the new Help API introduced with
|
111 |
+
WordPress 3.3.
|
112 |
+
* Updated the Swedish translation.
|
113 |
+
|
114 |
+
= Version 1.8.8 - 28 Dec 2011 =
|
115 |
+
* Removed the unneeded QuickTag checkbox from the settings screen for snippets,
|
116 |
+
as all snippets are now always available from the HTML editor's QuickTag
|
117 |
+
button.
|
118 |
+
|
119 |
+
= Version 1.8.7 - 25 Dec 2011 =
|
120 |
+
* Updated the TinyMCE plugin for the Post Snippets button in WordPress Visual
|
121 |
+
Editor to use the same jQuery UI Dialog window that the HTML button have had
|
122 |
+
for some time. The consolidation of using the same window and code for the
|
123 |
+
different buttons will make Post Snippets easier to maintain and update.
|
124 |
+
* Added an admin notice when running on PHP versions below 5.2.4 to prepare
|
125 |
+
users that future Post Snippets requirements will be on par with WordPress
|
126 |
+
3.3.
|
127 |
+
|
128 |
+
= Version 1.8.6 - 15 Dec 2011 =
|
129 |
+
* The Post Snippets HTML editor button is updated to be compatible with
|
130 |
+
WordPress 3.3 refactored QuickTags.
|
131 |
+
|
132 |
+
= Version 1.8.5 - 22 Nov 2011 =
|
133 |
+
* Included German translation by Brian Flores.
|
134 |
+
* For all translators: Updated the .pot file to include all the latest strings
|
135 |
+
and changes.
|
136 |
+
|
137 |
+
= Version 1.8.4 - 10 Nov 2011 =
|
138 |
+
* Included Belarusian translation by Alexander Ovsov.
|
139 |
+
|
140 |
+
= Version 1.8.3 - 13 Oct 2011 =
|
141 |
+
* Included Hebrew translation by Sagive.
|
142 |
+
|
143 |
+
= Version 1.8.2 - 3 Sep 2011 =
|
144 |
+
* Added support for using enclosed shortcodes with the snippets. Use the
|
145 |
+
variable {content} in your snippets to retrieve the enclosed content.
|
146 |
+
* Updated the dropdown help text.
|
147 |
+
* Included Lithuanian translation by Nata Strazda.
|
148 |
+
|
149 |
+
= Version 1.8.1 - 11 Jul 2011 =
|
150 |
+
* Fixed that a PHP warning is thrown when other scripts called the
|
151 |
+
get_post_snippet() function without supplying a second argument.
|
152 |
+
|
153 |
+
= Version 1.8 - 30 May 2011 =
|
154 |
+
* Fixed an escaping problem with the snippet description.
|
155 |
+
* Added Import / Export functionality.
|
156 |
+
* Snippets used as shortcodes can now nest other shortcodes in them.
|
157 |
+
|
158 |
+
= Version 1.7.3 - 3 Mar 2011 =
|
159 |
+
* Added a text area field in the settings panel to enter an optional
|
160 |
+
description for each snippet. This decription is displayed for the editor
|
161 |
+
writing a post in the jQuery Post Snippet dialog.
|
162 |
+
* Fixed the styling of the quicktag jQuery window when the user have disabled
|
163 |
+
the visual editor completely.
|
164 |
+
* Fixed problem with line formatting in the new quicktag snippets.
|
165 |
+
* Fixed a problem with JavaScript snippets breaking the admin page.
|
166 |
+
* Various small bugfixes.
|
167 |
+
|
168 |
+
= Version 1.7.2 - 28 Feb 2011 =
|
169 |
+
* Specified text/javascript for the UI dialog script.
|
170 |
+
* Updated the Spanish translation by Melvis E. Leon Lopez.
|
171 |
+
|
172 |
+
= Version 1.7.1 - 26 Feb 2011 =
|
173 |
+
* Added styling to the Tabs in the Quicktag jQuery dialog window to make them
|
174 |
+
more "tab-like".
|
175 |
+
* Added the possibility to use a description for each snippet to display for
|
176 |
+
the user when opening the Quicktag jQuery dialog window. Snippets without
|
177 |
+
description and variables, has a default information message.
|
178 |
+
* Moved the help text from below the snippets to the contextual help dropdown
|
179 |
+
menu at the top of the settings page.
|
180 |
+
* **Changed the required version of WordPress to 3.0**.
|
181 |
+
* Request by proximity2008: A snippet without anything entered in the snippet
|
182 |
+
field will not be registered as a shortcode.
|
183 |
+
|
184 |
+
= Version 1.7 - 26 Feb 2011 =
|
185 |
+
* Complete rewrite of the QuickTags insert functionality. It now uses jQuery UI
|
186 |
+
to display a similar tabbed window as the TinyMCE button does. There is now
|
187 |
+
one 'Post Snippets' button in the HTML editor instead of a separate button
|
188 |
+
for each snippet. As the QuickTags function is completely rewritten, and this
|
189 |
+
is the initial release of the new method, please report if you encounter any
|
190 |
+
problems with it.
|
191 |
+
* Fixed QuickTags compability with WordPress 3.1.
|
192 |
+
* Added a link to the Post Snippets Settings directly from the entry on the
|
193 |
+
'Plugins List' page.
|
194 |
+
* Added get_post_snippet() function to retrieve snippets directly from PHP.
|
195 |
+
|
196 |
+
= Version 1.5.4 - 26 Jan 2011 =
|
197 |
+
* Included Turkish translation by Ersan Özdil.
|
198 |
+
|
199 |
+
= Version 1.5.3 - 19 Sep 2010 =
|
200 |
+
* Included Spanish translation by Melvis E. Leon Lopez.
|
201 |
+
|
202 |
+
= Version 1.5.2 - 17 Sep 2010 =
|
203 |
+
* The plugin now keeps linefeed formatting when inserting a snippet directly
|
204 |
+
with a quicktag in the HTML editor.
|
205 |
+
* Updated the code to not generate warnings when running WordPress in debug
|
206 |
+
mode.
|
207 |
+
|
208 |
+
= Version 1.5.1 - 12 Mar 2010 =
|
209 |
+
* Fixed ampersands when used in a shortcode, so they are XHTML valid.
|
210 |
+
|
211 |
+
= Version 1.5 - 12 Jan 2010 =
|
212 |
+
* Updated the plugin so it works with WordPress 2.9.x (the quicktags didn't
|
213 |
+
work in 2.9, now fixed.).
|
214 |
+
|
215 |
+
= Version 1.4.9.1 - 5 Sep 2009 =
|
216 |
+
* Included French translation by Thomas Cailhe (Oyabi).
|
217 |
+
|
218 |
+
= Version 1.4.9 - 10 Aug 2009 =
|
219 |
+
* Included Russian translation by FatCow.
|
220 |
+
|
221 |
+
= Version 1.4.8 - 9 May 2009 =
|
222 |
+
* Changed the handling of the TinyMCE button as some server configurations had
|
223 |
+
problems finding the correct path.
|
224 |
+
* Fixed a problem that didn't let a snippet contain a </script> tag.
|
225 |
+
|
226 |
+
= Version 1.4.7 - 27 Apr 2009 =
|
227 |
+
* Added a workaround for a bug in WordPress 2.7.x wp-includes/compat.php that
|
228 |
+
prevented the plugin to work correctly on webservers running with PHP below
|
229 |
+
version 5.1.0 together with WP 2.7.x. This bug is patched in WordPress 2.8.
|
230 |
+
|
231 |
+
= Version 1.4.6 - 25 Apr 2009 =
|
232 |
+
* Updated all code to follow the WordPress Coding Standards for consistency, if
|
233 |
+
someone wants to modify my code.
|
234 |
+
* Removed the nodechangehandler from the TinyMCE js, as it didn't fill any
|
235 |
+
purpose.
|
236 |
+
* Updated the save code to remove the PHP Notice messages, if using error
|
237 |
+
logging on the server.
|
238 |
+
* Added additional proofing for the variables string.
|
239 |
+
|
240 |
+
= Version 1.4.5 - 24 Apr 2009 =
|
241 |
+
* Fixed a problem in the admin options that didn't allow a form with a textarea
|
242 |
+
to be used as a snippet.
|
243 |
+
* Widened the columns for SC and QT slightly in the options panel so they
|
244 |
+
should look a bit better on the mac.
|
245 |
+
|
246 |
+
= Version 1.4.4 - 19 Apr 2009 =
|
247 |
+
* Minor fix with quicktags and certain snippets that was left out in the last
|
248 |
+
update.
|
249 |
+
|
250 |
+
= Version 1.4.3 - 16 Apr 2009 =
|
251 |
+
* Fixed an escaping problem with the recently implemented shortcode function,
|
252 |
+
that could cause problems on certain strings.
|
253 |
+
* Fixed an escaping problem with the quicktag javascript, that could cause
|
254 |
+
problems on certain strings.
|
255 |
+
|
256 |
+
= Version 1.4.2 - 11 Apr 2009 =
|
257 |
+
* Fixed some additional syntax for servers where the short_open_tag
|
258 |
+
configuration setting is disabled.
|
259 |
+
|
260 |
+
= Version 1.4.1 - 10 Apr 2009 =
|
261 |
+
* Removed all short syntax commands and replaced them with the full versions so
|
262 |
+
the plugin also works on servers with the short_open_tag configuration
|
263 |
+
setting disabled.
|
264 |
+
|
265 |
+
= Version 1.4 - 10 Apr 2009 =
|
266 |
+
* Added a checkbox for Shortcodes (SC) in the admin panel. When checking this
|
267 |
+
one a dynamic shortcode will be generated and inserted instead of the
|
268 |
+
snippet, which allows snippets to be updated later on for all posts it's been
|
269 |
+
inserted into when using this option.
|
270 |
+
* Added a checkbox for Quicktags (QT) in the admin panel, so Quicktags are
|
271 |
+
optional. Speeds up loading of the post editor if you don't need the quicktag
|
272 |
+
support, and only use the visual editor. Defaults to off.
|
273 |
+
|
274 |
+
= Version 1.3.5 - 9 Apr 2009 =
|
275 |
+
* Fixed so the TinyMCE window adds a scrollbar if there is more variables for a
|
276 |
+
snippet than fits in the window.
|
277 |
+
* Fixed a bug that snippets didn't get inserted when using the visual editor in
|
278 |
+
fullscreen mode.
|
279 |
+
|
280 |
+
= Version 1.3 - 2 Apr 2009 =
|
281 |
+
* Fixed a problem with the regular expressions that prohibited variables
|
282 |
+
consisting of just a single number to work.
|
283 |
+
* Updated the Help info in the admin page to take less space.
|
284 |
+
* Included a check so the plugin only runs in WP 2.7 or newer.
|
285 |
+
|
286 |
+
= Version 1.2 - 1 Apr 2009 =
|
287 |
+
* Added support for Quicktags so the snippets can be made available in the HTML
|
288 |
+
editor as well.
|
289 |
+
|
290 |
+
= Version 1.1 - 24 Mar 2009 =
|
291 |
+
* Included Swedish translation.
|
292 |
+
* Added TextDomain functionality for I18n.
|
293 |
+
|
294 |
+
= Version 1.0 - 23 Mar 2009 =
|
295 |
+
* Initial Release
|
296 |
+
|
297 |
+
== Upgrade Notice ==
|
298 |
+
|
299 |
+
= 1.9 =
|
300 |
+
Note that starting with this version and moving forward, at least PHP v5.2.4 is
|
301 |
+
required to run Post Snippets.
|