*/ global $post, $canuck_feature_category; $canuck_flex_effect = sanitize_text_field( get_theme_mod( 'canuck_flex_slider_effect', 'fade' ) ); $canuck_flex_pause = sanitize_text_field( get_theme_mod( 'canuck_flex_slider_pause', '5000' ) ); $canuck_flex_trans = sanitize_text_field( get_theme_mod( 'canuck_flex_slider_trans', '600' ) ); $canuck_flex_auto = intval( get_theme_mod( 'canuck_flex_slider_auto', 1 ) ); $category_id = get_cat_ID( $canuck_feature_category ); $args = array( 'category' => $category_id, 'numberposts' => 20, ); $custom_posts = get_posts( $args ); $use_lazyload = get_theme_mod( 'canuck_use_lazyload' ) ? true : false; if ( 0 !== $category_id && $custom_posts ) { ?>
    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 ) ); $include_feature_title = ( '' === get_post_meta( $post->ID, 'canuck_metabox_include_feature_title', true ) ? false : true ); if ( has_post_thumbnail() ) { $canuck_feature_pic_count ++; ?>
  • ID ), 'canuck_med15' ); $image_url = $thumb[0]; $canuck_feature_title = false === $include_feature_title ? get_post( get_post_thumbnail_id() )->post_excerpt : the_title_attribute( 'echo=0' ); if ( '' === $canuck_feature_title ) { $imagetitle = ''; $imagealt = esc_html__( 'flexslider image', 'canuck' ); } else { $imagetitle = $canuck_feature_title; $imagealt = $canuck_feature_title; } if ( true === $include_feature_title ) { if ( '' !== $canuck_feature_title ) { echo '

    ' . wp_kses_post( $canuck_feature_title ) . '

    '; } } // Set up the link and image. if ( true === $link_to_post ) { ?> <?php echo esc_attr( $imagealt ); ?> <?php echo esc_attr( $imagealt ); ?> <?php echo esc_attr( $canuck_feature_title ); ?>
  • ID ), 'canuck_gallery_thumb' ); $image_url = $thumb[0]; ?> <?php esc_attr_e( 'flex thumb', 'canuck' ); ?>