TJ Custom CSS - Version 0.1.5

Version Description

  • 9/08/2015 =
  • Fixed some selecter being striped
Download this release

Release Info

Developer themejunkie
Plugin Icon wp plugin TJ Custom CSS
Version 0.1.5
Comparing to
See all releases

Code changes from version 0.1.4 to 0.1.5

admin/admin.php CHANGED
@@ -81,6 +81,7 @@ add_action( 'admin_init', 'tjcc_register_setting' );
81
  function tjcc_custom_css_page() {
82
  $options = get_option( 'tj_custom_css' );
83
  $custom_css = isset( $options['custom_css'] ) ? $options['custom_css'] : '';
 
84
  ?>
85
 
86
  <div class="wrap">
@@ -99,7 +100,7 @@ function tjcc_custom_css_page() {
99
  <?php settings_fields( 'tj_custom_css' ); ?>
100
 
101
  <div class="tjcc-custom-css-container">
102
- <textarea name="tj_custom_css[custom_css]" id="tjcc-custom-css-textarea"><?php echo wp_filter_nohtml_kses( $custom_css ) ?></textarea>
103
  </div>
104
 
105
  <p class="description">
@@ -144,6 +145,6 @@ function tjcc_custom_css_page() {
144
  * @since 0.1.0
145
  */
146
  function tj_custom_css_setting_validate( $input ) {
147
- $input['custom_css'] = wp_filter_nohtml_kses( $input['custom_css'] );
148
  return $input;
149
  }
81
  function tjcc_custom_css_page() {
82
  $options = get_option( 'tj_custom_css' );
83
  $custom_css = isset( $options['custom_css'] ) ? $options['custom_css'] : '';
84
+ $custom_css = wp_kses( $custom_css, array( '\'', '\"', '>', '+' ) );
85
  ?>
86
 
87
  <div class="wrap">
100
  <?php settings_fields( 'tj_custom_css' ); ?>
101
 
102
  <div class="tjcc-custom-css-container">
103
+ <textarea name="tj_custom_css[custom_css]" id="tjcc-custom-css-textarea"><?php echo $custom_css; ?></textarea>
104
  </div>
105
 
106
  <p class="description">
145
  * @since 0.1.0
146
  */
147
  function tj_custom_css_setting_validate( $input ) {
148
+ $input['custom_css'] = wp_kses( $input['custom_css'], array( '\'', '\"', '>', '+' ) );
149
  return $input;
150
  }
admin/customize.php CHANGED
@@ -41,7 +41,7 @@ function tjcc_register_customize( $wp_customize ) {
41
  array(
42
  'type' => 'option',
43
  'capability' => 'edit_theme_options',
44
- 'sanitize_callback' => 'wp_filter_nohtml_kses',
45
  )
46
  );
47
 
41
  array(
42
  'type' => 'option',
43
  'capability' => 'edit_theme_options',
44
+ 'sanitize_callback' => 'wp_kses',
45
  )
46
  );
47
 
inc/functions.php CHANGED
@@ -19,11 +19,13 @@ function tjcc_get_custom_css() {
19
 
20
  $option = get_option( 'tj_custom_css' );
21
  $output = isset( $option['custom_css'] ) ? $option['custom_css'] : '';
 
 
22
 
23
  if ( $output ) {
24
  $css = '<!-- Custom CSS -->' . "\n";
25
  $css .= '<style>' . "\n";
26
- $css .= wp_filter_nohtml_kses( $output ) . "\n";
27
  $css .= '</style>' . "\n";
28
  $css .= '<!-- Generate by https://wordpress.org/plugins/theme-junkie-custom-css/ -->' . "\n";
29
 
19
 
20
  $option = get_option( 'tj_custom_css' );
21
  $output = isset( $option['custom_css'] ) ? $option['custom_css'] : '';
22
+ $output = wp_kses( $output, array( '\'', '\"', '>', '+' ) );
23
+ $output = str_replace( '&gt;', '>', $output );;
24
 
25
  if ( $output ) {
26
  $css = '<!-- Custom CSS -->' . "\n";
27
  $css .= '<style>' . "\n";
28
+ $css .= $output . "\n";
29
  $css .= '</style>' . "\n";
30
  $css .= '<!-- Generate by https://wordpress.org/plugins/theme-junkie-custom-css/ -->' . "\n";
31
 
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === TJ Custom CSS ===
2
- Contributors: themejunkie, satrya
3
  Tags: custom css, customizer, css, style, theme, child theme
4
  Requires at least: 4.0
5
  Tested up to: 4.3
6
- Stable tag: 0.1.4
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -59,6 +59,9 @@ If you want to see the live preview while you adding the custom css code, then y
59
 
60
  == Changelog ==
61
 
 
 
 
62
  = 0.1.4 - 9/06/2015 =
63
  * Support WordPress 4.3
64
  * Update language
1
  === TJ Custom CSS ===
2
+ Contributors: themejunkie
3
  Tags: custom css, customizer, css, style, theme, child theme
4
  Requires at least: 4.0
5
  Tested up to: 4.3
6
+ Stable tag: 0.1.5
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
59
 
60
  == Changelog ==
61
 
62
+ = 0.1.5 - 9/08/2015 =
63
+ * Fixed some selecter being striped
64
+
65
  = 0.1.4 - 9/06/2015 =
66
  * Support WordPress 4.3
67
  * Update language
tj-custom-css.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: TJ Custom CSS
4
  * Plugin URI: http://www.theme-junkie.com/
5
  * Description: Easily to add custom css code to your site.
6
- * Version: 0.1.4
7
  * Author: Theme Junkie
8
  * Author URI: http://www.theme-junkie.com/
9
  * Author Email: support@theme-junkie.com
3
  * Plugin Name: TJ Custom CSS
4
  * Plugin URI: http://www.theme-junkie.com/
5
  * Description: Easily to add custom css code to your site.
6
+ * Version: 0.1.5
7
  * Author: Theme Junkie
8
  * Author URI: http://www.theme-junkie.com/
9
  * Author Email: support@theme-junkie.com