[PATCH] support horizontal and vertical position
-
Hi !
Currently, this plugin allow to specify left, center or right position. Depending on the theme (mine is twenty thirteen) it could be vertically aligned, like to bottom.
Anyway, CSS allow vertical and horizontal alignement. This patch divides the option “position” in two options :
— old/background-per-page.php 2012-05-20 21:04:38.000000000 +0200
+++ new/background-per-page.php 2014-02-06 17:57:29.647706233 +0100
@@ -83,8 +83,20 @@
‘desc’ => ‘How the background image reacts to scrolling.’
),
array(
– ‘name’ => ‘Position’,
– ‘id’ => “{$prefix}position”,
+ ‘name’ => ‘Vertical position’,
+ ‘id’ => “{$prefix}vposition”,
+ ‘type’ => ‘radio’,
+ ‘options’ => array(
+ ‘top’ => ‘Top’,
+ ‘center’ => ‘Center’,
+ ‘bottom’ => ‘Bottom’
+ ),
+ ‘std’ => ‘center’,
+ ‘desc’ => ‘The vertical position of the image on the page.’
+ ),
+ array(
+ ‘name’ => ‘Horizontal position’,
+ ‘id’ => “{$prefix}hposition”,
‘type’ => ‘radio’,
‘options’ => array(
‘left’ => ‘Left’,
@@ -92,7 +104,7 @@
‘right’ => ‘Right’
),
‘std’ => ‘center’,
– ‘desc’ => ‘The position of the image on the page.’
+ ‘desc’ => ‘The horizontal position of the image on the page.’
),
array(
‘name’ => ‘Fade?’,
@@ -192,7 +204,7 @@
$src = $data[‘src’];
$repeat = $data[‘repeat’];
$color = $data[‘color’];
– $position = $data[‘position’];
+ $position = $data[‘vposition’] .’ ‘.$data[‘hposition’];
$attachment = $data[‘attachment’];
$fade = $data[‘fade’];
$fade_height = $data[‘fade_height’];
@@ -374,4 +386,4 @@
}
}-?>
\ No newline at end of file
+?>
- The topic ‘[PATCH] support horizontal and vertical position’ is closed to new replies.