| @@ 218-221 (lines=4) @@ | ||
| 215 | check_admin_referer( 'custom-header-options', '_wpnonce-custom-header-options' ); |
|
| 216 | $_POST['text-color'] = str_replace( '#', '', $_POST['text-color'] ); |
|
| 217 | $color = preg_replace('/[^0-9a-fA-F]/', '', $_POST['text-color']); |
|
| 218 | if ( strlen($color) == 6 || strlen($color) == 3 ) |
|
| 219 | set_theme_mod('header_textcolor', $color); |
|
| 220 | elseif ( ! $color ) |
|
| 221 | set_theme_mod( 'header_textcolor', 'blank' ); |
|
| 222 | } |
|
| 223 | ||
| 224 | if ( isset( $_POST['default-header'] ) ) { |
|
| @@ 208-211 (lines=4) @@ | ||
| 205 | if ( isset($_POST['background-color']) ) { |
|
| 206 | check_admin_referer('custom-background'); |
|
| 207 | $color = preg_replace('/[^0-9a-fA-F]/', '', $_POST['background-color']); |
|
| 208 | if ( strlen($color) == 6 || strlen($color) == 3 ) |
|
| 209 | set_theme_mod('background_color', $color); |
|
| 210 | else |
|
| 211 | set_theme_mod('background_color', ''); |
|
| 212 | } |
|
| 213 | ||
| 214 | $this->updated = true; |
|