'shapely_home_parallax','description' => esc_html__( "Shapely FrontPage Parallax Section" ,'shapely') ); parent::__construct('shapely_home_parallax', esc_html__('[Shapely] Parralax Section For FrontPage','shapely'), $widget_ops); } function widget($args , $instance) { extract($args); $title = isset($instance['title']) ? $instance['title'] : ''; $image_src = isset($instance['image_src']) ? $instance['image_src'] : ''; $image_pos = isset($instance['image_pos']) ? $instance['image_pos'] : esc_html__('left' , 'shapely'); $body_content = isset($instance['body_content']) ? $instance['body_content'] : ''; $button1 = isset($instance['button1']) ? $instance['button1'] : ''; $button2 = isset($instance['button2']) ? $instance['button2'] : ''; $button1_link = isset($instance['button1_link']) ? $instance['button1_link'] : ''; $button2_link = isset($instance['button2_link']) ? $instance['button2_link'] : ''; echo $before_widget; /* Classes */ $class1 = ( $image_pos == 'background-full' ) ? 'cover fullscreen image-bg' : ( ( $image_pos == 'background-small' ) ? 'small-screen image-bg p0' : ( ( $image_pos == 'right' ) ? 'bg-secondary' : ( ( $image_pos == 'bottom' ) ? 'bg-secondary pb0' : '' ) ) ); $class2 = ( ( $image_pos == 'background-full' ) || ( $image_pos == 'background-small' ) ) ? 'top-parallax-section' : ( ( $image_pos == 'right' ) ? 'col-md-4 col-sm-5 mb-xs-24' : ( ( $image_pos == 'left' ) ? 'col-md-4 col-md-offset-1 col-sm-5 col-sm-offset-1' : ( ( $image_pos == 'bottom' ) ? 'col-sm-10 col-sm-offset-1 text-center' : ( ( $image_pos == 'top' ) ? 'col-sm-10 col-sm-offset-1 text-center mt30' : '' ) ) ) ); $class3 = ( ( $image_pos == 'background-full' ) || ( $image_pos == 'background-small' ) ) ? 'col-md-8 col-md-offset-2 col-sm-10 col-sm-offset-1 text-center' : ''; $class4 = ( $image_pos == 'left' || $image_pos == 'right' ) ? 'row align-children' : 'row'; $class5 = ( $image_pos == 'right' ) ? 'col-md-7 col-md-offset-1 col-sm-6 col-sm-offset-1 text-center' : ''; $class6 = ( $image_pos == 'left' ) ? 'col-md-7 col-sm-6 text-center mb-xs-24' : ''; $class7 = ( $image_pos == 'background-full' ) ? 'fullscreen' : ''; /** * Widget Content */ ?>
<?php echo $title; ?>
'.$title.'': '

'.$title.'

' : ''; echo ( $body_content != '' ) ? '

'. $body_content.'

' : ''; echo ( $button2 != '' && $button2_link != '' ) ? ''.$button2.'': ''; echo ( $button1 != '' && $button1_link != '' ) ? ''.$button1.'': ''; ?>
<?php echo $title; ?>