Permalink
Browse files

Simplify change to casper_sanitize_color

  • Loading branch information...
burnto committed May 19, 2015
1 parent 1c56b55 commit 8061e83d29228788b6b5888116dd5bab5b551df5
Showing with 3 additions and 3 deletions.
  1. +3 −3 inc/customizer.php
View
@@ -431,10 +431,10 @@ function casper_customize_preview_js() {
*/
function casper_sanitize_color($content){
$content = str_replace('#', '', $content);
- if (!ctype_xdigit($content)) {
- return '';
+ if (ctype_xdigit($content)) {
+ return '#' . $content;
}
- return '#' . $content;
+ return '';
}
/**

0 comments on commit 8061e83

Please sign in to comment.