예제 #1
0
function ac_print_preview_excerpt()
{
    // Check if excerpts or full post content
    $excerpt_type = shoestrap_getVariable('post_excerpt_type');
    switch ($excerpt_type) {
        case 'truncated':
            echo ac_get_excerpt();
            break;
        case 'full':
            the_content();
            break;
    }
}
 protected function content($atts, $content = null)
 {
     $this->content_has_container = false;
     extract(shortcode_atts(array('title' => '', 'featured_post' => '', 'alignment' => 'left', 'el_class' => '', 'css_animation' => '', 'css' => '', 'css_extra_class' => ''), $atts));
     // Alignments
     $align_class = 'pull-' . $alignment;
     $text_align_class = 'text-' . $alignment;
     // Links
     $a_start = "<a href='" . get_permalink($featured_post) . "' />";
     $a_end = "</a>";
     // Build the CSS
     $css_class = $this->build_outer_css($atts, $content);
     $css_class .= ' vc_align_' . $alignment;
     if ($alignment == 'left') {
         $align_class = 'ac-page-left-side';
         $img_align = 'ac-page-right-side';
     } else {
         $align_class = 'ac-page-right-side';
         $img_align = 'ac-page-left-side';
     }
     // Build the text
     $text = "<div class='text {$align_class} col-sm-6 ac-center-vertically'>";
     $text .= $a_start;
     $text .= "<h2>" . __(get_the_title($featured_post), 'alleycat') . "</h2>";
     $text .= "<p class='ac-body-color-a'>" . __(ac_get_excerpt($featured_post, false, false, false), 'alleycat') . "</p>";
     $text .= $a_end;
     $text .= "</div>";
     // Build the image
     // Get the featured image id
     $image_id = get_post_thumbnail_id($featured_post);
     $image = "<div class='image {$img_align} col-sm-6'>";
     $image .= $a_start . ac_render_image_for_columns(array('image_id' => $image_id, 'columns' => 6, 'use_placeholder' => true)) . $a_end;
     $image .= "</div>";
     // Extra CSS
     $css_class .= ' ' . $css_extra_class . ' ';
     // Build the output
     $output = '';
     $output .= "\n\t" . '<div class="' . esc_attr($css_class) . '" >';
     $output .= "\n\t" . $this->get_title($title);
     $output .= "\n\t\t" . '<div class="wpb_wrapper">';
     $output .= "\n\t\t\t" . $image . $text;
     $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
     $output .= "\n\t" . '</div> ' . $this->endBlockComment('.ac_image');
     return $output;
 }
예제 #3
0
function ac_testimonial_render($testimonial_id, $show_image = true, $excerpt_length = -1)
{
    // Get the post
    $post = get_post($testimonial_id);
    // Show the image?  Tiles don't show the image inline
    if ($show_image) {
        // Get the thumbnail id
        $thumb_id = get_post_thumbnail_id($testimonial_id);
    } else {
        $thumb_id = false;
    }
    // Get the excerpt
    $excerpt = ac_get_excerpt($post, $excerpt_length, false, false);
    // Author
    $author = ac_get_meta('author', null, $testimonial_id);
    $author_url = ac_get_meta('author_url', null, $testimonial_id);
    return ac_quote_render($thumb_id, $excerpt, $author, $author_url);
}
		</div>		

		<div class='col-md-7'>	
		  <header>
				<?php 
shoestrap_meta_custom_render();
?>
    
		    <?php 
echo ac_get_post_title();
?>
		  </header>
		  
		  <div class="entry-summary">
		    <?php 
echo ac_get_excerpt($post);
?>
		    <div class="clearfix"></div>
		  </div>
		</div>
		 	 
	</div>
	
  <?php 
if (has_action('shoestrap_entry_footer')) {
    echo '<footer class="entry-footer">';
    do_action('shoestrap_entry_footer');
    echo '</footer>';
}
?>
  
?>
<article <?php 
post_class();
?>
>
	
	<div class='col-sm-3 search-image pull-right'>
		<?php 
shoestrap_featured_image(false, true, true);
?>
	</div>

  <div class='col-sm-9 search-summary'>
    <?php 
echo ac_get_post_title();
?>
		<?php 
shoestrap_meta_custom_render();
?>
	  <div class="entry-summary">
	    
    <?php 
$excerpt = ac_get_excerpt($post, false, false);
if ($excerpt) {
    echo $excerpt;
}
?>
	  </div>		
  </div>
 
</article>
예제 #6
0
}
// Excerpt
if ($show_excerpt) {
    // Apply a excerpt length if given
    if (isset($excerpt_length)) {
        $excerpt_length = intval($excerpt_length);
    } else {
        $excerpt_length = false;
        // This will use the site default
    }
    // Hide read more link on some post types
    if ($post_type == 'ac_gallery') {
        $show_read_more = false;
    }
    // Add social icons to read more
    $excerpt = ac_get_excerpt($post, $excerpt_length, $show_read_more, true, ac_person_get_all_social_icons());
}
// Terms
$show_terms = true;
if (get_post_type() == 'ac_person') {
    $show_terms = false;
}
// Get terms slugs for Isotope filtering
$terms = ' all ';
$post_terms = get_the_terms($post->ID, $post_category);
if (!empty($post_terms)) {
    foreach ($post_terms as $post_term) {
        $terms .= ' ' . $post_term->slug . ' ';
    }
}
// Get the post classes
예제 #7
0
            $img = ac_resize_image_for_columns(array('image_id' => $post->ID, 'columns' => 12, 'ratio' => ac_get_height_style_for_post($post->ID)));
            // Don't include the pretty photo data in the text link
            $a_start = '<a class="prettyphoto" href="' . esc_url($img['url']) . '" rel="prettyPhoto[rel-' . ac_get_prettyphoto_rel() . ']">';
        }
    }
}
// Image
if (ac_has_post_thumbnail($post->ID)) {
    $img_args = array('image_id' => ac_get_post_thumbnail_id($post->ID), 'columns' => $img_cols, 'ratio' => $img_height_style, 'full_width' => $full_width);
    $image = ac_resize_image_for_grid($img_args);
}
// Excerpt
if ($show_excerpt) {
    // Sanitise some values
    $excerpt_length = false;
    $excerpt = ac_get_excerpt($post, $excerpt_length, false, true);
}
// Get terms slugs for Isotope filtering
$terms = ' all ';
$post_terms = get_the_terms($post->ID, $post_category);
if (!empty($post_terms)) {
    foreach ($post_terms as $post_term) {
        $terms .= ' ' . $post_term->slug . ' ';
    }
}
?>
			

<div class='ac-tile-col <?php 
echo esc_attr($cols_class) . esc_attr($terms) . esc_attr(ac_get_hide_until_fade_class());
?>
// shoestrap_meta_custom_render();
?>
    
		    <?php 
echo ac_get_post_title();
?>
		  </header>
		  
		  <?php 
echo ac_person_get_position();
?>
		  
		  		  
		  <div class="entry-summary">
		    <?php 
echo ac_get_excerpt($post, false, true, true, ac_person_get_all_social_icons());
?>
		    <div class="clearfix"></div>
		  </div>

		</div>		
		 	 
	</div>
	
	<?php 
ac_social_sharing('ac_person');
?>
	
  <?php 
if (has_action('shoestrap_entry_footer')) {
    echo '<footer class="entry-footer">';