Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $out .= '<div class="omsc-recent-posts-title"><h3><a href="'. get_permalink() .'">'. get_the_title() .'</a></h3></div>';
- if( $thumbnail && has_post_thumbnail() ) {
- $img = wp_get_attachment_image_src( get_post_thumbnail_id(), apply_filters('omsc_sc_recent_posts_img_size', 'medium'));
- if($img) {
- $img_html=apply_filters('omsc_sc_recent_posts_img', '<a href="'. get_permalink() .'"><img src="'.$img[0].'" alt="'.esc_attr($post->post_title).'" /></a>', array(
- 'img_src' => $img[0],
- 'link' => get_permalink(),
- 'alt' => $post->post_title,
- ));
- $out.='<div class="omsc-recent-posts-thumb">'.$img_html.'</a></div>';
- }
- }
- $img = wp_get_attachment_image_src( get_post_thumbnail_id(), apply_filters('omsc_sc_recent_posts_img_size', 'medium'));
- if ( function_exists( 'add_image_size' ) ) {
- add_image_size( 'custom-recpost-thumb', 222, 221,true );
- }
- $img = wp_get_attachment_image_src( get_post_thumbnail_id(), apply_filters('omsc_sc_recent_posts_img_size', 'custom-recpost-thumb'));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement