'Parallax Height', 'desc' => 'The height the parallax element should be in pixels. Set to 0 to auto set the height based on the post content. Minimum height is always 100px', 'id' => $prefix.'height', 'type' => 'number' ), array( 'label'=> 'Parallax Image Size', 'desc' => 'The parallax image size will be scaled based on this value. Specify the width in pixels. Set to 0 to auto set the size of the image (recommended)', 'id' => $prefix.'pheight', 'type' => 'number' ), array( 'label'=> 'Horizontal Position', 'desc' => 'The horizontal position of the header on the parallax background.', 'id' => $prefix.'hpos', 'type' => 'select', 'options' => array ( 'one' => array ( 'label' => 'Left', 'value' => 'left' ), 'two' => array ( 'label' => 'Centre', 'value' => 'center' ), 'three' => array ( 'label' => 'Right', 'value' => 'right' ) ) ), array( 'label'=> 'Vertical Position', 'desc' => 'The vertical position of the header on the parallax background. This setting is ignored if post content is specified.', 'id' => $prefix.'vpos', 'type' => 'select', 'options' => array ( 'one' => array ( 'label' => 'Top', 'value' => 'top' ), 'two' => array ( 'label' => 'Middle', 'value' => 'middle' ), 'three' => array ( 'label' => 'Bottom', 'value' => 'bottom' ) ) ), array( 'label'=> 'Header Style', 'desc' => 'Enter the inline CSS style required for the header eg. font-weight: bold; font-size: large;', 'id' => $prefix.'hstyle', 'type' => 'textarea' ), array( 'label'=> 'Full Width', 'desc' => 'Display the parallax across the full width of the page. This is a work around to get a full width parallax if its not already. This may not work on some themes.', 'id' => $prefix.'FullWidth', 'type' => 'checkbox' ), array( 'label'=> 'Mobile: Disable Parallax Image', 'desc' => 'Select this option if you would rather the background image not display at all on mobile devices.', 'id' => $prefix.'DisableParImg', 'type' => 'checkbox' ), array( 'label'=> 'Mobile: Disable Entire Parallax', 'desc' => 'Select this option if you would rather not display any of the parallax content when on mobile device.', 'id' => $prefix.'DisableParallax', 'type' => 'checkbox' ), array( 'label'=> 'Mobile: Image Size', 'desc' => 'Set a size here to scale the image size when on a mobile device. Specify the width in pixels. Set to 0 to auto set the size of the image.', 'id' => $prefix.'pheightmob', 'type' => 'number' ) ); // The Callback function show_meta_parallax_scroll() { global $custom_meta_fields, $post; // Use nonce for verification echo ''; // Begin the field table and loop echo '
| ';
echo ' ';
echo 'Parallax Scroll by adamrob.co.uk';
echo ' ';
echo " '; echo ' | ';
foreach ($custom_meta_fields as $field) {
// get value of this field if it exists for this post
$meta = esc_attr(get_post_meta($post->ID, $field['id'], true));
// begin a table row with
echo '|
| ';
switch($field['type']) {
// Text field
case 'text':
echo '
'.$field['desc'].''; break; //Number field case 'number': echo ' '.$field['desc'].''; break; // textarea case 'textarea': echo ' '.$field['desc'].''; break; // checkbox case 'checkbox': echo ' '; break; // select case 'select': echo ' '.$field['desc'].''; break; } //end switch echo ' |