Skip to content

Commit

Permalink
Merge branch 'release/1.2.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
Misplon committed May 15, 2020
2 parents ceb026e + c0a6c38 commit 7dc6177
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 17 deletions.
2 changes: 1 addition & 1 deletion build
Submodule build updated 2 files
+978 −520 package-lock.json
+9 −2 package.json
12 changes: 12 additions & 0 deletions css/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@
#so-custom-css-info *:last-child {
margin-bottom: 0;
}
#so-custom-css-info p.submit {
padding-top: 1px;
}
#so-custom-css-info p.submit .button-primary {
font-size: 14px;
min-height: 40px;
width: 100%;
}
#so-custom-css-revisions ol {
list-style: none;
margin: 0;
Expand Down Expand Up @@ -334,6 +342,10 @@
border-radius: 0;
font-size: 12px;
}
#so-custom-css-properties .sections .fields-table .socss-field-number input {
margin: 0;
width: 120px;
}
#so-custom-css-properties .sections .fields-table .minicolors input {
box-sizing: border-box;
height: 30px;
Expand Down
15 changes: 15 additions & 0 deletions css/admin.less
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,16 @@
*:last-child {
margin-bottom: 0;
}

p.submit {
padding-top: 1px;

.button-primary {
font-size: 14px;
min-height: 40px;
width: 100%;
}
}
}

#so-custom-css-revisions {
Expand Down Expand Up @@ -398,6 +408,11 @@
font-size: 12px;
}

.socss-field-number input {
margin: 0;
width: 120px;
}

.minicolors input {
box-sizing: border-box;
height: 30px;
Expand Down
7 changes: 6 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
=== SiteOrigin CSS ===
Tags: css, design, edit, customize
Requires at least: 3.9
Tested up to: 5.3.2
Tested up to: 5.5
Stable tag: trunk
Build time: unbuilt
License: GPLv2 or later
Expand Down Expand Up @@ -65,6 +65,11 @@ We offer free support on the [SiteOrigin support forums](https://siteorigin.com/

== Changelog ==

= 1.2.6 - 15 May 2020 =
* Minor visual editor form styling fixes.
* Resolved PHP 7.4 `preg_replace()` warning.
* Moved the basic editor Save button to the sidebar.

= 1.2.5 - 05 February 2020 =
* Removed `themeCSS` localized script to prevent `preg_replace()` warning.
* Minor form styling fixes.
Expand Down
20 changes: 9 additions & 11 deletions so-css.php
Original file line number Diff line number Diff line change
Expand Up @@ -676,11 +676,10 @@ function get_theme_css() {

// Remove all CSS comments
$regex = array(
"`^([\t\s]+)`ism" => '',
"`^\/\*(.+?)\*\/`ism" => "",
"`([\n\A;]+)\/\*(.+?)\*\/`ism" => "$1",
"`([\n\A;\s]+)//(.+?)[\n\r]`ism" => "$1\n",
"`(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+`ism" => "\n"
"`^([\t\s]+)`ism" => '',
"`^\/\*(.+?)\*\/`ism" => "",
"`(\A|[\n;]+)/\*[^*]*\*+(?:[^/*][^*]*\*+)*/`" => "$1",
"`(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+`ism" => "\n"
);
$css = preg_replace( array_keys( $regex ), $regex, $css );
$css = preg_replace( '/\s+/', ' ', $css );
Expand Down Expand Up @@ -724,13 +723,12 @@ function inline_inspector_scripts() {
if ( ! current_user_can( 'edit_theme_options' ) ) {
return;
}

$regex = array(
"`^([\t\s]+)`ism" => '',
"`^\/\*(.+?)\*\/`ism" => "",
"`([\n\A;]+)\/\*(.+?)\*\/`ism" => "$1",
"`([\n\A;\s]+)//(.+?)[\n\r]`ism" => "$1\n",
"`(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+`ism" => "\n"
"`^([\t\s]+)`ism" => '',
"`^\/\*(.+?)\*\/`ism" => "",
"`(\A|[\n;]+)/\*[^*]*\*+(?:[^/*][^*]*\*+)*/`" => "$1",
"`(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+`ism" => "\n"
);

global $wp_styles;
Expand Down
7 changes: 3 additions & 4 deletions tpl/page.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@

<div id="poststuff">
<div id="so-custom-css-info">
<p class="submit">
<input type="submit" name="siteorigin_custom_css_save" class="button-primary" value="<?php esc_attr_e( $save_button_label ); ?>" />
</p>

<?php if( $this->display_teaser() ) : ?>
<div class="postbox">
Expand Down Expand Up @@ -102,10 +105,6 @@
</div>
<p class="description"><?php esc_html_e( $editor_description ) ?></p>

<p class="submit">
<input type="submit" name="siteorigin_custom_css_save" class="button-primary" value="<?php esc_attr_e( $save_button_label ); ?>" />
</p>

<div class="custom-css-preview">

</div>
Expand Down

0 comments on commit 7dc6177

Please sign in to comment.