Skip to content

Commit

Permalink
Merge branch 'release/1.0.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
gregpriday committed Feb 24, 2016
2 parents 8615078 + 468f664 commit 5aa2302
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build
Submodule build updated 3 files
+55 −1 README.md
+63 −27 gulpfile.js
+6 −1 package.json
3 changes: 3 additions & 0 deletions build-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ module.exports = {
'!{tmp,tmp/**}' // Ignore dist/ and contents
]
},
bust: {
src: []
},
copy: {
src: [
'**/!(*.js|*.less)', // Everything except .js and .less files
Expand Down
4 changes: 3 additions & 1 deletion js/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,9 @@
( e.keyCode === 51 && e.shiftKey ) ||
( e.keyCode === 189 && e.shiftKey )
) {
cm.showHint(e);
cm.showHint( {
completeSingle: false
} );
}
});
},
Expand Down
10 changes: 9 additions & 1 deletion lib/codemirror/addon/lint/css-lint.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,15 @@
CodeMirror.registerHelper("lint", "css", function(text) {
var found = [];
if (!window.CSSLint) return found;
var results = CSSLint.verify(text), messages = results.messages, message = null;
// This has been modified to only display certain errors
var results = CSSLint.verify(text, {
"box-model": 1,
"display-property-grouping": 1,
"duplicate-properties": 1,
"empty-rules": 1,
"known-properties": 1
}), messages = results.messages, message = null;

for ( var i = 0; i < messages.length; i++) {
message = messages[i];
var startLine = message.line -1, endLine = message.line -1, startCol = message.col -1, endCol = message.col;
Expand Down
6 changes: 6 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Tags: css, design, edit, customize
Requires at least: 3.9
Tested up to: 4.4.1
Stable tag: trunk
Build time: unbuilt
License: GPLv2 or later
Contributors: gpriday

Expand Down Expand Up @@ -61,6 +62,11 @@ We offer free support on the [SiteOrigin support forums](https://siteorigin.com/

== Changelog ==

= 1.0.6 - 24 February 2016=
* Disabled autocompletion on single item (automatic autocompletion).
* Fixed conflict with NextGen Gallery.
* Only display relevant linting messages.

= 1.0.5 - 21 January 2016=
* Updated to latest version of Code Mirror.

Expand Down
11 changes: 10 additions & 1 deletion so-css.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// Handle the legacy CSS editor that came with SiteOrigin themes
include plugin_dir_path(__FILE__) . '/inc/legacy.php';

define('SOCSS_VERSION', '1.0.2');
define('SOCSS_VERSION', 'dev');
define('SOCSS_JS_SUFFIX', '');

/**
Expand Down Expand Up @@ -41,6 +41,8 @@ function __construct(){
add_action( 'wp_ajax_socss_hide_getting_started', array( $this, 'admin_action_hide_getting_started' ) );

if( isset($_GET['so_css_preview']) && !is_admin() ) {

add_action('plugins_loaded', array($this, 'disable_ngg_resource_manager'));
add_filter( 'show_admin_bar', '__return_false' );
add_filter( 'wp_enqueue_scripts', array($this, 'enqueue_inspector_scripts') );
add_filter( 'wp_footer', array($this, 'inspector_templates') );
Expand All @@ -50,6 +52,13 @@ function __construct(){
}
}

function disable_ngg_resource_manager() {
if( !current_user_can('edit_theme_options') ) return;

//The NextGen Gallery plugin does some weird interfering with the output buffer.
define('NGG_DISABLE_RESOURCE_MANAGER', true);
}

/**
* Get a singleton of the SiteOrigin CSS.
*
Expand Down

0 comments on commit 5aa2302

Please sign in to comment.