"", "full_screen" => "", "height" => "500" ); extract(shortcode_atts($args, $atts)); $images = esc_attr($images); $height = esc_attr($height); //init variables $html = ""; $parallax_layers_data_styles = ''; $parallax_layers_holder_styles = ''; $parallax_layers_holder_classes = ''; //is full screen height for the slider set? if ($full_screen == 'yes') { $parallax_layers_holder_classes .= ' full_screen_height'; } //is height for the slider set? if ($height !== '' && $full_screen == 'no') { $parallax_layers_holder_styles .= 'height: ' . $height . 'px;'; $parallax_layers_data_styles = 'data-height="' . $height . '"'; } $html .= "
"; if ($images != '') { $parallax_images_array = explode(',', $images); } if (isset($parallax_images_array) && count($parallax_images_array) != 0) { foreach ($parallax_images_array as $pimg_id) { $pimage_src = wp_get_attachment_image_src($pimg_id, 'full', true); $pimage_alt = get_post_meta($pimg_id, '_wp_attachment_image_alt', true); $pimage_src = $pimage_src[0]; $html .= '
'; } } if($content != ""){ $html .= '
'.do_shortcode($content).'
'; } $html .= '
'; return $html; } add_shortcode('qode_parallax_layers', 'qode_parallax_layers'); }