Version Description
(25 Jan 2019) = * Removed potentially problematic cursor position saving feature
Download this release
Release Info
Developer | bungeshea |
Plugin | Code Snippets |
Version | 2.13.2 |
Comparing to | |
See all releases |
Code changes from version 2.13.1 to 2.13.2
- code-snippets.php +3 -3
- js/min/edit.js +1 -1
- languages/code-snippets.pot +21 -21
- php/admin-menus/class-edit-menu.php +0 -6
- readme.txt +6 -3
code-snippets.php
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
* @author Shea Bunge <shea@sheabunge.com>
|
11 |
* @copyright 2012-2019 Shea Bunge
|
12 |
* @license MIT http://opensource.org/licenses/MIT
|
13 |
-
* @version 2.13.
|
14 |
* @link https://github.com/sheabunge/code-snippets
|
15 |
*/
|
16 |
|
@@ -20,7 +20,7 @@ Plugin URI: https://github.com/sheabunge/code-snippets
|
|
20 |
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!
|
21 |
Author: Shea Bunge
|
22 |
Author URI: https://sheabunge.com
|
23 |
-
Version: 2.13.
|
24 |
License: MIT
|
25 |
License URI: license.txt
|
26 |
Text Domain: code-snippets
|
@@ -42,7 +42,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
42 |
* @since 2.0
|
43 |
* @var string A PHP-standardized version number string
|
44 |
*/
|
45 |
-
define( 'CODE_SNIPPETS_VERSION', '2.13.
|
46 |
|
47 |
/**
|
48 |
* The full path to the main file of this plugin
|
10 |
* @author Shea Bunge <shea@sheabunge.com>
|
11 |
* @copyright 2012-2019 Shea Bunge
|
12 |
* @license MIT http://opensource.org/licenses/MIT
|
13 |
+
* @version 2.13.2
|
14 |
* @link https://github.com/sheabunge/code-snippets
|
15 |
*/
|
16 |
|
20 |
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!
|
21 |
Author: Shea Bunge
|
22 |
Author URI: https://sheabunge.com
|
23 |
+
Version: 2.13.2
|
24 |
License: MIT
|
25 |
License URI: license.txt
|
26 |
Text Domain: code-snippets
|
42 |
* @since 2.0
|
43 |
* @var string A PHP-standardized version number string
|
44 |
*/
|
45 |
+
define( 'CODE_SNIPPETS_VERSION', '2.13.2' );
|
46 |
|
47 |
/**
|
48 |
* The full path to the main file of this plugin
|
js/min/edit.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function i(c,
|
1 |
+
!function i(a,c,u){function d(t,e){if(!c[t]){if(!a[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(p)return p(t,!0);var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}var o=c[t]={exports:{}};a[t][0].call(o.exports,function(e){return d(a[t][1][e]||e)},o,o.exports,i,a,c,u)}return c[t].exports}for(var p="function"==typeof require&&require,e=0;e<u.length;e++)d(u[e]);return d}({1:[function(e,t,r){"use strict";var n,o,i;window.code_snippets_editor=(n=window.Code_Snippets_CodeMirror,o=code_snippets_editor_atts,i=function(e){return document.getElementById("save_snippet").click()},o.extraKeys=window.navigator.platform.match("Mac")?{"Cmd-Enter":i,"Cmd-S":i}:{"Ctrl-Enter":i,"Ctrl-S":i},window.navigator.platform.match("Mac")&&(document.querySelector(".editor-help-text").className+=" platform-mac"),n.fromTextArea(document.getElementById("snippet_code"),o))},{}]},{},[1]);
|
languages/code-snippets.pot
CHANGED
@@ -293,15 +293,15 @@ msgstr ""
|
|
293 |
msgid "ID"
|
294 |
msgstr ""
|
295 |
|
296 |
-
#: php/class-list-table.php:332, php/admin-menus/class-edit-menu.php:
|
297 |
msgid "Description"
|
298 |
msgstr ""
|
299 |
|
300 |
-
#: php/class-list-table.php:333, php/admin-menus/class-edit-menu.php:
|
301 |
msgid "Tags"
|
302 |
msgstr ""
|
303 |
|
304 |
-
#: php/class-list-table.php:334, php/admin-menus/class-edit-menu.php:
|
305 |
msgid "Priority"
|
306 |
msgstr ""
|
307 |
|
@@ -466,76 +466,76 @@ msgstr ""
|
|
466 |
msgid "If you prefer, you can close this page and discard the changes you just made. No changes will be made to this site."
|
467 |
msgstr ""
|
468 |
|
469 |
-
#: php/admin-menus/class-edit-menu.php:
|
470 |
msgid "Enter a list of tags; separated by commas"
|
471 |
msgstr ""
|
472 |
|
473 |
-
#: php/admin-menus/class-edit-menu.php:
|
474 |
msgid "Snippets with a lower priority number will run before those with a higher number."
|
475 |
msgstr ""
|
476 |
|
477 |
-
#: php/admin-menus/class-edit-menu.php:
|
478 |
msgid "Run snippet everywhere"
|
479 |
msgstr ""
|
480 |
|
481 |
-
#: php/admin-menus/class-edit-menu.php:
|
482 |
msgid "Only run in administration area"
|
483 |
msgstr ""
|
484 |
|
485 |
-
#: php/admin-menus/class-edit-menu.php:
|
486 |
msgid "Only run on site front-end"
|
487 |
msgstr ""
|
488 |
|
489 |
-
#: php/admin-menus/class-edit-menu.php:
|
490 |
msgid "Only run once"
|
491 |
msgstr ""
|
492 |
|
493 |
-
#: php/admin-menus/class-edit-menu.php:
|
494 |
msgid "Scope"
|
495 |
msgstr ""
|
496 |
|
497 |
-
#: php/admin-menus/class-edit-menu.php:
|
498 |
msgid "Sharing Settings"
|
499 |
msgstr ""
|
500 |
|
501 |
-
#: php/admin-menus/class-edit-menu.php:
|
502 |
msgid "Allow this snippet to be activated on individual sites on the network"
|
503 |
msgstr ""
|
504 |
|
505 |
#. translators: %d: line of file where error originated
|
506 |
-
#: php/admin-menus/class-edit-menu.php:
|
507 |
msgid "The snippet has been deactivated due to an error on line %d:"
|
508 |
msgstr ""
|
509 |
|
510 |
-
#: php/admin-menus/class-edit-menu.php:
|
511 |
msgid "The snippet has been deactivated due to an error in the code."
|
512 |
msgstr ""
|
513 |
|
514 |
-
#: php/admin-menus/class-edit-menu.php:
|
515 |
msgid "An error occurred when saving the snippet."
|
516 |
msgstr ""
|
517 |
|
518 |
-
#: php/admin-menus/class-edit-menu.php:
|
519 |
msgid "Snippet <strong>added</strong>."
|
520 |
msgstr ""
|
521 |
|
522 |
-
#: php/admin-menus/class-edit-menu.php:
|
523 |
msgid "Snippet <strong>updated</strong>."
|
524 |
msgstr ""
|
525 |
|
526 |
-
#: php/admin-menus/class-edit-menu.php:
|
527 |
msgid "Snippet <strong>added</strong> and <strong>activated</strong>."
|
528 |
msgstr ""
|
529 |
|
530 |
-
#: php/admin-menus/class-edit-menu.php:
|
531 |
msgid "Snippet <strong>added</strong> and <strong>executed</strong>."
|
532 |
msgstr ""
|
533 |
|
534 |
-
#: php/admin-menus/class-edit-menu.php:
|
535 |
msgid "Snippet <strong>updated</strong> and <strong>activated</strong>."
|
536 |
msgstr ""
|
537 |
|
538 |
-
#: php/admin-menus/class-edit-menu.php:
|
539 |
msgid "Snippet <strong>updated</strong> and <strong>deactivated</strong>."
|
540 |
msgstr ""
|
541 |
|
293 |
msgid "ID"
|
294 |
msgstr ""
|
295 |
|
296 |
+
#: php/class-list-table.php:332, php/admin-menus/class-edit-menu.php:303
|
297 |
msgid "Description"
|
298 |
msgstr ""
|
299 |
|
300 |
+
#: php/class-list-table.php:333, php/admin-menus/class-edit-menu.php:336
|
301 |
msgid "Tags"
|
302 |
msgstr ""
|
303 |
|
304 |
+
#: php/class-list-table.php:334, php/admin-menus/class-edit-menu.php:355
|
305 |
msgid "Priority"
|
306 |
msgstr ""
|
307 |
|
466 |
msgid "If you prefer, you can close this page and discard the changes you just made. No changes will be made to this site."
|
467 |
msgstr ""
|
468 |
|
469 |
+
#: php/admin-menus/class-edit-menu.php:341
|
470 |
msgid "Enter a list of tags; separated by commas"
|
471 |
msgstr ""
|
472 |
|
473 |
+
#: php/admin-menus/class-edit-menu.php:354
|
474 |
msgid "Snippets with a lower priority number will run before those with a higher number."
|
475 |
msgstr ""
|
476 |
|
477 |
+
#: php/admin-menus/class-edit-menu.php:372
|
478 |
msgid "Run snippet everywhere"
|
479 |
msgstr ""
|
480 |
|
481 |
+
#: php/admin-menus/class-edit-menu.php:373
|
482 |
msgid "Only run in administration area"
|
483 |
msgstr ""
|
484 |
|
485 |
+
#: php/admin-menus/class-edit-menu.php:374
|
486 |
msgid "Only run on site front-end"
|
487 |
msgstr ""
|
488 |
|
489 |
+
#: php/admin-menus/class-edit-menu.php:375
|
490 |
msgid "Only run once"
|
491 |
msgstr ""
|
492 |
|
493 |
+
#: php/admin-menus/class-edit-menu.php:378
|
494 |
msgid "Scope"
|
495 |
msgstr ""
|
496 |
|
497 |
+
#: php/admin-menus/class-edit-menu.php:399
|
498 |
msgid "Sharing Settings"
|
499 |
msgstr ""
|
500 |
|
501 |
+
#: php/admin-menus/class-edit-menu.php:403
|
502 |
msgid "Allow this snippet to be activated on individual sites on the network"
|
503 |
msgstr ""
|
504 |
|
505 |
#. translators: %d: line of file where error originated
|
506 |
+
#: php/admin-menus/class-edit-menu.php:464
|
507 |
msgid "The snippet has been deactivated due to an error on line %d:"
|
508 |
msgstr ""
|
509 |
|
510 |
+
#: php/admin-menus/class-edit-menu.php:469
|
511 |
msgid "The snippet has been deactivated due to an error in the code."
|
512 |
msgstr ""
|
513 |
|
514 |
+
#: php/admin-menus/class-edit-menu.php:476
|
515 |
msgid "An error occurred when saving the snippet."
|
516 |
msgstr ""
|
517 |
|
518 |
+
#: php/admin-menus/class-edit-menu.php:482
|
519 |
msgid "Snippet <strong>added</strong>."
|
520 |
msgstr ""
|
521 |
|
522 |
+
#: php/admin-menus/class-edit-menu.php:483
|
523 |
msgid "Snippet <strong>updated</strong>."
|
524 |
msgstr ""
|
525 |
|
526 |
+
#: php/admin-menus/class-edit-menu.php:484
|
527 |
msgid "Snippet <strong>added</strong> and <strong>activated</strong>."
|
528 |
msgstr ""
|
529 |
|
530 |
+
#: php/admin-menus/class-edit-menu.php:485
|
531 |
msgid "Snippet <strong>added</strong> and <strong>executed</strong>."
|
532 |
msgstr ""
|
533 |
|
534 |
+
#: php/admin-menus/class-edit-menu.php:486
|
535 |
msgid "Snippet <strong>updated</strong> and <strong>activated</strong>."
|
536 |
msgstr ""
|
537 |
|
538 |
+
#: php/admin-menus/class-edit-menu.php:487
|
539 |
msgid "Snippet <strong>updated</strong> and <strong>deactivated</strong>."
|
540 |
msgstr ""
|
541 |
|
php/admin-menus/class-edit-menu.php
CHANGED
@@ -288,12 +288,6 @@ class Code_Snippets_Edit_Menu extends Code_Snippets_Admin_Menu {
|
|
288 |
code_snippets()->get_menu_url( 'edit' )
|
289 |
);
|
290 |
|
291 |
-
if ( isset( $_POST['snippet_editor_cursor_line'], $_POST['snippet_editor_cursor_ch'] ) &&
|
292 |
-
is_numeric( $_POST['snippet_editor_cursor_line'] ) && is_numeric( $_POST['snippet_editor_cursor_ch'] ) ) {
|
293 |
-
$redirect_uri = add_query_arg( 'cursor_line', intval( $_POST['snippet_editor_cursor_line'] ), $redirect_uri );
|
294 |
-
$redirect_uri = add_query_arg( 'cursor_ch', intval( $_POST['snippet_editor_cursor_ch'] ), $redirect_uri );
|
295 |
-
}
|
296 |
-
|
297 |
wp_redirect( esc_url_raw( $redirect_uri ) );
|
298 |
exit;
|
299 |
}
|
288 |
code_snippets()->get_menu_url( 'edit' )
|
289 |
);
|
290 |
|
|
|
|
|
|
|
|
|
|
|
|
|
291 |
wp_redirect( esc_url_raw( $redirect_uri ) );
|
292 |
exit;
|
293 |
}
|
readme.txt
CHANGED
@@ -5,15 +5,15 @@ Tags: code-snippets, snippets, code, php, network, multisite
|
|
5 |
Requires at least: 3.6
|
6 |
Tested up to: 5.0.1
|
7 |
Requires PHP: 5.2
|
8 |
-
Stable tag: 2.13.
|
9 |
License: MIT
|
10 |
License URI: license.txt
|
11 |
|
12 |
-
An easy, clean and simple way to
|
13 |
|
14 |
== Description ==
|
15 |
|
16 |
-
Code Snippets is an easy, clean and simple way to
|
17 |
|
18 |
A snippet is a small chunk of PHP code that you can use to extend the functionality of a WordPress-powered website; essentially a mini-plugin with less load on your site.
|
19 |
Most snippet-hosting sites tell you to add snippet code to your active theme's `functions.php` file, which can get rather long and messy after a while.
|
@@ -122,6 +122,9 @@ That's fantastic! Fork the [repository on GitHub](http://github.com/sheabunge/co
|
|
122 |
|
123 |
== Changelog ==
|
124 |
|
|
|
|
|
|
|
125 |
= 2.13.1 (22 Jan 2019) =
|
126 |
* Added: Add menu buttons to settings page for compact menu
|
127 |
* Updated: French translation updated thanks to momo-fr
|
5 |
Requires at least: 3.6
|
6 |
Tested up to: 5.0.1
|
7 |
Requires PHP: 5.2
|
8 |
+
Stable tag: 2.13.2
|
9 |
License: MIT
|
10 |
License URI: license.txt
|
11 |
|
12 |
+
An easy, clean and simple way to run code snippets on your site.
|
13 |
|
14 |
== Description ==
|
15 |
|
16 |
+
Code Snippets is an easy, clean and simple way to run PHP code snippets on your site. It removes the need to add custom snippets to your theme theme's `functions.php` file.
|
17 |
|
18 |
A snippet is a small chunk of PHP code that you can use to extend the functionality of a WordPress-powered website; essentially a mini-plugin with less load on your site.
|
19 |
Most snippet-hosting sites tell you to add snippet code to your active theme's `functions.php` file, which can get rather long and messy after a while.
|
122 |
|
123 |
== Changelog ==
|
124 |
|
125 |
+
= 2.13.2 (25 Jan 2019) =
|
126 |
+
* Removed potentially problematic cursor position saving feature
|
127 |
+
|
128 |
= 2.13.1 (22 Jan 2019) =
|
129 |
* Added: Add menu buttons to settings page for compact menu
|
130 |
* Updated: French translation updated thanks to momo-fr
|