Changeset 13307 for trunk/wp-admin/custom-background.php
- Timestamp:
- 02/22/2010 08:15:06 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/custom-background.php
r13303 r13307 90 90 return; 91 91 92 if ( isset($_POST['reset-background']) ) { 93 check_admin_referer('custom-background'); 92 if ( empty($_POST) ) 93 return; 94 95 check_admin_referer('custom-background'); 96 97 if ( isset($_POST['reset-background']) ) 94 98 remove_theme_mods(); 95 }96 99 if ( isset($_POST['background-repeat']) ) { 97 check_admin_referer('custom-background');98 100 if ( in_array($_POST['background-repeat'], array('repeat', 'no-repeat')) ) 99 101 $repeat = $_POST['background-repeat']; … … 103 105 } 104 106 if ( isset($_POST['background-position']) ) { 105 check_admin_referer('custom-background');106 107 if ( in_array($_POST['background-position'], array('center', 'right', 'left')) ) 107 108 $position = $_POST['background-position']; … … 111 112 } 112 113 if ( isset($_POST['background-attachment']) ) { 113 check_admin_referer('custom-background');114 114 if ( in_array($_POST['background-attachment'], array('fixed', 'scroll')) ) 115 115 $attachment = $_POST['background-attachment']; … … 118 118 set_theme_mod('background_attachment', $attachment); 119 119 } 120 if ( isset($_POST['remove-background']) ) { 121 check_admin_referer('custom-background'); 120 if ( isset($_POST['remove-background']) ) 122 121 set_theme_mod('background_image', ''); 123 }124 122 } 125 123 … … 142 140 <p><?php _e('This is your current background image.'); ?></p> 143 141 <?php 144 } else { ?> 145 <p><?php _e('There is currently no background image.'); ?></p> <?php 146 } 147 148 if ( $this->admin_image_div_callback ) { 149 call_user_func($this->admin_image_div_callback); 150 } else { 142 if ( $this->admin_image_div_callback ) { 143 call_user_func($this->admin_image_div_callback); 144 } else { 151 145 ?> 152 146 <div id="custom-background-image"> 153 147 <img class="custom-background-image" src="<?php background_image(); ?>" /> 154 148 </div> 155 <?php } ?> 156 157 <?php if ( get_background_image() ) : ?> 149 <?php } 150 } else { ?> 151 <p><?php _e('There is currently no background image.'); ?></p> <?php 152 } 153 154 if ( get_background_image() ) : ?> 158 155 159 156 <h2><?php _e('Change Display Options') ?></h2> … … 227 224 <?php if ( get_background_image() ) : ?> 228 225 <h2><?php _e('Remove Background Image'); ?></h2> 229 <p><?php _e('This will remove background image. You will not be able to retrieve any customizations.') ?></p>226 <p><?php _e('This will remove the background image. You will not be able to retrieve any customizations.') ?></p> 230 227 <form method="post" action="<?php echo esc_attr(add_query_arg('step', 1)) ?>"> 231 228 <?php wp_nonce_field('custom-background'); ?>
Note: See TracChangeset
for help on using the changeset viewer.