>

/ /
'
' . __('Pages:', THEME_NAME), 'after' => '
', 'nextpagelink' => __('Next Page', THEME_NAME), 'previouspagelink' => __('Previous Page', THEME_NAME) ); wp_link_pages($args); ?>
/ /
post_content), FILTER_VALIDATE_URL); $matches = array(); if(!$href && preg_match('/]*href=[\"\']?([^\"\'\s]+)/i', $post->post_content, $matches)) { $anchor_text = $href = $matches[1]; $desc = get_the_excerpt(); } if($post->post_title) { $anchor_text = $post->post_title; } ?>

post_author, 48); ?>
|[^>]+>)((?!<\/cite>)[\w\W]*)<\/cite>/i', $post->post_content, $matches)) { $source = $matches[1]; } else if($post->post_title) { $source = $post->post_title; } else { $source = null; } $quote_type = $quote = null; $matches = array(); if(preg_match('/<(blockquote|q)(?:>|[^>]+>)((?!<\/(?:blockquote|q)>)[\w\W]*)?<\/(?:blockquote|q)>/i', $post->post_content, $matches)) { $quote_type = $matches[1]; $quote = $matches[2]; } else { $quote = $post->post_content; $quote_type = 'blockquote'; } $quote = "<$quote_type>" . trim($quote, '\u0022\u2018\u2019\u0027\u201c\u201d') . ""; ?>
/ /
-
post_content)) { // WordPress Gallery (Images all attached to the post) $attachments = array_values( get_children( array( 'post_parent' => $post->ID, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) ); $image_count = count($attachments); simpledark_gallery_meta(); ?>
$to_show) { ?>

[^"]+)"[^\]]*])?(?:]*href=[\"\']?(?P[^\"\'\s]+)[^>]*>)?\s*]*src=[\"\']?(?P[^\"\'\s]+)|[^>]*title=[\"\']?(?P[^\"\'\s]+)|[^>]*alt=[\"\']?(?P<alt>[^\"\'\s]+)|[^>]*width=[\"\']?(?P<width>[^\"\'\s]+)|[^>]*height=[\"\']?(?P<height>[^\"\'\s]+))*/i', $post->post_content, $matches, PREG_SET_ORDER); $attachments = array_values( get_children( array( 'post_parent' => $post->ID, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) ); if($image_count == count($attachments)) { // No external images simpledark_gallery_meta(); ?> <div class="entry"> <?php simpledark_gallery($to_show, $columns); if($image_count > $to_show) { ?> <p> <span class="more-link"><a href="<?php the_permalink(); ?>"><?php echo '»' . __('View All', THEME_NAME); ?></a></span> </p> <?php } } else { // Contains some images not attached to this post simpledark_gallery_meta(); $attachments = array(); foreach($matches as $match) { $attachments[] = array( 'link' => $match['link'], 'source' => $match['source'], 'title' => $match['title'], 'alt' => $match['alt'], 'caption' => $match['caption'], 'width' => $match['width'], 'height' => $match['height'] ); } ?> <div class="entry"> <?php simpledark_gallery($to_show, $columns); if($image_count > $to_show) { ?> <p> <span class="more-link"><a href="<?php the_permalink(); ?>"><?php echo '»' . __('View All', THEME_NAME); ?></a></span> </p> <?php } } } ?> </div> <?php } else if($format == 'image') { $match = array(); $title = null; $source = filter_var(trim($post->post_content), FILTER_VALIDATE_URL); if(!$source && preg_match('/<img [^>]*src=[\"\']?([^\"\'\s]+)/i', $post->post_content, $match)) { $source = $match[1]; } if($post->post_title) { $title = $post->post_title; } ?> <div class="post-meta"><?php the_time(simpledark_time_format('date')); ?> / <?php the_author_posts_link(); _e(' posted in ', THEME_NAME); the_category(', '); ?> / <?php if(function_exists('the_views')) { the_views(); echo ' / '; } if(post_password_required()) { _e('X Comments', THEME_NAME); } else { comments_popup_link(__('No Comments', THEME_NAME), __('1 Comment', THEME_NAME), __('% Comments', THEME_NAME), 'comment-link', __('Comments Off', THEME_NAME)); } edit_post_link(__('Edit', THEME_NAME), ' / '); ?></div> <div class="entry"> <?php if($source) { ?> <?php if($title) { ?><h2 class="media-title"><?php echo $title; ?></h2><?php } ?> <p><a href="<?php the_permalink(); ?>"><img src="<?php echo $source; ?>"<?php if($title) { echo ' alt="' . $title . '" title="' . $title . '"'; } ?> /></a></p> <?php } ?> </div> <?php } else if($format == 'video' || $format == 'audio') { $match = array(); $title = $content = null; if(preg_match('/(<(video|audio|object|embed|iframe)[^>]+(?:>(?:(?!<\/\2>)[\w\W]*)?<\/\2>|\/>))/i', apply_filters('the_content', apply_filters('get_the_content', $post->post_content)), $match)) { $content = $match[1]; } if($post->post_title) { $title = $post->post_title; } ?> <div class="post-meta"><?php the_time(simpledark_time_format('date')); ?> / <?php the_author_posts_link(); _e(' posted in ', THEME_NAME); the_category(', '); ?> / <?php if(function_exists('the_views')) { the_views(); echo ' / '; } if(post_password_required()) { _e('X Comments', THEME_NAME); } else { comments_popup_link(__('No Comments', THEME_NAME), __('1 Comment', THEME_NAME), __('% Comments', THEME_NAME), 'comment-link', __('Comments Off', THEME_NAME)); } edit_post_link(__('Edit', THEME_NAME), ' / '); ?></div> <div class="entry"> <?php if($content) { ?> <?php if($title) { ?><h2 class="media-title"><?php echo $title; ?></h2><?php } ?> <p><?php echo $content; ?></p> <?php } ?> </div> <?php } else if($format == 'chat') { $lines = preg_split("/[\r\n]+/", $post->post_content); ?> <div class="post-meta"><?php the_time(simpledark_time_format('date')); ?> / <?php the_author_posts_link(); _e(' posted in ', THEME_NAME); the_category(', '); ?> / <?php if(function_exists('the_views')) { the_views(); echo ' / '; } if(post_password_required()) { _e('X Comments', THEME_NAME); } else { comments_popup_link(__('No Comments', THEME_NAME), __('1 Comment', THEME_NAME), __('% Comments', THEME_NAME), 'comment-link', __('Comments Off', THEME_NAME)); } edit_post_link(__('Edit', THEME_NAME), ' / '); ?></div> <div class="entry"> <table> <tbody> <?php if(is_array($lines)) { foreach($lines as $line) { if(trim($line) != '') ?> <tr><td><?php echo $line; ?></td></tr> <?php } } ?> </tbody> </table> </div> <?php } ?> </div> <?php } if(simpledark_is_paged()) { // create page navigation if there are multiple pages, support 2 plugins by default (aka WP-Pagenavi and Paginator) ?> <div class="pagenavi"> <?php if(function_exists('wp_paginator')) { wp_paginator(); } else if(function_exists('wp_pagenavi')) { wp_pagenavi(); } else { ?> <span class="previous-page"><?php next_posts_link('« ' . __('Older Posts', THEME_NAME)); ?></span><span class="next-page"><?php previous_posts_link(__('Newer Posts', THEME_NAME) . ' »'); ?></span> <?php } ?> </div> <?php } } else { // no posts found and suggest to go backward ?> <div class="no-post"><?php printf(__('No posts found. Why not <a title="Go Back" href="%1$s"%2$s>go back to the last page</a> ?', THEME_NAME), (defined('DOING_AJAX'))? '#' : $_SERVER['HTTP_REFERER'], (defined('DOING_AJAX'))? 'onclick="loadContent(contentCache, $(\'#content\')); searched = false;"' : ''); ?></div> <?php } ?> <?php // if AJAX request, only output content section if(!isset($_GET['action'])) { get_footer(); } ?>