*/
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_gallery_thumb' );
$image_url = $thumb[0];
?>
ID, 'canuck_metabox_link_to_post', true ) ? false : true );
$link_to_image = ( '' === get_post_meta( $post->ID, 'canuck_metabox_link_to_image', 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];
$title = false === $include_feature_title ? get_post( get_post_thumbnail_id() )->post_excerpt : the_title_attribute( 'echo=0' );
if ( '' === $title ) {
$imagetitle = '';
$imagealt = esc_html__( 'flexslider image', 'canuck' );
} else {
$imagetitle = $title;
$imagealt = $title;
}
// Set up the link and image.
if ( 1 === $canuck_feature_pic_count ) {
if ( true === $link_to_post ) {
?>
' . wp_kses_post( $title ) . '';
}
}
?>