|
@@ 136-146 (lines=11) @@
|
| 133 |
|
return; |
| 134 |
|
} |
| 135 |
|
|
| 136 |
|
if ( isset( $_POST['background-preset'] ) ) { |
| 137 |
|
check_admin_referer( 'custom-background' ); |
| 138 |
|
|
| 139 |
|
if ( in_array( $_POST['background-preset'], array( 'default', 'fill', 'fit', 'repeat', 'custom' ), true ) ) { |
| 140 |
|
$preset = $_POST['background-preset']; |
| 141 |
|
} else { |
| 142 |
|
$preset = 'default'; |
| 143 |
|
} |
| 144 |
|
|
| 145 |
|
set_theme_mod( 'background_preset', $preset ); |
| 146 |
|
} |
| 147 |
|
|
| 148 |
|
if ( isset( $_POST['background-position'] ) ) { |
| 149 |
|
check_admin_referer( 'custom-background' ); |
|
@@ 169-179 (lines=11) @@
|
| 166 |
|
set_theme_mod( 'background_position_y', $position_y ); |
| 167 |
|
} |
| 168 |
|
|
| 169 |
|
if ( isset( $_POST['background-size'] ) ) { |
| 170 |
|
check_admin_referer( 'custom-background' ); |
| 171 |
|
|
| 172 |
|
if ( in_array( $_POST['background-size'], array( 'auto', 'contain', 'cover' ), true ) ) { |
| 173 |
|
$size = $_POST['background-size']; |
| 174 |
|
} else { |
| 175 |
|
$size = 'auto'; |
| 176 |
|
} |
| 177 |
|
|
| 178 |
|
set_theme_mod( 'background_size', $size ); |
| 179 |
|
} |
| 180 |
|
|
| 181 |
|
if ( isset( $_POST['background-repeat'] ) ) { |
| 182 |
|
check_admin_referer( 'custom-background' ); |