Code Snippets - Version 1.6.1

Version Description

  • Fixed a bug with permissions not being applied on install (#)
  • Fixed a bug in the uninstall method (#)
Download this release

Release Info

Developer bungeshea
Plugin Icon Code Snippets
Version 1.6.1
Comparing to
See all releases

Code changes from version 1.6 to 1.6.1

code-snippets.php CHANGED
@@ -15,7 +15,7 @@
15
  * Description: An easy, clean and simple way to add code snippets to your site. No need to edit to your theme's functions.php file again!
16
  * Author: Shea Bunge
17
  * Author URI: http://bungeshea.com
18
- * Version: 1.6
19
  * License: GPLv3 or later
20
  * Network: true
21
  * Text Domain: code-snippets
@@ -152,8 +152,8 @@ final class Code_Snippets {
152
  $this->admin_manage_slug = apply_filters( 'code_snippets_admin_manage', 'snippets' );
153
  $this->admin_single_slug = apply_filters( 'code_snippets_admin_single', 'snippet' );
154
 
155
- $this->admin_manage_url = self_admin_url( 'admin.php?page=' . $this->admin_manage_slug );
156
- $this->admin_single_url = self_admin_url( 'admin.php?page=' . $this->admin_single_slug );
157
  }
158
 
159
  /**
@@ -335,7 +335,7 @@ final class Code_Snippets {
335
  }
336
 
337
  /* bail early if we're on the latest version */
338
- if ( ! ( $this->current_version < $this->version ) ) return false;
339
 
340
  if ( ! get_site_option( 'code_snippets_version' ) ) {
341
 
@@ -1129,6 +1129,7 @@ final class Code_Snippets {
1129
  add_filter( 'admin_title', array( $this, 'admin_single_title' ) );
1130
 
1131
  include $this->plugin_dir . 'includes/help/single.php'; // Load the help tabs
 
1132
  }
1133
 
1134
  /**
@@ -1303,7 +1304,7 @@ register_uninstall_hook( $code_snippets->file, 'code_snippets_uninstall' );
1303
  * @access private
1304
  *
1305
  * @uses $wpdb To remove tables from the database
1306
- * @uses $code_snippets To find out which table to drop
1307
  * @uses is_multisite() To check the type of installation
1308
  * @uses switch_to_blog() To switch between blogs
1309
  * @uses restore_current_blog() To switch between blogs
@@ -1318,19 +1319,18 @@ function code_snippets_uninstall() {
1318
  if ( $blogs ) {
1319
  foreach( $blogs as $blog ) {
1320
  switch_to_blog( $blog['blog_id'] );
1321
- $table = apply_filters( 'code_snippets_table', $wpdb->prefix . 'snippets' );
1322
- $wpdb->query( "DROP TABLE IF EXISTS $table" );
1323
  delete_option( 'cs_db_version' );
1324
  delete_option( 'recently_activated_snippets' );
1325
  $code_snippets->remove_caps();
1326
  }
1327
  restore_current_blog();
1328
  }
1329
- $wpdb->query( "DROP TABLE IF EXISTS $code_snippets->ms_table" );
1330
  delete_site_option( 'recently_activated_snippets' );
1331
  $code_snippets->remove_caps( 'multisite' );
1332
  } else {
1333
- $wpdb->query( "DROP TABLE IF EXISTS $code_snippets->table" );
1334
  delete_option( 'recently_activated_snippets' );
1335
  delete_option( 'cs_db_version' );
1336
  $code_snippets->remove_caps();
15
  * Description: An easy, clean and simple way to add code snippets to your site. No need to edit to your theme's functions.php file again!
16
  * Author: Shea Bunge
17
  * Author URI: http://bungeshea.com
18
+ * Version: 1.6.1
19
  * License: GPLv3 or later
20
  * Network: true
21
  * Text Domain: code-snippets
152
  $this->admin_manage_slug = apply_filters( 'code_snippets_admin_manage', 'snippets' );
153
  $this->admin_single_slug = apply_filters( 'code_snippets_admin_single', 'snippet' );
154
 
155
+ $this->admin_manage_url = self_admin_url( 'admin.php?page=' . $this->admin_manage_slug );
156
+ $this->admin_single_url = self_admin_url( 'admin.php?page=' . $this->admin_single_slug );
157
  }
158
 
159
  /**
335
  }
336
 
337
  /* bail early if we're on the latest version */
338
+ if ( $this->current_version < $this->version ) return false;
339
 
340
  if ( ! get_site_option( 'code_snippets_version' ) ) {
341
 
1129
  add_filter( 'admin_title', array( $this, 'admin_single_title' ) );
1130
 
1131
  include $this->plugin_dir . 'includes/help/single.php'; // Load the help tabs
1132
+
1133
  }
1134
 
1135
  /**
1304
  * @access private
1305
  *
1306
  * @uses $wpdb To remove tables from the database
1307
+ * @uses $code_snippets->get_table_name() To find out which table to drop
1308
  * @uses is_multisite() To check the type of installation
1309
  * @uses switch_to_blog() To switch between blogs
1310
  * @uses restore_current_blog() To switch between blogs
1319
  if ( $blogs ) {
1320
  foreach( $blogs as $blog ) {
1321
  switch_to_blog( $blog['blog_id'] );
1322
+ $wpdb->query( 'DROP TABLE IF EXISTS ' . apply_filters( 'code_snippets_table', $wpdb->prefix . 'snippets' ) );
 
1323
  delete_option( 'cs_db_version' );
1324
  delete_option( 'recently_activated_snippets' );
1325
  $code_snippets->remove_caps();
1326
  }
1327
  restore_current_blog();
1328
  }
1329
+ $wpdb->query( 'DROP TABLE IF EXISTS ' . $code_snippets->get_table_name( 'multisite' ) );
1330
  delete_site_option( 'recently_activated_snippets' );
1331
  $code_snippets->remove_caps( 'multisite' );
1332
  } else {
1333
+ $wpdb->query( 'DROP TABLE IF EXISTS ' . $code_snippets->get_table_name( 'site' ) );
1334
  delete_option( 'recently_activated_snippets' );
1335
  delete_option( 'cs_db_version' );
1336
  $code_snippets->remove_caps();
includes/admin/single.php CHANGED
@@ -54,35 +54,34 @@ if ( isset( $_REQUEST['edit'] ) )
54
  <div id="titlediv">
55
  <div id="titlewrap">
56
  <label for="title" style="display: none;"><?php esc_html_e('Name (short title)', 'code-snippets'); ?></label>
57
- <input id="title" type="text" autocomplete="off" size="30" maxlength="64" name="snippet_name" value="<?php echo stripslashes( $snippet->name ); ?>" placeholder="<?php _e('Name (short title)', 'code-snippets'); ?>" required="required">
58
  </div>
59
  </div>
60
 
61
  <label for="snippet_code">
62
- <h3 style="display: inline;"><?php esc_html_e('Code', 'code-snippets'); ?></h3>
63
- <span style="float: right;"><?php _e('Enter or paste the snippet code without the <code>&lt;?php</code> and <code>?&gt;</code> tags.', 'code-snippets'); ?></span>
64
  </label>
65
 
66
  <textarea id="snippet_code" name="snippet_code" rows="20" spellcheck="false" style="font-family: monospace; width:100%;"><?php echo stripslashes( $snippet->code ); ?></textarea>
67
 
68
- <label for="description">
69
- <h3>
70
- <?php esc_html_e('Description', 'code-snippets'); ?>
71
- <span style="font-weight: normal; font-size: normal;"><?php _e('(Optional)', 'code-snippets'); ?></span>
72
- </h3>
73
  </label>
74
 
75
  <?php
76
- wp_editor(
77
- htmlspecialchars_decode( stripslashes( $snippet->description ) ),
78
- 'description',
79
- array(
80
- 'textarea_name' => 'snippet_description',
81
- 'textarea_rows' => 10,
82
- 'media_buttons' => false,
83
- )
84
- );
85
  ?>
 
86
  <p class="submit">
87
  <input type="submit" name="save_snippet" class="button-primary" value="<?php _e('Save', 'code-snippets'); ?>" />
88
  <a href="<?php echo $this->admin_manage_url; ?>" class="button"><?php _e('Cancel', 'code-snippets'); ?></a>
54
  <div id="titlediv">
55
  <div id="titlewrap">
56
  <label for="title" style="display: none;"><?php esc_html_e('Name (short title)', 'code-snippets'); ?></label>
57
+ <input id="title" type="text" autocomplete="off" size="30" maxlength="64" name="snippet_name" value="<?php echo stripslashes( $snippet->name ); ?>" placeholder="<?php _e('Name (short title)', 'code-snippets'); ?>" required="required" />
58
  </div>
59
  </div>
60
 
61
  <label for="snippet_code">
62
+ <h3><?php esc_html_e('Code', 'code-snippets'); ?>
63
+ <span style="float: right; font-weight: normal;"><?php _e('Enter or paste the snippet code without the <code>&lt;?php</code> and <code>?&gt;</code> tags.', 'code-snippets'); ?></span></h3>
64
  </label>
65
 
66
  <textarea id="snippet_code" name="snippet_code" rows="20" spellcheck="false" style="font-family: monospace; width:100%;"><?php echo stripslashes( $snippet->code ); ?></textarea>
67
 
68
+ <label for="snippet_description">
69
+ <h3><?php esc_html_e('Description', 'code-snippets'); ?>
70
+ <span style="font-weight: normal;"><?php esc_html_e('(Optional)', 'code-snippets'); ?></span></h3>
 
 
71
  </label>
72
 
73
  <?php
74
+ wp_editor(
75
+ htmlspecialchars_decode( stripslashes( $snippet->description ) ),
76
+ 'description',
77
+ array(
78
+ 'textarea_name' => 'snippet_description',
79
+ 'textarea_rows' => 10,
80
+ // 'media_buttons' => false,
81
+ )
82
+ );
83
  ?>
84
+
85
  <p class="submit">
86
  <input type="submit" name="save_snippet" class="button-primary" value="<?php _e('Save', 'code-snippets'); ?>" />
87
  <a href="<?php echo $this->admin_manage_url; ?>" class="button"><?php _e('Cancel', 'code-snippets'); ?></a>
languages/code-snippets.pot CHANGED
@@ -2,17 +2,15 @@
2
  # This file is distributed under the same license as the Code Snippets package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Code Snippets 1.6\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/code-snippets\n"
7
- "POT-Creation-Date: 2012-12-22 06:18:18+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
- "PO-Revision-Date: 2012-12-22 05:20+10\n"
12
  "Last-Translator: Shea Bunge <code-snippets@bungeshea.com>\n"
13
 
14
- #. #-#-#-#-# code-snippets.pot (Code Snippets 1.6) #-#-#-#-#
15
- #. Plugin Name of the plugin/theme
16
  #: code-snippets.php:217
17
  msgid "Code Snippets"
18
  msgstr ""
@@ -52,35 +50,35 @@ msgstr ""
52
  msgid "Edit Snippet"
53
  msgstr ""
54
 
55
- #: code-snippets.php:1206
56
  msgid "Manage your existing snippets"
57
  msgstr ""
58
 
59
- #: code-snippets.php:1207
60
  msgid "Manage"
61
  msgstr ""
62
 
63
- #: code-snippets.php:1227
64
  msgid "Visit the WordPress.org plugin page"
65
  msgstr ""
66
 
67
- #: code-snippets.php:1228
68
  msgid "About"
69
  msgstr ""
70
 
71
- #: code-snippets.php:1232
72
  msgid "Visit the support forums"
73
  msgstr ""
74
 
75
- #: code-snippets.php:1233
76
  msgid "Support"
77
  msgstr ""
78
 
79
- #: code-snippets.php:1237
80
  msgid "Support this plugin's development"
81
  msgstr ""
82
 
83
- #: code-snippets.php:1238
84
  msgid "Donate"
85
  msgstr ""
86
 
@@ -91,21 +89,15 @@ msgstr[0] ""
91
  msgstr[1] ""
92
 
93
  #: includes/admin/import.php:27
94
- msgid ""
95
- "Howdy! Upload your Code Snippets export file and we&#8217;ll import the "
96
- "snippets to this site."
97
  msgstr ""
98
 
99
  #: includes/admin/import.php:29
100
- msgid ""
101
- "You will need to go to the <a href=\"%s\">Manage Snippets</a> page to "
102
- "activate the imported snippets."
103
  msgstr ""
104
 
105
  #: includes/admin/import.php:31
106
- msgid ""
107
- "Choose a Code Snippets (.xml) file to upload, then click Upload file and "
108
- "import."
109
  msgstr ""
110
 
111
  #: includes/admin/import.php:34
@@ -182,24 +174,22 @@ msgid "Code"
182
  msgstr ""
183
 
184
  #: includes/admin/single.php:63
185
- msgid ""
186
- "Enter or paste the snippet code without the <code>&lt;?php</code> and <code>?"
187
- "&gt;</code> tags."
188
  msgstr ""
189
 
190
- #: includes/admin/single.php:70 includes/class-list-table.php:156
191
  msgid "Description"
192
  msgstr ""
193
 
194
- #: includes/admin/single.php:71
195
  msgid "(Optional)"
196
  msgstr ""
197
 
198
- #: includes/admin/single.php:87
199
  msgid "Save"
200
  msgstr ""
201
 
202
- #: includes/admin/single.php:88
203
  msgid "Cancel"
204
  msgstr ""
205
 
@@ -272,9 +262,7 @@ msgid "Clear List"
272
  msgstr ""
273
 
274
  #: includes/class-list-table.php:304
275
- msgid ""
276
- "You do not appear to have any snippets available at this time. <a href=\"%s"
277
- "\">Add New&rarr;</a>"
278
  msgstr ""
279
 
280
  #: includes/help/import.php:5 includes/help/manage.php:5
@@ -283,12 +271,7 @@ msgid "Overview"
283
  msgstr ""
284
 
285
  #: includes/help/import.php:7
286
- msgid ""
287
- "Snippets are similar to plugins - they both extend and expand the "
288
- "functionality of WordPress. Snippets are more light-weight, just a few lines "
289
- "of code, and do not put as much load on your server. Here you can load "
290
- "snippets from a Code Snippets (.xml) import file into the database with your "
291
- "existing snippets."
292
  msgstr ""
293
 
294
  #: includes/help/import.php:12
@@ -296,17 +279,11 @@ msgid "Importing"
296
  msgstr ""
297
 
298
  #: includes/help/import.php:14
299
- msgid ""
300
- "You can load your snippets from a Code Snippets (.xml) import file using "
301
- "this page."
302
  msgstr ""
303
 
304
  #: includes/help/import.php:15
305
- msgid ""
306
- "Snippets will be added to the database along with your existing snippets. "
307
- "Regardless of whether the snippets were active on the previous site, "
308
- "imported snippets are always inactive until activated using the <a href=\"%s"
309
- "\">Manage Snippets</a> page.</p>"
310
  msgstr ""
311
 
312
  #: includes/help/import.php:20
@@ -314,9 +291,7 @@ msgid "Exporting"
314
  msgstr ""
315
 
316
  #: includes/help/import.php:22
317
- msgid ""
318
- "You can save your snippets to a Code Snippets (.xml) export file using the "
319
- "<a href=\"%s\">Manage Snippets</a> page."
320
  msgstr ""
321
 
322
  #: includes/help/import.php:26 includes/help/manage.php:27
@@ -325,32 +300,21 @@ msgid "For more information:"
325
  msgstr ""
326
 
327
  #: includes/help/import.php:27 includes/help/single.php:33
328
- msgid ""
329
- "<a href=\"http://wordpress.org/extend/plugins/code-snippets\" target=\"_blank"
330
- "\">WordPress Extend</a>"
331
  msgstr ""
332
 
333
  #: includes/help/import.php:28 includes/help/manage.php:29
334
  #: includes/help/single.php:34
335
- msgid ""
336
- "<a href=\"http://wordpress.org/support/plugin/code-snippets\" target=\"_blank"
337
- "\">Support Forums</a>"
338
  msgstr ""
339
 
340
  #: includes/help/import.php:29 includes/help/manage.php:30
341
  #: includes/help/single.php:35
342
- msgid ""
343
- "<a href=\"http://code-snippets.bungeshea.com/\" target=\"_blank\">Project "
344
- "Website</a>"
345
  msgstr ""
346
 
347
  #: includes/help/manage.php:7
348
- msgid ""
349
- "Snippets are similar to plugins - they both extend and expand the "
350
- "functionality of WordPress. Snippets are more light-weight, just a few lines "
351
- "of code, and do not put as much load on your server. Here you can manage "
352
- "your existing snippets and preform tasks on them such as activating, "
353
- "deactivating, deleting and exporting."
354
  msgstr ""
355
 
356
  #: includes/help/manage.php:12
@@ -358,20 +322,11 @@ msgid "Safe Mode"
358
  msgstr ""
359
 
360
  #: includes/help/manage.php:14
361
- msgid ""
362
- "Be sure to check your snippets for errors before you activate them, as a "
363
- "faulty snippet could bring your whole blog down. If your site starts doing "
364
- "strange things, deactivate all your snippets and activate them one at a time."
365
  msgstr ""
366
 
367
  #: includes/help/manage.php:15
368
- msgid ""
369
- "If something goes wrong with a snippet and you can't use WordPress, you can "
370
- "cause all snippets to stop executing by adding <code>define"
371
- "('CODE_SNIPPETS_SAFE_MODE', true);</code> to your <code>wp-config.php</code> "
372
- "file. After you have deactivated the offending snippet, you can turn off "
373
- "safe mode by removing this line or replacing <strong>true</strong> with "
374
- "<strong>false</strong>."
375
  msgstr ""
376
 
377
  #: includes/help/manage.php:20
@@ -379,33 +334,19 @@ msgid "Uninstall"
379
  msgstr ""
380
 
381
  #: includes/help/manage.php:22
382
- msgid ""
383
- "When you delete Code Snippets through the Plugins menu in WordPress it will "
384
- "clear up the <code>%1$s</code> table and a few other bits of data stored in "
385
- "the database. If you want to keep this data (ie: you are only temporally "
386
- "uninstalling Code Snippets) then remove the <code>%2$s</code> folder using "
387
- "FTP."
388
  msgstr ""
389
 
390
  #: includes/help/manage.php:23
391
- msgid ""
392
- "Even if you're sure that you don't want to use Code Snippets ever again on "
393
- "this WordPress installation, you may want to use the export feature to back "
394
- "up your snippets."
395
  msgstr ""
396
 
397
  #: includes/help/manage.php:28
398
- msgid ""
399
- "<a href=\"http://wordpress.org/extend/plugins/code-snippets\" target=\"_blank"
400
- "\">WordPress Extend</a></p>"
401
  msgstr ""
402
 
403
  #: includes/help/single.php:7
404
- msgid ""
405
- "Snippets are similar to plugins - they both extend and expand the "
406
- "functionality of WordPress. Snippets are more light-weight, just a few lines "
407
- "of code, and do not put as much load on your server. Here you can add a new "
408
- "snippet, or edit an existing one."
409
  msgstr ""
410
 
411
  #: includes/help/single.php:11
@@ -414,24 +355,17 @@ msgstr ""
414
 
415
  #: includes/help/single.php:13
416
  msgid ""
417
- "Here are some links to websites which host a large number of snippets that "
418
- "you can add to your site.\r\n"
419
- "\t\t<ul>\r\n"
420
- "\t\t\t<li><a href=\"http://wp-snippets.com\" title=\"WordPress Snippets\">WP-"
421
- "Snippets</a></li>\r\n"
422
- "\t\t\t<li><a href=\"http://wpsnipp.com\" title=\"WP Snipp\">WP Snipp</a></li>"
423
- "\r\n"
424
- "\t\t\t<li><a href=\"http://www.catswhocode.com/blog/snippets\" title=\"Cats "
425
- "Who Code Snippet Library\">Cats Who Code</a></li>\r\n"
426
- "\t\t\t<li><a href=\"http://www.wpfunction.me\">WP Function Me</a></li>\r\n"
427
  "\t\t</ul>"
428
  msgstr ""
429
 
430
  #: includes/help/single.php:20
431
- msgid ""
432
- "More places to find snippets, as well as a selection of example snippets, "
433
- "can be found in the <a href=\"http://code-snippets.bungeshea.com/docs/"
434
- "finding-snippets/\">plugin documentation</a>"
435
  msgstr ""
436
 
437
  #: includes/help/single.php:24
@@ -439,25 +373,18 @@ msgid "Adding Snippets"
439
  msgstr ""
440
 
441
  #: includes/help/single.php:26
442
- msgid ""
443
- "You need to fill out the name and code fields for your snippet to be added. "
444
- "While the description field will add more information about how your snippet "
445
- "works, what is does and where you found it, it is completely optional."
446
  msgstr ""
447
 
448
  #: includes/help/single.php:27
449
- msgid ""
450
- "Make sure that you don't add the <code>&lt;?php</code>, <code>&lt;?</code> "
451
- "or <code>?&gt;</code> the beginning and end of the code. You can however use "
452
- "these tags in the code to stop and start PHP sections"
453
  msgstr ""
454
 
455
  #: includes/help/single.php:28
456
- msgid ""
457
- "Please be sure to check that your snippet is valid PHP code and will not "
458
- "produce errors before adding it through this page. While doing so will not "
459
- "become active straight away, it will help to minimise the chance of a faulty "
460
- "snippet becoming active on your site."
461
  msgstr ""
462
 
463
  #. Plugin URI of the plugin/theme
@@ -465,9 +392,7 @@ msgid "http://code-snippets.bungeshea.com"
465
  msgstr ""
466
 
467
  #. Description of the plugin/theme
468
- msgid ""
469
- "An easy, clean and simple way to add code snippets to your site. No need to "
470
- "edit to your theme's functions.php file again!"
471
  msgstr ""
472
 
473
  #. Author of the plugin/theme
2
  # This file is distributed under the same license as the Code Snippets package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Code Snippets 1.6.1\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/code-snippets\n"
7
+ "POT-Creation-Date: 2012-12-29 09:12:37+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2012-12-29 08:14+11\n"
12
  "Last-Translator: Shea Bunge <code-snippets@bungeshea.com>\n"
13
 
 
 
14
  #: code-snippets.php:217
15
  msgid "Code Snippets"
16
  msgstr ""
50
  msgid "Edit Snippet"
51
  msgstr ""
52
 
53
+ #: code-snippets.php:1207
54
  msgid "Manage your existing snippets"
55
  msgstr ""
56
 
57
+ #: code-snippets.php:1208
58
  msgid "Manage"
59
  msgstr ""
60
 
61
+ #: code-snippets.php:1228
62
  msgid "Visit the WordPress.org plugin page"
63
  msgstr ""
64
 
65
+ #: code-snippets.php:1229
66
  msgid "About"
67
  msgstr ""
68
 
69
+ #: code-snippets.php:1233
70
  msgid "Visit the support forums"
71
  msgstr ""
72
 
73
+ #: code-snippets.php:1234
74
  msgid "Support"
75
  msgstr ""
76
 
77
+ #: code-snippets.php:1238
78
  msgid "Support this plugin's development"
79
  msgstr ""
80
 
81
+ #: code-snippets.php:1239
82
  msgid "Donate"
83
  msgstr ""
84
 
89
  msgstr[1] ""
90
 
91
  #: includes/admin/import.php:27
92
+ msgid "Howdy! Upload your Code Snippets export file and we&#8217;ll import the snippets to this site."
 
 
93
  msgstr ""
94
 
95
  #: includes/admin/import.php:29
96
+ msgid "You will need to go to the <a href=\"%s\">Manage Snippets</a> page to activate the imported snippets."
 
 
97
  msgstr ""
98
 
99
  #: includes/admin/import.php:31
100
+ msgid "Choose a Code Snippets (.xml) file to upload, then click Upload file and import."
 
 
101
  msgstr ""
102
 
103
  #: includes/admin/import.php:34
174
  msgstr ""
175
 
176
  #: includes/admin/single.php:63
177
+ msgid "Enter or paste the snippet code without the <code>&lt;?php</code> and <code>?&gt;</code> tags."
 
 
178
  msgstr ""
179
 
180
+ #: includes/admin/single.php:69 includes/class-list-table.php:156
181
  msgid "Description"
182
  msgstr ""
183
 
184
+ #: includes/admin/single.php:70
185
  msgid "(Optional)"
186
  msgstr ""
187
 
188
+ #: includes/admin/single.php:86
189
  msgid "Save"
190
  msgstr ""
191
 
192
+ #: includes/admin/single.php:87
193
  msgid "Cancel"
194
  msgstr ""
195
 
262
  msgstr ""
263
 
264
  #: includes/class-list-table.php:304
265
+ msgid "You do not appear to have any snippets available at this time. <a href=\"%s\">Add New&rarr;</a>"
 
 
266
  msgstr ""
267
 
268
  #: includes/help/import.php:5 includes/help/manage.php:5
271
  msgstr ""
272
 
273
  #: includes/help/import.php:7
274
+ msgid "Snippets are similar to plugins - they both extend and expand the functionality of WordPress. Snippets are more light-weight, just a few lines of code, and do not put as much load on your server. Here you can load snippets from a Code Snippets (.xml) import file into the database with your existing snippets."
 
 
 
 
 
275
  msgstr ""
276
 
277
  #: includes/help/import.php:12
279
  msgstr ""
280
 
281
  #: includes/help/import.php:14
282
+ msgid "You can load your snippets from a Code Snippets (.xml) import file using this page."
 
 
283
  msgstr ""
284
 
285
  #: includes/help/import.php:15
286
+ msgid "Snippets will be added to the database along with your existing snippets. Regardless of whether the snippets were active on the previous site, imported snippets are always inactive until activated using the <a href=\"%s\">Manage Snippets</a> page.</p>"
 
 
 
 
287
  msgstr ""
288
 
289
  #: includes/help/import.php:20
291
  msgstr ""
292
 
293
  #: includes/help/import.php:22
294
+ msgid "You can save your snippets to a Code Snippets (.xml) export file using the <a href=\"%s\">Manage Snippets</a> page."
 
 
295
  msgstr ""
296
 
297
  #: includes/help/import.php:26 includes/help/manage.php:27
300
  msgstr ""
301
 
302
  #: includes/help/import.php:27 includes/help/single.php:33
303
+ msgid "<a href=\"http://wordpress.org/extend/plugins/code-snippets\" target=\"_blank\">WordPress Extend</a>"
 
 
304
  msgstr ""
305
 
306
  #: includes/help/import.php:28 includes/help/manage.php:29
307
  #: includes/help/single.php:34
308
+ msgid "<a href=\"http://wordpress.org/support/plugin/code-snippets\" target=\"_blank\">Support Forums</a>"
 
 
309
  msgstr ""
310
 
311
  #: includes/help/import.php:29 includes/help/manage.php:30
312
  #: includes/help/single.php:35
313
+ msgid "<a href=\"http://code-snippets.bungeshea.com/\" target=\"_blank\">Project Website</a>"
 
 
314
  msgstr ""
315
 
316
  #: includes/help/manage.php:7
317
+ msgid "Snippets are similar to plugins - they both extend and expand the functionality of WordPress. Snippets are more light-weight, just a few lines of code, and do not put as much load on your server. Here you can manage your existing snippets and preform tasks on them such as activating, deactivating, deleting and exporting."
 
 
 
 
 
318
  msgstr ""
319
 
320
  #: includes/help/manage.php:12
322
  msgstr ""
323
 
324
  #: includes/help/manage.php:14
325
+ msgid "Be sure to check your snippets for errors before you activate them, as a faulty snippet could bring your whole blog down. If your site starts doing strange things, deactivate all your snippets and activate them one at a time."
 
 
 
326
  msgstr ""
327
 
328
  #: includes/help/manage.php:15
329
+ msgid "If something goes wrong with a snippet and you can't use WordPress, you can cause all snippets to stop executing by adding <code>define('CODE_SNIPPETS_SAFE_MODE', true);</code> to your <code>wp-config.php</code> file. After you have deactivated the offending snippet, you can turn off safe mode by removing this line or replacing <strong>true</strong> with <strong>false</strong>."
 
 
 
 
 
 
330
  msgstr ""
331
 
332
  #: includes/help/manage.php:20
334
  msgstr ""
335
 
336
  #: includes/help/manage.php:22
337
+ msgid "When you delete Code Snippets through the Plugins menu in WordPress it will clear up the <code>%1$s</code> table and a few other bits of data stored in the database. If you want to keep this data (ie: you are only temporally uninstalling Code Snippets) then remove the <code>%2$s</code> folder using FTP."
 
 
 
 
 
338
  msgstr ""
339
 
340
  #: includes/help/manage.php:23
341
+ msgid "Even if you're sure that you don't want to use Code Snippets ever again on this WordPress installation, you may want to use the export feature to back up your snippets."
 
 
 
342
  msgstr ""
343
 
344
  #: includes/help/manage.php:28
345
+ msgid "<a href=\"http://wordpress.org/extend/plugins/code-snippets\" target=\"_blank\">WordPress Extend</a></p>"
 
 
346
  msgstr ""
347
 
348
  #: includes/help/single.php:7
349
+ msgid "Snippets are similar to plugins - they both extend and expand the functionality of WordPress. Snippets are more light-weight, just a few lines of code, and do not put as much load on your server. Here you can add a new snippet, or edit an existing one."
 
 
 
 
350
  msgstr ""
351
 
352
  #: includes/help/single.php:11
355
 
356
  #: includes/help/single.php:13
357
  msgid ""
358
+ "Here are some links to websites which host a large number of snippets that you can add to your site.
359
+ "\t\t<ul>
360
+ "\t\t\t<li><a href=\"http://wp-snippets.com\" title=\"WordPress Snippets\">WP-Snippets</a></li>
361
+ "\t\t\t<li><a href=\"http://wpsnipp.com\" title=\"WP Snipp\">WP Snipp</a></li>
362
+ "\t\t\t<li><a href=\"http://www.catswhocode.com/blog/snippets\" title=\"Cats Who Code Snippet Library\">Cats Who Code</a></li>
363
+ "\t\t\t<li><a href=\"http://www.wpfunction.me\">WP Function Me</a></li>
 
 
 
 
364
  "\t\t</ul>"
365
  msgstr ""
366
 
367
  #: includes/help/single.php:20
368
+ msgid "More places to find snippets, as well as a selection of example snippets, can be found in the <a href=\"http://code-snippets.bungeshea.com/docs/finding-snippets/\">plugin documentation</a>"
 
 
 
369
  msgstr ""
370
 
371
  #: includes/help/single.php:24
373
  msgstr ""
374
 
375
  #: includes/help/single.php:26
376
+ msgid "You need to fill out the name and code fields for your snippet to be added. While the description field will add more information about how your snippet works, what is does and where you found it, it is completely optional."
 
 
 
377
  msgstr ""
378
 
379
  #: includes/help/single.php:27
380
+ msgid "Make sure that you don't add the <code>&lt;?php</code>, <code>&lt;?</code> or <code>?&gt;</code> the beginning and end of the code. You can however use these tags in the code to stop and start PHP sections"
 
 
 
381
  msgstr ""
382
 
383
  #: includes/help/single.php:28
384
+ msgid "Please be sure to check that your snippet is valid PHP code and will not produce errors before adding it through this page. While doing so will not become active straight away, it will help to minimise the chance of a faulty snippet becoming active on your site."
385
+ msgstr ""
386
+ #. Plugin Name of the plugin/theme
387
+ msgid "Code Snippets"
 
388
  msgstr ""
389
 
390
  #. Plugin URI of the plugin/theme
392
  msgstr ""
393
 
394
  #. Description of the plugin/theme
395
+ msgid "An easy, clean and simple way to add code snippets to your site. No need to edit to your theme's functions.php file again!"
 
 
396
  msgstr ""
397
 
398
  #. Author of the plugin/theme
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://code-snippets.bungeshea.com/donate/
4
  Tags: snippets, code, php, network, multisite
5
  Requires at least: 3.3
6
  Tested up to: 3.5
7
- Stable tag: 1.6
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/copyleft/gpl.html
10
 
@@ -22,7 +22,7 @@ You can use a graphical interface, similar to the Plugins menu, to manage, activ
22
 
23
  Although Code Snippets is designed to be easy-to-use and its interface looks, feels and acts as if it was a native part of WordPress, each screen includes a help tab, just in case you get stuck.
24
 
25
- Further information, documentation and updates are available on the [plugin homepage](http://code-snippets.bungeshea.com).
26
 
27
  [As featured on the WPMU blog](http://wpmu.org/wordpress-code-snippets)
28
 
@@ -59,7 +59,7 @@ No, just copy all the content inside those tags.
59
  Yes. Just add it but do not activate it yet.
60
 
61
  = How can I insert my snippet into the post text editor? =
62
- Snippets that you add to this plugin are not ment to be inserted into the text editor. Instead, they are run on your site just as if they were added to your functions.php file.
63
 
64
  = What do I use to write my snippets? =
65
  The [CodeMirror](http://codemirror.net) source-code editor will add line numbers, syntax highlighting, bracket matching, search, tabulate and other cool features to the code editor.
@@ -88,7 +88,7 @@ Yes. Click the checkboxes next to the snippets you want to export, and then choo
88
  You can run snippets across an entire multisite network by **Network Activating** Code Snippets through the Network Dashboard.
89
 
90
  = I need help with Code Snippets =
91
- You can get help with Code Snippets either on the [WordPress Support Forums](http://wordpress.org/support/plugin/code-snippets/) or on [GithHub](https://github.com/bungeshea/code-snippets/issues).
92
 
93
  = I have an idea for a cool feature for Code Snippets! =
94
  That's great! Let me know by starting (or adding to) a topic in the [Support Forums](http://wordpress.org/support/plugin/code-snippets/) or open an issue on [GitHub](https://github.com/bungeshea/code-snippets/issues).
@@ -106,6 +106,10 @@ That's fantastic! Join me on [GitHub](https://github.com/bungeshea/code-snippets
106
 
107
  == Changelog ==
108
 
 
 
 
 
109
  = 1.6 =
110
  * Updated code editor to use CodeMirror 3
111
  * Improved compatibility with Clean Options plugin
@@ -172,8 +176,6 @@ Plugin updates will be posted on the [plugin's homepage](http://code-snippets.bu
172
  * Snippets are stored in the `wp_snippets` table in the WordPress database (the table name may differ depending on what your table prefix is set to).
173
  * Code Snippets will automatically clean up its data when deleted through the WordPress dashboard.
174
 
175
- You can also contribute to the code at [GitHub](https://github.com/bungeshea/code-snippets).
176
-
177
  == Upgrade Notice ==
178
 
179
  = 1.6 =
4
  Tags: snippets, code, php, network, multisite
5
  Requires at least: 3.3
6
  Tested up to: 3.5
7
+ Stable tag: 1.6.1
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/copyleft/gpl.html
10
 
22
 
23
  Although Code Snippets is designed to be easy-to-use and its interface looks, feels and acts as if it was a native part of WordPress, each screen includes a help tab, just in case you get stuck.
24
 
25
+ Further information, documentation and updates are available on the [plugin homepage](http://code-snippets.bungeshea.com). You can also contribute to the code at [GitHub](https://github.com/bungeshea/code-snippets).
26
 
27
  [As featured on the WPMU blog](http://wpmu.org/wordpress-code-snippets)
28
 
59
  Yes. Just add it but do not activate it yet.
60
 
61
  = How can I insert my snippet into the post text editor? =
62
+ Snippets that you add to this plugin are not meant to be inserted into the text editor. Instead, they are run on your site just as if they were added to your functions.php file.
63
 
64
  = What do I use to write my snippets? =
65
  The [CodeMirror](http://codemirror.net) source-code editor will add line numbers, syntax highlighting, bracket matching, search, tabulate and other cool features to the code editor.
88
  You can run snippets across an entire multisite network by **Network Activating** Code Snippets through the Network Dashboard.
89
 
90
  = I need help with Code Snippets =
91
+ You can get help with Code Snippets either on the [WordPress Support Forums](http://wordpress.org/support/plugin/code-snippets/), on [GithHub](https://github.com/bungeshea/code-snippets/issues), or on [WordPress Answers](http://wordpress.stackexchange.com).
92
 
93
  = I have an idea for a cool feature for Code Snippets! =
94
  That's great! Let me know by starting (or adding to) a topic in the [Support Forums](http://wordpress.org/support/plugin/code-snippets/) or open an issue on [GitHub](https://github.com/bungeshea/code-snippets/issues).
106
 
107
  == Changelog ==
108
 
109
+ = 1.6.1 =
110
+ * Fixed a bug with permissions not being applied on install ([#](http://wordpress.org/support/topic/permissions-problem-after-install))
111
+ * Fixed a bug in the uninstall method ([#](http://wordpress.org/support/topic/bug-in-delete-script))
112
+
113
  = 1.6 =
114
  * Updated code editor to use CodeMirror 3
115
  * Improved compatibility with Clean Options plugin
176
  * Snippets are stored in the `wp_snippets` table in the WordPress database (the table name may differ depending on what your table prefix is set to).
177
  * Code Snippets will automatically clean up its data when deleted through the WordPress dashboard.
178
 
 
 
179
  == Upgrade Notice ==
180
 
181
  = 1.6 =