Version Description
- Fixed the default values of new setting not being applied
- Fixed missing background of tags input
Download this release
Release Info
Developer | bungeshea |
Plugin | Code Snippets |
Version | 2.2.1 |
Comparing to | |
See all releases |
Code changes from version 2.2.0 to 2.2.1
- code-snippets.php +3 -3
- css/min/edit.css +1 -1
- includes/edit/edit.php +1 -1
- includes/settings/settings.php +2 -2
- languages/code-snippets.pot +1 -1
- readme.txt +6 -2
code-snippets.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
* contribute to the localization, please see http://code-snippets.bungeshea.com
|
8 |
*
|
9 |
* @package Code_Snippets
|
10 |
-
* @version 2.2.
|
11 |
* @author Shea Bunge <http://bungeshea.com/>
|
12 |
* @copyright Copyright (c) 2012-2014, Shea Bunge
|
13 |
* @link http://code-snippets.bungeshea.com
|
@@ -20,7 +20,7 @@ Plugin URI: http://code-snippets.bungeshea.com
|
|
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: http://bungeshea.com
|
23 |
-
Version: 2.2.
|
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.2.
|
46 |
|
47 |
/**
|
48 |
* The full path to the main file of this plugin
|
7 |
* contribute to the localization, please see http://code-snippets.bungeshea.com
|
8 |
*
|
9 |
* @package Code_Snippets
|
10 |
+
* @version 2.2.1
|
11 |
* @author Shea Bunge <http://bungeshea.com/>
|
12 |
* @copyright Copyright (c) 2012-2014, Shea Bunge
|
13 |
* @link http://code-snippets.bungeshea.com
|
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: http://bungeshea.com
|
23 |
+
Version: 2.2.1
|
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.2.1' );
|
46 |
|
47 |
/**
|
48 |
* The full path to the main file of this plugin
|
css/min/edit.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
h3{margin:1em 0}label{cursor:auto}label[for='snippet_description'] h3 div{position:absolute}.submit .button{margin-right:.5em}.snippet-scope div{margin-right:30px;display:inline-block}.CodeMirror{width:100%;height:auto;min-height:300px;border:1px solid #dfdfdf;border-radius:3px;background-color:#fff}.CodeMirror-scroll{overflow-x:auto;overflow-y:hidden}.CodeMirror-sizer{min-height:300px!important}.CodeMirror-focused .cm-matchhighlight{color:#fff!important;outline:1px solid green}
|
1 |
+
h3{margin:1em 0}label{cursor:auto}label[for='snippet_description'] h3 div{position:absolute}ul.tagit{background-color:#fff}.submit .button{margin-right:.5em}.snippet-scope div{margin-right:30px;display:inline-block}.CodeMirror{width:100%;height:auto;min-height:300px;border:1px solid #dfdfdf;border-radius:3px;background-color:#fff}.CodeMirror-scroll{overflow-x:auto;overflow-y:hidden}.CodeMirror-sizer{min-height:300px!important}.CodeMirror-focused .cm-matchhighlight{color:#fff!important;outline:1px solid green}
|
includes/edit/edit.php
CHANGED
@@ -90,7 +90,7 @@ function code_snippets_load_single_menu() {
|
|
90 |
require plugin_dir_path( __FILE__ ) . 'admin-help.php';
|
91 |
|
92 |
/* Enqueue the code editor and other scripts and styles */
|
93 |
-
|
94 |
|
95 |
/* Don't allow visiting the edit snippet page without a valid ID */
|
96 |
if ( code_snippets_get_menu_slug( 'edit' ) === $_REQUEST['page'] ) {
|
90 |
require plugin_dir_path( __FILE__ ) . 'admin-help.php';
|
91 |
|
92 |
/* Enqueue the code editor and other scripts and styles */
|
93 |
+
add_action( 'admin_enqueue_scripts', 'code_snippets_enqueue_codemirror', 9 );
|
94 |
|
95 |
/* Don't allow visiting the edit snippet page without a valid ID */
|
96 |
if ( code_snippets_get_menu_slug( 'edit' ) === $_REQUEST['page'] ) {
|
includes/settings/settings.php
CHANGED
@@ -31,8 +31,8 @@ function code_snippets_get_settings_fields() {
|
|
31 |
*/
|
32 |
function code_snippets_get_settings() {
|
33 |
$default = Code_Snippets_Settings::get_defaults();
|
34 |
-
$saved = get_option( 'code_snippets_settings',
|
35 |
-
return
|
36 |
}
|
37 |
|
38 |
/**
|
31 |
*/
|
32 |
function code_snippets_get_settings() {
|
33 |
$default = Code_Snippets_Settings::get_defaults();
|
34 |
+
$saved = get_option( 'code_snippets_settings', array() );
|
35 |
+
return array_replace_recursive( $default, $saved );
|
36 |
}
|
37 |
|
38 |
/**
|
languages/code-snippets.pot
CHANGED
@@ -8,7 +8,7 @@ msgid ""
|
|
8 |
msgstr ""
|
9 |
"Project-Id-Version: code-snippets 2.1.0\n"
|
10 |
"Report-Msgid-Bugs-To: \n"
|
11 |
-
"POT-Creation-Date: 2015-05-10
|
12 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
13 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
14 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
8 |
msgstr ""
|
9 |
"Project-Id-Version: code-snippets 2.1.0\n"
|
10 |
"Report-Msgid-Bugs-To: \n"
|
11 |
+
"POT-Creation-Date: 2015-05-10 23:25+1000\n"
|
12 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
13 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
14 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://bungeshea.com/donate/
|
|
4 |
Tags: code-snippets, snippets, code, php, network, multisite
|
5 |
Requires at least: 3.3
|
6 |
Tested up to: 4.2.2
|
7 |
-
Stable tag: 2.2.
|
8 |
License: MIT
|
9 |
License URI: license.txt
|
10 |
|
@@ -116,6 +116,10 @@ That's fantastic! Fork the [repository on GitHub](http://github.com/sheabunge/co
|
|
116 |
|
117 |
== Changelog ==
|
118 |
|
|
|
|
|
|
|
|
|
119 |
= 2.2.0 =
|
120 |
* Introduced CodeSniffer testing on code
|
121 |
* Fixed description heading disappearing when media buttons enabled
|
@@ -321,7 +325,7 @@ __Fixed__
|
|
321 |
|
322 |
== Upgrade Notice ==
|
323 |
|
324 |
-
= 2.2.
|
325 |
New snippet scope feature; fixed bug with translations not loading; minified all css and js
|
326 |
|
327 |
= 2.1.0 =
|
4 |
Tags: code-snippets, snippets, code, php, network, multisite
|
5 |
Requires at least: 3.3
|
6 |
Tested up to: 4.2.2
|
7 |
+
Stable tag: 2.2.1
|
8 |
License: MIT
|
9 |
License URI: license.txt
|
10 |
|
116 |
|
117 |
== Changelog ==
|
118 |
|
119 |
+
= 2.2.1 =
|
120 |
+
* Fixed the default values of new setting not being applied
|
121 |
+
* Fixed missing background of tags input
|
122 |
+
|
123 |
= 2.2.0 =
|
124 |
* Introduced CodeSniffer testing on code
|
125 |
* Fixed description heading disappearing when media buttons enabled
|
325 |
|
326 |
== Upgrade Notice ==
|
327 |
|
328 |
+
= 2.2.1 =
|
329 |
New snippet scope feature; fixed bug with translations not loading; minified all css and js
|
330 |
|
331 |
= 2.1.0 =
|