????

Your IP : 18.119.116.77


Current Path : /home2/morganrand/backup.morganrand.com/wp-content/themes/wanderfuls/vc_templates/
Upload File :
Current File : /home2/morganrand/backup.morganrand.com/wp-content/themes/wanderfuls/vc_templates/vc_row.php

<?php
/*** IMPORTANT: Do not edit this file, bad things will happen! ***/

// Warning for required functions
if ( ! function_exists( 'vc_map_get_attributes' ) ) {
    echo '<p>'. __( 'Please update your visual composer plugin to prevent PHP errors.', 'tb' ) .'</p>';
    return;
}

// Get vc attributes
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );

// Parse attributes (used for Wanderfuls theme fallbacks and deprecated params)
$atts = vcex_parse_row_atts( $atts );

// Extract shortcode atts
extract( $atts );

// Inline js
vcex_inline_js( 'row_equal_columns' );

// Load VC js
wp_enqueue_script( 'wpb_composer_front_js' );

// Wrap classes (Wanderfuls Theme wrapper around row for advanced tweaks and fixes)
$wanderfuls_wrap_classes   = array( 'tb-vc-row-wrap', 'clr' );
if ( ! empty( $max_width ) ) {
	$wanderfuls_wrap_classes[] = 'max-width-'. $max_width;
}
if ( ! empty( $match_column_height ) && 'yes' == $match_column_height ) {
	$wanderfuls_wrap_classes[] = 'tb-vc-row-columns-match-height';
} else {
	if ( vc_is_inline() ) {
		$wanderfuls_wrap_classes[] = 'tb-vc-row-reset-columns-match-height'; // Used in front-end editor to reset equal heights
	}
}
if ( ! empty( $full_width ) ) {
	$wanderfuls_wrap_classes[] = 'tb-vc-row-'. $full_width;
}
if ( ! empty( $center_row ) && 'yes' == $center_row ) {
	$wanderfuls_wrap_classes[] = 'tb-vc-row-centered';
}
if ( ! empty( $column_spacing ) ) {
	$wanderfuls_wrap_classes[] = 'tb-vc-has-custom-column-spacing';
	$wanderfuls_wrap_classes[] = 'tb-vc-column-spacing-'. $column_spacing;
}
$wanderfuls_wrap_classes[] = vcex_offset_vc( $atts );
$wanderfuls_wrap_classes = implode( ' ', $wanderfuls_wrap_classes );

// Declare some vars
$wrapper_attributes = array();
$has_video_bg       = false;

// Inner classes
$css_classes = array( 'vc_row', 'wpb_row', 'clr' );
$css_classes[] = get_row_css_class();
$css_classes[] = vc_shortcode_custom_css_class( $css, ' ' );
if ( ! empty( $el_class ) ) {
	$css_classes[] = $this->getExtraClass( $el_class );
}

// Custom ID
if ( ! empty( $el_id ) ) {
	$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
}

// Full width row
if ( ! empty( $full_width ) ) {
	$wrapper_attributes[] = 'data-vc-full-width="true"';
	$wrapper_attributes[] = 'data-vc-full-width-init="false"';
	if ( 'stretch_row_content' === $full_width ) {
		$wrapper_attributes[] = 'data-vc-stretch-content="true"';
	} elseif ( 'stretch_row_content_no_spaces' === $full_width ) {
		$wrapper_attributes[] = 'data-vc-stretch-content="true"';
		$css_classes[] = 'vc_row-no-padding';
	}
}

// Full height row
if ( ! empty( $full_height ) ) {
	$css_classes[] = ' vc_row-o-full-height';
	if ( ! empty( $content_placement ) ) {
		$css_classes[] = ' vc_row-o-content-' . $content_placement;
	}
}

// Use default video if user checked video, but didn't chose url
if ( 'self_hosted' != $video_bg ) {
	if ( ! empty( $video_bg ) && empty( $video_bg_url ) ) {
		$video_bg_url = 'https://www.youtube.com/watch?v=lMJXxhRFO1k';
	} elseif ( ! empty( $video_bg ) && ! empty( $video_bg_url ) && function_exists( 'vc_extract_youtube_id' ) ) {
		$has_video_bg = vc_extract_youtube_id( $video_bg_url );
	}
}
if ( $has_video_bg ) {
	$parallax       = $video_bg_parallax;
	$parallax_image = $video_bg_url;
	$css_classes[]  = ' vc_video-bg-container';
	wp_enqueue_script( 'vc_youtube_iframe_api_js' );
}

// Parallax bg
if ( ! empty( $parallax ) ) {
	wp_enqueue_script( 'vc_jquery_skrollr_js' );
	$wrapper_attributes[] = 'data-vc-parallax="1.5"'; // parallax speed
	$css_classes[] = 'vc_general vc_parallax vc_parallax-' . $parallax;
	if ( strpos( $parallax, 'fade' ) !== false ) {
		$css_classes[] = 'js-vc_parallax-o-fade';
		$wrapper_attributes[] = 'data-vc-parallax-o-fade="on"';
	} elseif ( strpos( $parallax, 'fixed' ) !== false ) {
		$css_classes[] = 'js-vc_parallax-o-fixed';
	}
}
if ( ! empty ( $parallax_image ) ) {
	if ( $has_video_bg ) {
		$parallax_image_src = $parallax_image;
	} else {
		$parallax_image_id = preg_replace( '/[^\d]/', '', $parallax_image );
		$parallax_image_src = wp_get_attachment_image_src( $parallax_image_id, 'full' );
		if ( ! empty( $parallax_image_src[0] ) ) {
			$parallax_image_src = $parallax_image_src[0];
		}
	}
	$wrapper_attributes[] = 'data-vc-parallax-image="' . esc_attr( $parallax_image_src ) . '"';
}
if ( ! $parallax && $has_video_bg ) {
	$wrapper_attributes[] = 'data-vc-video-bg="' . esc_attr( $video_bg_url ) . '"';
}

// Add custom Wanderfuls inner_classes : Could add with a filter, but is that really necessary?
if ( ! empty( $css_animation ) ) {
	$css_classes[] = $this->getCSSAnimation( $css_animation );
}
if ( ! empty( $typography_style ) ) {
	$css_classes[] = $typography_style;
}
if ( ! empty( $visibility ) ) {
	$css_classes[] = $visibility;
}
if ( ! empty( $bg_style_class ) ) {
	$css_classes[] = $bg_style_class;
}
if ( ! empty( $tablet_fullwidth_cols ) && 'yes' == $tablet_fullwidth_cols ) {
	$css_classes[] = 'tablet-fullwidth-columns';
}
if ( ! empty( $vcex_parallax ) ) {
	$css_classes[] = 'tb-parallax-bg-wrap';
}
if ( ! empty( $video_bg ) ) {
	$css_classes[] = 'tb-relative';
}

// Apply filters to the class
$css_class = preg_replace( '/\s+/', ' ', apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, implode( ' ', array_filter( $css_classes ) ), $this->settings['base'], $atts ) );

// Add class to data attributes
$wrapper_attributes[] = 'class="' . esc_attr( trim( $css_class ) ) . '"';

/**** TOTAL INLINE CSS ***/

	// Generate inline CSS
	$inline_style = '';

	// Min Height
	if ( $min_height ) {
		$inline_style .= 'min-height:'. $min_height .';';
	}

	// Inline css styles => Fallback For OLD Wanderfuls Params
	if ( empty( $css ) && function_exists( 'vcex_parse_deprecated_row_css' ) ) {
		$inline_style .= vcex_parse_deprecated_row_css( $atts, 'inline_css' );
	}

	// Add inline style to wrapper attributes
	if ( $inline_style ) {
		$wrapper_attributes[] = ' style="'. $inline_style .'"';
	}

/*** TOTAL INLINCE CSS END ***/

// Row Output Start here ?>

<div class="<?php echo esc_attr( trim( $wanderfuls_wrap_classes ) ); ?>">

	<div <?php echo implode( ' ', $wrapper_attributes ); ?>>

		<?php
		// Center row open
		if ( $center_row ) { ?>
			<div class="container center-row clr">
		<?php } ?>

			<div class="tb-vc-columns-wrap clr">
				<?php
				// THIS IS WHERE THE ROW CONTENT IS
				echo wpb_js_remove_wpautop( $content ); ?>
			</div><!-- .tb-vc-columns-wrap -->

		<?php
		// Center row close
		if ( $center_row ) { ?>
			</div><!-- .container -->
		<?php } ?>

		<?php vcex_parallax_bg( $atts ); ?>

		<?php vcex_row_video( $atts ); ?>

	</div>

	<?php
	// Strectch row container
	if ( ! empty( $full_width ) ) echo '<div class="vc_row-full-width"></div>'; ?>

</div><!-- .tb-vc-row-wrap -->