' . $blogcentral_thumb . ''; $media_flag = true; } // Construct the html for the media. if ( ! empty( $blogcentral_post_meta['media'] ) ) { $media_flag = true; $blogcentral_extra_li_class .= ' has-media'; foreach ( $blogcentral_post_meta['media'] as $media ) { $width = $height = ''; // Set the width and height of the media based on theme options. if ( 'default' === $blogcentral_layout_opts['img_size'] ) { $width = ! empty( $media['width'] ) ? ' width="' . esc_attr( $media['width'] ) . '"' : ''; $height = ! empty( $media['height'] ) ? ' height="' . esc_attr( $media['height'] ) . '"' : ''; } elseif ( 'custom' === $blogcentral_layout_opts['img_size'] ) { $width = ! empty( $blogcentral_layout_opts['img_width'] ) ? ' width="' . esc_attr( $blogcentral_layout_opts['img_width'] ) . '"' : ''; $height = ! empty( $blogcentral_layout_opts['img_height'] ) ? ' height="' . esc_attr( $blogcentral_layout_opts['img_height'] ) . '"' : ''; } // Construct the $blogcentral_media variable. This variable is used in the layout-item-wrapper-begin template. $alt = ! empty( $media['alt_txt'] ) ? esc_attr( $media['alt_txt'] ) : ''; $url = ! empty( $media['url'] ) ? esc_url( $media['url'] ) : ''; $blogcentral_media .= ''; } } // End if 'layout5' !== $blogcentral_layout_opts['layout'] /** * Template file that constructs the various html fragments for the layout-item-wrapper-begin template. */ include( locate_template( 'templates/postmeta-layout.php', false, false ) ); // Call the post_class function and pass it $blogcentral_extra_li_class variable, after converting to array. $class_array = explode( ' ', trim( $blogcentral_extra_li_class ) ); ob_start(); post_class( $class_array ); $blogcentral_extra_li_class = ob_get_clean(); /** * Template file for each post item. */ include( locate_template( 'templates/layout-item-wrapper-begin.php', false, false ) );