*/ // Get the options. $section9_title = stripslashes( get_theme_mod( 'canuck_section9_title', '' ) ); $section9_text = stripslashes( get_theme_mod( 'canuck_section9_text', '' ) ); $section9_portfolio_category = get_theme_mod( 'canuck_section9_portfolio_category', '' ); $section9_portfolio_columns = get_theme_mod( 'canuck_section9_portfolio_columns', '3' ); $sec9_bg_image = get_theme_mod( 'canuck_section9_background_image', '' ); $sec9_use_parallax = get_theme_mod( 'canuck_section9_use_parallax', false ); $include_pinterest_pinit = get_theme_mod( 'canuck_include_pinit' ) ? true : false; $use_lazyload = get_theme_mod( 'canuck_use_lazyload' ) ? true : false; if ( '' !== $sec9_bg_image ) { if ( true === $sec9_use_parallax ) { $string9 = ' class="home-9-wide parallax-window" data-parallax="scroll" data-image-src="' . esc_url( $sec9_bg_image ) . '" data-speed="0.3" data-bleed="20" style="background: transparent;"'; // Workaround for overlays on parralax sections :( $home_final_setup = canuck_home_area_setup(); foreach ( $home_final_setup as $area => $section ) { if ( '9' === $section ) { if ( 1 === $area ) { $string9a = ' style="margin: 0 0 -20px 0;"'; } else { $previous_section = $home_final_setup[ $area - 1 ]; $prev_sec_use_parallax = get_theme_mod( 'canuck_section' . $previous_section . '_use_parallax', false ); if ( true === $prev_sec_use_parallax ) { $string9a = ' style="margin: 20px 0 -20px 0;"'; } else { $string9a = ' style="margin: 0 0 -20px 0;"'; } } } } } elseif ( true === $use_lazyload ) { $string9 = ' class="home-9-wide lazyload" data-src="' . esc_url( $sec9_bg_image ) . '"'; $string9a = ''; } else { $string9 = ' class="home-9-wide" style="background-image: url( ' . esc_url( $sec9_bg_image ) . ' );"'; $string9a = ''; } } else { $string9 = ' class="home-9-wide"'; $string9a = ''; } ?>
>
>
'; echo '

' . wp_kses_post( $section9_title ) . '

'; echo '
'; } if ( '' !== $section9_text ) { echo '
'; echo '

' . wp_kses_post( $section9_text ) . '

'; echo '
'; } ?>
$category_id, 'numberposts' => 20, ); $custom_posts = get_posts( $args ); if ( false != $category_id && $custom_posts ) {// phpcs:ignore $canuck_feature_pic_count = 0; foreach ( $custom_posts as $post ) { // phpcs:ignore setup_postdata( $post ); $link_to_post = ( '' === get_post_meta( $post->ID, 'canuck_metabox_link_to_post', true ) ? false : true ); $custom_feature_link = ( '' === get_post_meta( $post->ID, 'canuck_custom_feature_link', true ) ? false : get_post_meta( $post->ID, 'canuck_custom_feature_link', true ) ); $image_url = get_the_post_thumbnail_url( $post->ID, 'canuck_med15' ); $image_caption = get_post( get_post_thumbnail_id() )->post_excerpt; $image_desc = get_post( get_post_thumbnail_id() )->post_content; if ( has_post_thumbnail() ) { $canuck_feature_pic_count ++; ?>
<?php echo esc_attr( $image_caption ); ?> <?php echo esc_attr( $image_caption ); ?>
' . esc_attr__( 'Pinterest share image', 'canuck' ) . ''; // phpcs:ignore } if ( false !== $custom_feature_link ) { echo ''; } elseif ( true === $link_to_post ) { echo ''; } echo ''; ?>
'; } } elseif ( 4 === $section9_portfolio_columns ) { if ( is_int( ( $canuck_feature_pic_count ) / 4 ) ) { echo '
'; } } }// End foreach(). } else { ?>