Changeset 5386 for branches/2.2/wp-admin/custom-header.php
- Timestamp:
- 05/04/2007 05:52:57 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/wp-admin/custom-header.php
r5364 r5386 24 24 25 25 if ( isset( $_POST['textcolor'] ) ) { 26 check_admin_referer('custom-header'); 26 27 if ( 'blank' == $_POST['textcolor'] ) { 27 28 set_theme_mod('header_textcolor', 'blank'); … … 32 33 } 33 34 } 34 if ( isset($_POST['resetheader']) ) 35 if ( isset($_POST['resetheader']) ) { 36 check_admin_referer('custom-header'); 35 37 remove_theme_mods(); 38 } 36 39 ?> 37 40 <script type="text/javascript"> … … 158 161 <p><?php _e('This is your header image. You can change the text color or upload and crop a new image.'); ?></p> 159 162 160 <div id="headimg" style="background: url(<?php header_image() ?>) no-repeat;">163 <div id="headimg" style="background: url(<?php clean_url(header_image()) ?>) no-repeat;"> 161 164 <h1><a onclick="return false;" href="<?php bloginfo('url'); ?>" title="<?php bloginfo('name'); ?>" id="name"><?php bloginfo('name'); ?></a></h1> 162 165 <div id="desc"><?php bloginfo('description');?></div> … … 166 169 <input type="button" value="<?php _e('Hide Text'); ?>" onclick="hide_text()" id="hidetext" /> 167 170 <input type="button" value="<?php _e('Select a Text Color'); ?>" onclick="colorSelect($('textcolor'), 'pickcolor')" id="pickcolor" /><input type="button" value="<?php _e('Use Original Color'); ?>" onclick="colorDefault()" id="defaultcolor" /> 168 <input type="hidden" name="textcolor" id="textcolor" value="#<?php header_textcolor() ?>" /><input name="submit" type="submit" value="<?php _e('Save Changes'); ?> »" /></form> 171 <?php wp_nonce_field('custom-header') ?> 172 <input type="hidden" name="textcolor" id="textcolor" value="#<?php attribute_escape(header_textcolor()) ?>" /><input name="submit" type="submit" value="<?php _e('Save Changes'); ?> »" /></form> 169 173 <?php } ?> 170 174 … … 178 182 <label for="upload"><?php _e('Choose an image from your computer:'); ?></label><br /><input type="file" id="upload" name="import" /> 179 183 <input type="hidden" name="action" value="save" /> 184 <?php wp_nonce_field('custom-header') ?> 180 185 <p class="submit"> 181 186 <input type="submit" value="<?php _e('Upload'); ?> »" /> … … 198 203 199 204 function step_2() { 205 check_admin_referer('custom-header'); 200 206 $overrides = array('test_form' => false); 201 207 $file = wp_handle_upload($_FILES['import'], $overrides); … … 223 229 224 230 if ( $width == HEADER_IMAGE_WIDTH && $height == HEADER_IMAGE_HEIGHT ) { 225 set_theme_mod('header_image', $url);231 set_theme_mod('header_image', clean_url($url)); 226 232 $header = apply_filters('wp_create_file_in_uploads', $file, $id); // For replication 227 233 return $this->finished(); … … 257 263 <input type="hidden" name="attachment_id" id="attachment_id" value="<?php echo $id; ?>" /> 258 264 <input type="hidden" name="oitar" id="oitar" value="<?php echo $oitar; ?>" /> 265 <?php wp_nonce_field('custom-header') ?> 259 266 <input type="submit" value="<?php _e('Crop Header »'); ?>" /> 260 267 </p> … … 266 273 267 274 function step_3() { 275 check_admin_referer('custom-header'); 268 276 if ( $_POST['oitar'] > 1 ) { 269 277 $_POST['x1'] = $_POST['x1'] * $_POST['oitar'];
Note: See TracChangeset
for help on using the changeset viewer.