Version Description
Download this release
Release Info
Developer | artstorm |
Plugin | Post Snippets |
Version | 1.9.5 |
Comparing to | |
See all releases |
Code changes from version 1.9.4 to 1.9.5
- post-snippets.php +33 -3
- readme.txt +7 -3
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: Build a library with snippets of HTML, PHP code or reoccurring text that you often use in your posts. Variables to replace parts of the snippet on insert can be used. The snippets can be inserted as-is or as shortcodes.
|
6 |
-
Version: 1.9.
|
7 |
Author: Johan Steen
|
8 |
Author URI: http://johansteen.se/
|
9 |
Text Domain: post-snippets
|
@@ -182,7 +182,15 @@ class Post_Snippets {
|
|
182 |
* @see wp-includes/js/quicktags.dev.js -> qt.addButton()
|
183 |
* @since Post Snippets 1.8.6
|
184 |
*/
|
185 |
-
public function add_quicktag_button()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
echo "\n<!-- START: Add QuickTag button for Post Snippets -->\n";
|
187 |
?>
|
188 |
<script type="text/javascript" charset="utf-8">
|
@@ -207,6 +215,13 @@ class Post_Snippets {
|
|
207 |
* @deprecated Since 1.8.6
|
208 |
*/
|
209 |
function add_quicktag_button_pre33() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
210 |
echo "\n<!-- START: Post Snippets QuickTag button -->\n";
|
211 |
?>
|
212 |
<script type="text/javascript" charset="utf-8">
|
@@ -238,7 +253,15 @@ class Post_Snippets {
|
|
238 |
*
|
239 |
* @since Post Snippets 1.7
|
240 |
*/
|
241 |
-
public function jquery_ui_dialog()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
242 |
echo "\n<!-- START: Post Snippets jQuery UI and related functions -->\n";
|
243 |
echo "<script type='text/javascript'>\n";
|
244 |
|
@@ -378,6 +401,13 @@ function edOpenPostSnippets(myField) {
|
|
378 |
*/
|
379 |
public function add_jquery_ui_dialog()
|
380 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
381 |
echo "\n<!-- START: Post Snippets UI Dialog -->\n";
|
382 |
// Setup the dialog divs
|
383 |
echo "<div class=\"hidden\">\n";
|
3 |
Plugin Name: Post Snippets
|
4 |
Plugin URI: http://wpstorm.net/wordpress-plugins/post-snippets/
|
5 |
Description: Build a library with snippets of HTML, PHP code or reoccurring text that you often use in your posts. Variables to replace parts of the snippet on insert can be used. The snippets can be inserted as-is or as shortcodes.
|
6 |
+
Version: 1.9.5
|
7 |
Author: Johan Steen
|
8 |
Author URI: http://johansteen.se/
|
9 |
Text Domain: post-snippets
|
182 |
* @see wp-includes/js/quicktags.dev.js -> qt.addButton()
|
183 |
* @since Post Snippets 1.8.6
|
184 |
*/
|
185 |
+
public function add_quicktag_button()
|
186 |
+
{
|
187 |
+
// Only run the function on post edit screens
|
188 |
+
if ( function_exists( 'get_current_screen' ) ) {
|
189 |
+
$screen = get_current_screen();
|
190 |
+
if ($screen->base != 'post')
|
191 |
+
return;
|
192 |
+
}
|
193 |
+
|
194 |
echo "\n<!-- START: Add QuickTag button for Post Snippets -->\n";
|
195 |
?>
|
196 |
<script type="text/javascript" charset="utf-8">
|
215 |
* @deprecated Since 1.8.6
|
216 |
*/
|
217 |
function add_quicktag_button_pre33() {
|
218 |
+
// Only run the function on post edit screens
|
219 |
+
if ( function_exists( 'get_current_screen' ) ) {
|
220 |
+
$screen = get_current_screen();
|
221 |
+
if ($screen->base != 'post')
|
222 |
+
return;
|
223 |
+
}
|
224 |
+
|
225 |
echo "\n<!-- START: Post Snippets QuickTag button -->\n";
|
226 |
?>
|
227 |
<script type="text/javascript" charset="utf-8">
|
253 |
*
|
254 |
* @since Post Snippets 1.7
|
255 |
*/
|
256 |
+
public function jquery_ui_dialog()
|
257 |
+
{
|
258 |
+
// Only run the function on post edit screens
|
259 |
+
if ( function_exists( 'get_current_screen' ) ) {
|
260 |
+
$screen = get_current_screen();
|
261 |
+
if ($screen->base != 'post')
|
262 |
+
return;
|
263 |
+
}
|
264 |
+
|
265 |
echo "\n<!-- START: Post Snippets jQuery UI and related functions -->\n";
|
266 |
echo "<script type='text/javascript'>\n";
|
267 |
|
401 |
*/
|
402 |
public function add_jquery_ui_dialog()
|
403 |
{
|
404 |
+
// Only run the function on post edit screens
|
405 |
+
if ( function_exists( 'get_current_screen' ) ) {
|
406 |
+
$screen = get_current_screen();
|
407 |
+
if ($screen->base != 'post')
|
408 |
+
return;
|
409 |
+
}
|
410 |
+
|
411 |
echo "\n<!-- START: Post Snippets UI Dialog -->\n";
|
412 |
// Setup the dialog divs
|
413 |
echo "<div class=\"hidden\">\n";
|
readme.txt
CHANGED
@@ -1,10 +1,9 @@
|
|
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, code
|
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.
|
@@ -41,7 +40,8 @@ updating the snippet. PHP code is supported for snippets inserted as shortcodes.
|
|
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/)
|
|
|
45 |
|
46 |
|
47 |
== Installation ==
|
@@ -92,6 +92,10 @@ for questions, answers, support and feature requests.
|
|
92 |
|
93 |
== Changelog ==
|
94 |
|
|
|
|
|
|
|
|
|
95 |
= Version 1.9.4 - 8 Feb 2012 =
|
96 |
* Added an option to run shortcodes through wptexturize before output.
|
97 |
* Bugfix: Default values could be cut off. Corrected in this update.
|
1 |
=== Post Snippets ===
|
2 |
Contributors: artstorm
|
|
|
3 |
Tags: post, admin, snippet, shortcode, html, custom, page, dynamic, editor, php, code
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 3.3.1
|
6 |
+
Stable tag: 1.9.5
|
7 |
|
8 |
Keep a snippet library of text, HTML or PHP code to be used in posts. Variables
|
9 |
can be set for more flexibility. Inserts directly or as shortcodes.
|
40 |
* [Support Forum](http://wordpress.org/tags/post-snippets?forum_id=10
|
41 |
"Use this for support and feature requests")
|
42 |
|
43 |
+
See the [Changelog](http://wordpress.org/extend/plugins/post-snippets/changelog/)
|
44 |
+
for what's new. Available [Translations](http://wpstorm.net/wordpress-plugins/post-snippets/#translations).
|
45 |
|
46 |
|
47 |
== Installation ==
|
92 |
|
93 |
== Changelog ==
|
94 |
|
95 |
+
= Version 1.9.5 - 17 Mar 2012 =
|
96 |
+
* The HTML and scripts for the popup window in the post editor is now only
|
97 |
+
generated on the screens where it's needed.
|
98 |
+
|
99 |
= Version 1.9.4 - 8 Feb 2012 =
|
100 |
* Added an option to run shortcodes through wptexturize before output.
|
101 |
* Bugfix: Default values could be cut off. Corrected in this update.
|