load_db(); } /** * Load theme options * * @since 1.0 */ public function load_db() { $options = get_option(BLN_OPTION_NAME); if (!isset($options['version'])) { global $bln_default_options; $this->options = $bln_default_options; update_option(BLN_OPTION_NAME, $bln_default_options); } else { $this->options = $options; } } /** * Get theme options */ public function get_theme_options() { return $this->options; } /** * Get all font stacks * * @since 1.0 * @return array $stacks, all font stacks */ public function get_font_stacks() { $stacks = array( 'Arial' => 'Arial, "Helvetica Neue", Helvetica, sans-serif', 'Baskerville' => 'Baskerville, "Times New Roman", Times, serif', 'Georgia' => 'Georgia, Times, "Times New Roman", serif', 'Helvetica' => '"Helvetica Neue", Helvetica, Arial, sans-serif', 'Lucida' => '"Lucida Sans", Lucida Grande", "Lucida Sans Unicode", sans-serif', 'Monaco' => 'Monaco, Menlo, Consolas, "Courier New", monospace, serif', 'Palatino' => 'Palatino, "Palatino Linotype", Georgia, Times, "Times New Roman", serif', 'Tahoma' => 'Tahoma, Geneva, Verdana, sans-serif', 'Times' => '"Times New Roman", Times, serif', 'Trebuchet' => '"Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", sans-serif', 'Verdana' => 'Verdana, Geneva, Tahoma, sans-serif', ); return apply_filters('bln_font_stacks', $stacks); } /** * Display script and styles in the section. */ public function wp_head() { $fonts = $this->get_font_stacks(); $color = get_header_textcolor(); ?> options['slider']['slides']) { ?> options['sidebar']; if (is_active_sidebar('sidebar1')) { $output = ('left' == $pos) ? 'span3 offset1' : 'span3'; echo $output; } } /** * Display main content's class */ public function main_content_class() { $pos = $this->options['sidebar']; if (!is_active_sidebar('sidebar1')) { echo "span10 offset1"; } elseif ('left' == $pos) { echo "span7"; } else { echo "span7 offset1"; } } /** * Check if a post is displayable regarding post status and user login status * * @since 1.0 * @param int $id, the post'ID */ public function is_displayable($id) { $status = get_post_status($id); if ('publish' == $status || ('private' == $status && is_user_logged_in())) { return true; } else { return false; } } /** * Display the search form in nav bar */ public function navbar_searchform() { if(!$this->options['navbar_search']) return; ?> %3$s', esc_url($aut_url), esc_attr(sprintf(__('View all post by %s', 'bluelines'), $aut)), $aut), '' . $date . '' ); } else { $meta = sprintf(__('By %s', 'bluelines'), sprintf('%3$s', esc_url($aut_url), esc_attr(sprintf(__('View all post by %s', 'bluelines'), $aut)), $aut)); } if (!empty($cat) || !empty($tag) && 'page' != get_post_type(get_the_id())) { $meta .= ', '; if (!empty($cat)) $meta .= ' ' . __('in ', 'bluelines') . $cat; if (!empty($tag)) $meta .= ' ' . __('tagged ', 'bluelines') . $tag; } echo '
' . apply_filters('bln_post_meta', $meta) . '
'; } /** * For paginated post/page */ public function post_pagination() { $type = (is_singular()) ? '' : ' pagination-mini'; $link_pages_arg = array( 'before' => '
', 'link_before' => 'l lim', 'link_after' => 'r lim', 'next_or_number' => 'number', ); ob_start(); wp_link_pages($link_pages_arg); $output = ob_get_clean(); $output = str_replace(array(' l lim', 'r lim ', 'r lim', 'l lim', ''), array('
  • ', '
  • ', '', '', '
  • '), $output); echo $output; } /** * Pagination of archives and search result */ public function archives_pagination() { global $wp_query; if ($wp_query->max_num_pages > 1) { ?> 'attachment-' . $literal_size . $css)); } } else { if (!is_search()) { echo get_the_post_thumbnail(get_the_id(), 'thumbnail', array('class' => 'alignright wp-post-thumbnail img-rounded')); } else { echo get_the_post_thumbnail(get_the_id(), 'thumbnail', array('class' => 'alignleft wp-post-thumbnail img-rounded')); } } } } /** * Return comment count for the current post/page */ public function comments_count() { global $post; if (empty($post->ID)) return false; $comment_count = wp_count_comments($post->ID); return $comment_count->total_comments; } /** * The comment callback */ public function comments_cb($comment, $args, $depth) { $GLOBALS['comment'] = $comment; switch ($comment->comment_type) : case 'pingback' : case 'trackback' : ?>
  • ', ''); ?>

  • id="li-comment-">
    comment_parent && false === stripos($com_class, 'depth-1')) { $avatar_size = 32; } ?>
    ' . __('The Author', 'bluelines') . ''; printf(__('By %1$s %3$s on %2$s', 'bluelines'), sprintf('%s', get_comment_author_link()), sprintf('', esc_url(get_comment_link($comment->comment_ID)), get_comment_time('c'), sprintf(__('%1$s at %2$s', 'bluelines'), get_comment_date(), get_comment_time()) ), $byauth ); ?>
    ', ''); ?> comment_approved) : ?>

    ' ' . __('Reply', 'bluelines') . '»', 'depth' => $depth, 'max_depth' => $args['max_depth']))); ?>
    options['slider']; if (!is_front_page() || array() == $slider['slides']) { return; } $get_post_thumbs = function ($page_id) { $img = wp_get_attachment_image_src(get_post_thumbnail_id($page_id), 'full'); return $img[0]; }; $get_post_title = function ($page_id) { return esc_attr(get_the_title($page_id)); }; $get_post_excerpt = function ($page_id) { $page = get_post($page_id); $feat_exerpt_length = 55; $excerpt = wp_trim_words($page->post_content, apply_filters('bln_slider_excerpt_length', $feat_exerpt_length)); return esc_attr(strip_shortcodes($excerpt)); }; $get_post_links = function ($page_id) { return esc_url(get_permalink($page_id)); }; $slides = array_map($get_post_thumbs, $slider['slides']); $slides_titles = array_map($get_post_title, $slider['slides']); $slides_exs = array_map($get_post_excerpt, $slider['slides']); $slides_links = array_map($get_post_links, $slider['slides']); ?>