qsdklsqkdmqskdmlqskd azoepqikdomlqskdjmlqs qpfklqjsfmklqsjdmqlsjdsqd '; /** * Solid Color */ if ( shrk_get_meta_option( 'section_bg_color' ) ) { $output .= '
'; } /** * Gradient */ if ( shrk_get_meta_option( 'section_bg_grad_from' ) && shrk_get_meta_option( 'section_bg_grad_to' ) ) { $color_bg_grad_from = shrk_get_meta_option( 'section_bg_grad_from' ); $color_bg_grad_to = shrk_get_meta_option( 'section_bg_grad_to' ); $output .= ''; } /** * Pattern overlay */ if ( shrk_get_meta_option( 'section_image_overlay' ) ) { $image_style = 'background-image: url(\'' . esc_url( wp_get_attachment_url( shrk_get_meta_option( 'section_image_overlay' ) ) ) . '\'); background-size: auto; background-repeat: repeat;'; $output .= ''; } /** * Image background */ if ( shrk_get_meta_option( 'section_image' ) ) { $image_classes = $image_data_attr = ''; $image_pos_arr = shrk_pagesections_meta_arr( 'background_image_pos_css' ); $section_image_url = wp_get_attachment_url( shrk_get_meta_option( 'section_image' ) ); $section_image_id = shrk_get_meta_option( 'section_image' ); $section_image_ar = shrk_get_image_aspect( $section_image_id, 'shrk_section_bg' ); $srcset = !empty( $section_image_id ) ? wp_get_attachment_image_srcset( $section_image_id, 'shrk_section_bg' ) : ''; if ( $section_image_id ) { $section_image_src = wp_get_attachment_image_src( $section_image_id, 'shrk_section_bg' ); $section_image_url = $section_image_src[0]; } if ( !empty( $srcset ) && !empty( $section_image_url ) && 'on' == shrk_get_meta_option('section_image_lazyload') ) { $image_data_attr .= ' data-image-bg="' . esc_url( $section_image_url ) . '"'; $image_data_attr .= ' data-image-ar="' . esc_attr( $section_image_ar ) . '"'; $image_data_attr .= ' data-srcset="' . esc_attr( $srcset ) . '"'; $image_classes .= ' lazyload-bg lazyload-on-visible'; } // Setup parallax if ( 'parallax' == shrk_get_meta_option( 'section_image_scroll_pos' ) ) { wp_enqueue_script( 'stellar.js' ); $image_classes .= ' parallax-bg'; if ( shrk_get_meta_option( 'section_image_parallax_speed' ) ) { $image_data_attr .= ' data-stellar-background-ratio="' . (intval(shrk_get_meta_option( 'section_image_parallax_speed' ))/100) . '"'; } if ( shrk_get_meta_option( 'section_image_parallax_offset' ) ) { $image_data_attr .= ' data-stellar-vertical-offset="' . (intval(shrk_get_meta_option( 'section_image_parallax_offset' ))) . '"'; } } if ( empty( $srcset ) || 'on' != shrk_get_meta_option('section_image_lazyload') ) { $image_style = 'background-image: url(\'' . esc_url( $section_image_url ) . '\');'; } if ( shrk_get_meta_option( 'section_image_size' ) ) { $image_style .= ' background-size: ' . esc_attr( shrk_get_meta_option( 'section_image_size' ) ) . ';'; } if ( shrk_get_meta_option( 'section_image_repeat' ) ) { $image_style .= ' background-repeat: ' . esc_attr( shrk_get_meta_option( 'section_image_repeat' ) ) . ';'; } if ( shrk_get_meta_option( 'section_image_pos' ) && isset( $image_pos_arr[shrk_get_meta_option( 'section_image_pos' )] ) ) { $image_style .= ' background-position: ' . esc_attr( $image_pos_arr[shrk_get_meta_option( 'section_image_pos' )] ) . ';'; } if ( shrk_get_meta_option( 'section_image_scroll_pos' ) ) { if ( shrk_get_meta_option( 'section_image_scroll_pos' ) == 'scroll' ) { $image_style .= ' background-attachment: scroll;'; } if ( shrk_get_meta_option( 'section_image_scroll_pos' ) == 'fixed' ) { $image_style .= ' background-attachment: fixed;'; } } $output .= ''; } /** * Video background */ if ( shrk_get_meta_option( 'section_video_mp4' ) || shrk_get_meta_option( 'section_video_webm' ) ) { $tmp_w = $tmp_h = ''; $section_video_mp4_url = shrk_get_meta_option( 'section_video_mp4' ) ? wp_get_attachment_url( shrk_get_meta_option( 'section_video_mp4' ) ) : ''; $section_video_webm_url = shrk_get_meta_option( 'section_video_webm' ) ? wp_get_attachment_url( shrk_get_meta_option( 'section_video_webm' ) ) : ''; $section_video_fb_url = shrk_get_meta_option( 'section_video_fallback_image' ) ? wp_get_attachment_url( shrk_get_meta_option( 'section_video_fallback_image' ) ) : ''; $section_video_autostart = shrk_get_meta_option( 'section_video_autostart' ) == 'on' ? true : false; if ( shrk_get_meta_option( 'section_video_attributes' ) ) { $tmp = json_decode( shrk_get_meta_option( 'section_video_attributes' ), true ); $tmp_w = $tmp['width']; $tmp_h = $tmp['height']; } $output .= '