function shoestrap_icons() { $favicon_item = shoestrap_getVariable('favicon'); $apple_icon_item = shoestrap_getVariable('apple_icon'); // Add the favicon if (!empty($favicon_item['url']) && $favicon_item['url'] != '') { $favicon = matthewruddy_image_resize($favicon_item['url'], 64, 64, true, false); echo '<link rel="shortcut icon" href="' . $favicon['url'] . '" type="image/x-icon" />'; } // Add the apple icons if (!empty($apple_icon_item['url'])) { $iphone_icon = matthewruddy_image_resize($apple_icon_item['url'], 57, 57, true, false); $iphone_icon_retina = matthewruddy_image_resize($apple_icon_item['url'], 57, 57, true, true); $ipad_icon = matthewruddy_image_resize($apple_icon_item['url'], 72, 72, true, false); $ipad_icon_retina = matthewruddy_image_resize($apple_icon_item['url'], 72, 72, true, true); ?> <!-- For iPhone --><link rel="apple-touch-icon-precomposed" href="<?php echo $iphone_icon['url']; ?> "> <!-- For iPhone 4 Retina display --><link rel="apple-touch-icon-precomposed" sizes="114x114" href="<?php echo $iphone_icon_retina['url']; ?> "> <!-- For iPad --><link rel="apple-touch-icon-precomposed" sizes="72x72" href="<?php echo $ipad_icon['url']; ?> "> <!-- For iPad Retina display --><link rel="apple-touch-icon-precomposed" sizes="144x144" href="<?php echo $ipad_icon_retina['url']; ?> "> <?php } }
<article id="post-<?php the_ID(); ?> " <?php post_class(); ?> > <div class="cs-portfolio-header <?php echo $extra_class_1column; ?> "> <?php if (has_post_thumbnail()) { $attachment_image = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), 'full', false); if ($crop_image == true || $crop_image == 1) { $image_resize = matthewruddy_image_resize($attachment_image[0], $width_image, $height_image, true, false); echo '<img alt="" class="attachment-featuredImageCropped" src="' . esc_attr($image_resize['url']) . '" />'; } else { echo '<img alt="" src="' . esc_attr($attachment_image[0]) . '" />'; } $image_large = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), 'large'); } ?> <div class="cs-portfolio-meta"> <div class="cs-portfolio-meta-box"> <?php if ($show_title == "true") { echo '<h4 class="cs-portfolio-title"><a title="' . esc_attr(get_the_title()) . '" href="' . esc_url(get_permalink(get_the_ID())) . '" rel="">' . get_the_title() . '</a></h4>'; } if ($show_category == "true") {
?> <ul class="blog-posts"> <?php if (have_posts()) { while (have_posts()) { the_post(); ?> <li class="post-item"> <article class="entry"> <div class="row"> <div class="col-sm-5"> <?php if (has_post_thumbnail()) { $image = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), 'single-post-thumbnail'); $image = matthewruddy_image_resize($image[0], 345, 243, true, false); ?> <div class="entry-thumb image-hover2"> <a href="<?php the_permalink(); ?> "> <img src="<?php echo $image['url']; ?> " alt="<?php the_title(); ?> "> </a> </div>
$post_id = get_the_ID(); ?> <article id="post_<?php echo esc_attr($post_id); ?> " <?php post_class(); ?> > <div class="cs-carousel-portfolio-header"> <?php $options = get_option(OPTIONS); if (has_post_thumbnail()) { $attachment_image = wp_get_attachment_image_src(get_post_thumbnail_id($post_id), 'full', false); $image_resize = matthewruddy_image_resize($attachment_image[0], 600, 400, true, false); echo '<img class="attachment-featuredImageCropped" src="' . esc_attr($image_resize['url']) . '" />'; } ?> <div class="cs-carousel-portfolio-info"> <a title="<?php the_title(); ?> " href="<?php the_permalink(); ?> " rel=""><i class="fa fa-share"></i></a> </div> </div> <div class="cs-carousel-portfolio-content">
function shoestrap_image_resize($data) { $defaults = array("url" => "", "width" => "", "height" => "", "crop" => true, "retina" => ""); $settings = wp_parse_args($data, $defaults); if (empty($settings['url'])) { return; } // Generate the @2x file if retina is enabled if (shoestrap_getVariable('retina_toggle') == 1 && empty($settings['retina'])) { $results['retina'] = matthewruddy_image_resize($settings['url'], $settings['width'], $settings['height'], $settings['crop'], true); } return matthewruddy_image_resize($settings['url'], $settings['width'], $settings['height'], $settings['crop'], false); }
<i class="fa fa-folder-o"></i> <?php foreach (get_the_category() as $cat) { echo "<a href='" . get_category_link($cat->cat_ID) . "'>" . $cat->cat_name . '</a> '; } ?> </span> <span class="date"><i class="fa fa-calendar"></i> <?php echo get_the_date(); ?> </span> </div> <?php if (has_post_thumbnail()) { $image = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), 'single-post-thumbnail'); $image = matthewruddy_image_resize($image[0], 870, 613, true, false); ?> <div class="entry-photo"> <img src="<?php echo $image['url']; ?> " alt="<?php the_title(); ?> "> </div> <?php } ?> <div class="content-text clearfix"> <?php