@@ 166-169 (lines=4) @@ | ||
163 | if ( isset($_POST['background-color']) ) { |
|
164 | check_admin_referer('custom-background'); |
|
165 | $color = preg_replace('/[^0-9a-fA-F]/', '', $_POST['background-color']); |
|
166 | if ( strlen($color) == 6 || strlen($color) == 3 ) |
|
167 | set_theme_mod('background_color', $color); |
|
168 | else |
|
169 | set_theme_mod('background_color', ''); |
|
170 | } |
|
171 | ||
172 | $this->updated = true; |
@@ 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'] ) ) { |