SiteOrigin CSS - Version 1.2.8

Version Description

  • 22 May 2020 =
  • Renamed custom_css textarea to prevent conflicts.
Download this release

Release Info

Developer gpriday
Plugin Icon 128x128 SiteOrigin CSS
Version 1.2.8
Comparing to
See all releases

Code changes from version 1.2.7 to 1.2.8

Files changed (3) hide show
  1. readme.txt +5 -2
  2. so-css.php +4 -4
  3. tpl/page.php +2 -2
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Tags: css, design, edit, customize
3
  Requires at least: 3.9
4
  Tested up to: 5.5
5
- Stable tag: 1.2.7
6
- Build time: 2020-05-19T16:03:33+02:00
7
  License: GPLv2 or later
8
  Contributors: gpriday
9
  Donate link: https://siteorigin.com/downloads/premium/
@@ -65,6 +65,9 @@ We offer free support on the [SiteOrigin support forums](https://siteorigin.com/
65
 
66
  == Changelog ==
67
 
 
 
 
68
  = 1.2.7 - 19 May 2020 =
69
  * Restored `Save` button functionality.
70
 
2
  Tags: css, design, edit, customize
3
  Requires at least: 3.9
4
  Tested up to: 5.5
5
+ Stable tag: 1.2.8
6
+ Build time: 2020-05-22T18:38:58+02:00
7
  License: GPLv2 or later
8
  Contributors: gpriday
9
  Donate link: https://siteorigin.com/downloads/premium/
65
 
66
  == Changelog ==
67
 
68
+ = 1.2.8 - 22 May 2020 =
69
+ * Renamed `custom_css` textarea to prevent conflicts.
70
+
71
  = 1.2.7 - 19 May 2020 =
72
  * Restored `Save` button functionality.
73
 
so-css.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: SiteOrigin CSS
4
  Description: An advanced CSS editor from SiteOrigin.
5
- Version: 1.2.7
6
  Author: SiteOrigin
7
  Author URI: https://siteorigin.com
8
  Plugin URI: https://siteorigin.com/css/
@@ -14,7 +14,7 @@ Text Domain: so-css
14
  // Handle the legacy CSS editor that came with SiteOrigin themes
15
  include plugin_dir_path( __FILE__ ) . 'inc/legacy.php';
16
 
17
- define( 'SOCSS_VERSION', '1.2.7' );
18
  define( 'SOCSS_JS_SUFFIX', '.min' );
19
 
20
  /**
@@ -265,11 +265,11 @@ class SiteOrigin_CSS {
265
  'display_admin_page'
266
  ) );
267
 
268
- if ( current_user_can( 'edit_theme_options' ) && isset( $_POST['custom_css'] ) ) {
269
  check_admin_referer( 'custom_css', '_sononce' );
270
 
271
  // Sanitize CSS input. Should keep most tags, apart from script and style tags.
272
- $custom_css = self::sanitize_css( filter_input( INPUT_POST, 'custom_css' ) );
273
  $socss_post_id = filter_input( INPUT_GET, 'socss_post_id', FILTER_VALIDATE_INT );
274
 
275
  $current = $this->get_custom_css( $this->theme, $socss_post_id );
2
  /*
3
  Plugin Name: SiteOrigin CSS
4
  Description: An advanced CSS editor from SiteOrigin.
5
+ Version: 1.2.8
6
  Author: SiteOrigin
7
  Author URI: https://siteorigin.com
8
  Plugin URI: https://siteorigin.com/css/
14
  // Handle the legacy CSS editor that came with SiteOrigin themes
15
  include plugin_dir_path( __FILE__ ) . 'inc/legacy.php';
16
 
17
+ define( 'SOCSS_VERSION', '1.2.8' );
18
  define( 'SOCSS_JS_SUFFIX', '.min' );
19
 
20
  /**
265
  'display_admin_page'
266
  ) );
267
 
268
+ if ( current_user_can( 'edit_theme_options' ) && isset( $_POST['siteorigin_custom_css'] ) ) {
269
  check_admin_referer( 'custom_css', '_sononce' );
270
 
271
  // Sanitize CSS input. Should keep most tags, apart from script and style tags.
272
+ $custom_css = self::sanitize_css( filter_input( INPUT_POST, 'siteorigin_custom_css' ) );
273
  $socss_post_id = filter_input( INPUT_GET, 'socss_post_id', FILTER_VALIDATE_INT );
274
 
275
  $current = $this->get_custom_css( $this->theme, $socss_post_id );
tpl/page.php CHANGED
@@ -24,7 +24,7 @@ if ( ! empty( $current_revision ) ) {
24
  </h2>
25
 
26
 
27
- <?php if( isset($_POST['custom_css']) ) : ?>
28
  <div class="notice notice-success"><p><?php _e('Site design updated.', 'so-css') ?></p></div>
29
  <?php endif; ?>
30
 
@@ -100,7 +100,7 @@ if ( ! empty( $current_revision ) ) {
100
  </div>
101
 
102
  <div class="custom-css-container">
103
- <textarea name="custom_css" id="custom-css-textarea" class="css-editor" rows="<?php echo max( 10, substr_count( $custom_css, "\n" ) + 1 ) ?>"><?php echo esc_textarea( $custom_css ) ?></textarea>
104
  <?php wp_nonce_field( 'custom_css', '_sononce' ) ?>
105
  </div>
106
  <p class="description"><?php esc_html_e( $editor_description ) ?></p>
24
  </h2>
25
 
26
 
27
+ <?php if( isset($_POST['siteorigin_custom_css']) ) : ?>
28
  <div class="notice notice-success"><p><?php _e('Site design updated.', 'so-css') ?></p></div>
29
  <?php endif; ?>
30
 
100
  </div>
101
 
102
  <div class="custom-css-container">
103
+ <textarea name="siteorigin_custom_css" id="custom-css-textarea" class="css-editor" rows="<?php echo max( 10, substr_count( $custom_css, "\n" ) + 1 ) ?>"><?php echo esc_textarea( $custom_css ) ?></textarea>
104
  <?php wp_nonce_field( 'custom_css', '_sononce' ) ?>
105
  </div>
106
  <p class="description"><?php esc_html_e( $editor_description ) ?></p>