From 104dbbf0ddc20d3d73290696354ed51a902bbf56 Mon Sep 17 00:00:00 2001 From: Alex S <17275120+AlexGStapleton@users.noreply.github.com> Date: Tue, 19 May 2020 00:14:45 +1000 Subject: [PATCH 1/6] Fix saving issue by moving form --- tpl/page.php | 144 ++++++++++++++++++++++++++------------------------- 1 file changed, 73 insertions(+), 71 deletions(-) diff --git a/tpl/page.php b/tpl/page.php index 89d0724..a887561 100644 --- a/tpl/page.php +++ b/tpl/page.php @@ -35,101 +35,103 @@
-
-

- -

- - display_teaser() ) : ?> -
-

-
- Google Web Font selector to SiteOrigin CSS so you can easily change any font.', 'so-css' ) , '', '' ); ?> +
+
+

+ +

+ + display_teaser() ) : ?> +
+

+
+ Google Web Font selector to SiteOrigin CSS so you can easily change any font.', 'so-css' ) , '', '' ); ?> +
-
- - - ID, 'socss_hide_gs' ) ) : ?> -
-

- - -

+ + + ID, 'socss_hide_gs' ) ) : ?> +
+

+ + +

+
+ +
+
+ + +
+

- +
    + custom_css_revisions_list( $theme, $socss_post_id, $current_revision ); + ?> +
- - -
-

-
-
    - custom_css_revisions_list( $theme, $socss_post_id, $current_revision ); - ?> -
-
+
-
+
+ +
+
+
+ +
+ +
    +
+
- +
-
-
- - -
    -
-
+
+ + +
+

- - - + -
- -
- - -
-

-
+
-
+
- +
+ +
+ +
+
-
+
    +
-
- -
- +
-
- -
    -
-
- -
+
From 666ee646e00e920d49198193b7b82d02309d6c9e Mon Sep 17 00:00:00 2001 From: Alex S <17275120+AlexGStapleton@users.noreply.github.com> Date: Tue, 19 May 2020 01:49:17 +1000 Subject: [PATCH 2/6] Revert "Fix saving issue by moving form" This reverts commit 104dbbf0ddc20d3d73290696354ed51a902bbf56. --- tpl/page.php | 144 +++++++++++++++++++++++++-------------------------- 1 file changed, 71 insertions(+), 73 deletions(-) diff --git a/tpl/page.php b/tpl/page.php index a887561..89d0724 100644 --- a/tpl/page.php +++ b/tpl/page.php @@ -35,103 +35,101 @@
-
-
-

- -

- - display_teaser() ) : ?> -
-

-
- Google Web Font selector to SiteOrigin CSS so you can easily change any font.', 'so-css' ) , '', '' ); ?> -
-
- - - ID, 'socss_hide_gs' ) ) : ?> -
-

- - -

-
- -
+
+

+ +

+ + display_teaser() ) : ?> +
+

+
+ Google Web Font selector to SiteOrigin CSS so you can easily change any font.', 'so-css' ) , '', '' ); ?>
- - -
-

+
+ + + ID, 'socss_hide_gs' ) ) : ?> +
+

+ + +

-
    - custom_css_revisions_list( $theme, $socss_post_id, $current_revision ); - ?> -
+
- + + +
+

+
+
    + custom_css_revisions_list( $theme, $socss_post_id, $current_revision ); + ?> +
+
-
- -
-
-
- -
- -
    -
-
- -
+
- - - + - - - - +
+
+
+
+ +
    +
-
- - -
-

+ + +
+ + +
+

-
+
-
+
-
- -
- -
-
+ -
    -
+
-
+
+ +
+
+
+ +
    +
+
- + +
From f177f578f36313494a3fb47dd2c268ba0f4ae209 Mon Sep 17 00:00:00 2001 From: Alex S <17275120+AlexGStapleton@users.noreply.github.com> Date: Tue, 19 May 2020 01:51:10 +1000 Subject: [PATCH 3/6] Submit form when Save CSS is clicked Fix saving issue by submitting form when Save CSS button is pressed --- js/editor.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/editor.js b/js/editor.js index 8899f2a..6d8be87 100644 --- a/js/editor.js +++ b/js/editor.js @@ -1817,4 +1817,8 @@ jQuery( function ( $ ) { window.socss.mainEditor = editor; $( socss ).trigger( 'initialized' ); + + $( '.button-primary[name="siteorigin_custom_css_save"]' ).click( function() { + $( '#so-custom-css-form' ).click(); + } ); } ); From aa1eeda454bc6eb7f750705564a977cc8aa4fa8d Mon Sep 17 00:00:00 2001 From: Alex S <17275120+AlexGStapleton@users.noreply.github.com> Date: Tue, 19 May 2020 02:02:12 +1000 Subject: [PATCH 4/6] fix typo --- js/editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/editor.js b/js/editor.js index 6d8be87..4faa9b7 100644 --- a/js/editor.js +++ b/js/editor.js @@ -1819,6 +1819,6 @@ jQuery( function ( $ ) { $( socss ).trigger( 'initialized' ); $( '.button-primary[name="siteorigin_custom_css_save"]' ).click( function() { - $( '#so-custom-css-form' ).click(); + $( '#so-custom-css-form' ).submit(); } ); } ); From e43b01ad422f4a96b7c013e133789ba7cc035766 Mon Sep 17 00:00:00 2001 From: Alex S <17275120+AlexGStapleton@users.noreply.github.com> Date: Tue, 19 May 2020 19:10:13 +1000 Subject: [PATCH 5/6] Check for correct field during save --- so-css.php | 4 ++-- tpl/page.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/so-css.php b/so-css.php index f9c3b9b..391f327 100644 --- a/so-css.php +++ b/so-css.php @@ -264,8 +264,8 @@ function action_admin_menu() { $this, 'display_admin_page' ) ); - - if ( current_user_can( 'edit_theme_options' ) && isset( $_POST['siteorigin_custom_css_save'] ) ) { + + if ( current_user_can( 'edit_theme_options' ) && isset( $_POST['custom_css'] ) ) { check_admin_referer( 'custom_css', '_sononce' ); // Sanitize CSS input. Should keep most tags, apart from script and style tags. diff --git a/tpl/page.php b/tpl/page.php index 89d0724..7b68f17 100644 --- a/tpl/page.php +++ b/tpl/page.php @@ -24,7 +24,7 @@ - +

From dd3e33791b8ffadfffa5c65b2f3f2bac8fc2d89e Mon Sep 17 00:00:00 2001 From: Andrew Misplon Date: Tue, 19 May 2020 16:00:17 +0200 Subject: [PATCH 6/6] Updated changelog --- readme.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/readme.txt b/readme.txt index 32ae960..9366bde 100644 --- a/readme.txt +++ b/readme.txt @@ -65,6 +65,9 @@ We offer free support on the [SiteOrigin support forums](https://siteorigin.com/ == Changelog == += 1.2.7 - 19 May 2020 = +* Restored `Save` button functionality. + = 1.2.6 - 15 May 2020 = * Minor visual editor form styling fixes. * Resolved PHP 7.4 `preg_replace()` warning.