function widget($args, $instance) { extract($args); $title = apply_filters('CWS_Widget_Video', $instance['title']); $head = ''; $gen_sets = theme_get_option('general', 'gen_sets'); $yt_color = isset($gen_sets['_yt_color']) ? stripslashes($gen_sets['_yt_color']) : ''; $yt_theme = isset($gen_sets['_yt_theme']) ? stripslashes($gen_sets['_yt_theme']) : ''; $vim_color = isset($gen_sets['_vim_color']) ? stripslashes($gen_sets['_vim_color']) : ''; $vim_title = isset($gen_sets['_vim_header']) ? stripslashes($gen_sets['_vim_header']) : ''; $video_id = isset($instance['video_id']) ? $instance['video_id'] : ''; $v_type = isset($instance['v_type']) ? $instance['v_type'] : ''; $v_width = isset($instance['v_width']) ? $instance['v_width'] : 260; $v_height = isset($instance['v_height']) ? $instance['v_height'] : 200; if ($v_type == 'youtube') { $parser_return = theme_youtube_parser($video_id, $v_width, $v_height, null, $yt_color, $yt_theme); } if ($v_type == 'vimeo') { $parser_return = theme_vimeo_parser($video_id, $v_width, $v_height, null, $vim_color, $vim_title); } if ($title && $title != '') { $head = '<h3 class="widget-title">' . $title . '</h3>'; } $rand = rand(1, 200); $v_style = 'style="padding-bottom: ' . ceil($v_height / $v_width * 100) . '%";'; echo $args['before_widget']; echo $head; echo '<div class="widget-content"><div class="widget_video">'; echo '<div class="kids_video_wrapper"> <figure ' . $v_style . '>' . $parser_return . '</figure> </div> <div class="kids_clear"></div> </div></div>' . $args['after_widget']; }
function get_sidebar($post_id) { if (is_page()) { $sidebar = $this->sidebar_names['page']; } if (is_front_page() || $post_id == theme_get_option('homepage', 'home_page')) { $sidebar = $this->sidebar_names['home']; } if (is_blog()) { $sidebar = $this->sidebar_names['blog']; } if (is_singular('post')) { $sidebar = $this->sidebar_names['single']; } elseif (is_singular('portfolio')) { $sidebar = $this->sidebar_names['portfolio']; } if (is_search() || is_archive()) { $sidebar = $this->sidebar_names['blog']; } if (!empty($post_id)) { $custom = get_post_meta($post_id, '_sidebar', true); if (!empty($custom)) { $sidebar = $custom; } } if (isset($sidebar)) { dynamic_sidebar($sidebar); } }
/** * size: small, medium, blog * icon:zoom, doc, play */ function theme_shortcode_image($atts, $content = null, $code) { extract(shortcode_atts(array('size' => 'medium', 'link' => '#', 'icon' => false, 'lightbox' => 'false', 'title' => '', 'align' => false, 'group' => '', 'width' => false, 'height' => false, 'autoheight' => 'false', 'quality' => false), $atts)); if (!$width || !$height) { $width = theme_get_option('image', $size . '_width'); $height = theme_get_option('image', $size . '_height'); if (!$width) { $width = '150'; } if (!$height) { $height = '150'; } } if ($autoheight == 'true') { $height = ''; } $src = trim($content); $no_link = ''; if ($lightbox == 'true') { if ($link == '#') { $link = $src; } } else { if ($link == '#') { $no_link = ' image_no_link'; } } $content = '<img width="' . $width . '" ' . (empty($height) ? '' : 'height="' . $height . '"') . 'alt="' . $title . '" src="' . THEME_INCLUDES . '/timthumb.php?src=' . get_image_src($src) . (empty($height) ? '' : '&h=' . $height) . '&w=' . $width . '&zc=1' . ($quality ? '&q=' . $quality : '') . '" />'; return '[raw]<span class="image_styled' . ($align ? ' align' . $align : '') . '"><span class="image_frame" style="width:' . $width . 'px;' . (empty($height) ? '' : 'height:' . $height . 'px') . '"><a' . ($group ? ' rel="' . $group . '"' : '') . ' class="image_size_' . $size . $no_link . ($icon ? ' image_icon_' . $icon : '') . ($lightbox == 'true' ? ' lightbox' : '') . '" title="' . $title . '" href="' . $link . '">' . $content . '</a></span><img class="image_shadow" width="' . ($width + 2) . '" src="' . THEME_IMAGES . '/image_shadow.png"/></span>[/raw]'; }
function geo_mashup_locations_exclude_the_categorys($json_object, $object) { $exclude = theme_get_option('blog', 'exclude_categorys'); foreach ($json_object['categories'] as $key => $id) { if (!in_array($id, $exclude)) { unset($json_object['categories'][$key]); } } return $json_object; }
function theme_vmenu_widget($args) { // for wp < 3.0 extract($args); $source = theme_get_option('theme_vmenu_source'); echo $before_widget; echo $before_title . __($source, THEME_NS) . $after_title; echo theme_get_menu(array('source' => $source, 'depth' => theme_get_option('theme_vmenu_depth'), 'class' => 'art-vmenu')); echo $after_widget; }
function theme_add_cufon_script() { $fonts = theme_get_option('font', 'fonts'); if (is_array($fonts)) { foreach ($fonts as $font) { wp_register_script($font, THEME_FONT_URI . '/' . $font, array('cufon-yui')); wp_print_scripts($font); } } wp_print_scripts('cufon-yui'); }
function theme_get_image_size() { $customs = theme_get_option('image', 'customs'); $sizes = array("small" => __("Small", 'striking_admin'), "medium" => __("Medium", 'striking_admin'), "large" => __("Large", 'striking_admin')); if (!empty($customs)) { $customs = explode(',', $customs); foreach ($customs as $custom) { $sizes[$custom] = ucfirst(strtolower($custom)); } } return $sizes; }
function theme_advertisement($atts) { extract(shortcode_atts(array('code' => 1, 'align' => 'left', 'inline' => 0), $atts)); $ad = theme_get_option('theme_ad_code_' . $code); if (!empty($ad)) { $ad = '<div class="ad align' . esc_attr($align) . '">' . $ad . '</div>'; if (!$inline) { $ad .= '<div class="cleared"></div>'; } return $ad; } else { return '<p class="error"><strong>[ad]</strong> ' . sprintf(__("Empty ad slot (#%s)!", THEME_NS), esc_attr($code)) . '</p>'; } }
function get_sidebar_options() { $sidebars = theme_get_option('sidebar', 'sidebars'); if (!empty($sidebars)) { $sidebars_array = explode(',', $sidebars); $options = array(); foreach ($sidebars_array as $sidebar) { $options[$sidebar] = $sidebar; } return $options; } else { return array(); } }
function theme_get_dynamic_sidebar_data($sidebar_id) { global $theme_widget_args, $theme_sidebars; $sidebar_style = theme_get_option('theme_sidebars_style_' . $theme_sidebars[$sidebar_id]['group']); theme_ob_start(); $success = dynamic_sidebar($sidebar_id); $content = theme_ob_get_clean(); if (!$success) { return false; } extract($theme_widget_args); $data = explode($after_widget, $content); $widgets = array(); $heading = theme_get_option('theme_' . (is_home() ? 'posts' : 'single') . '_widget_title_tag'); for ($i = 0; $i < count($data); $i++) { $widget = $data[$i]; if (theme_is_empty_html($widget)) { continue; } $id = null; $name = null; $class = null; $style = $sidebar_style; $title = null; if (preg_match('/<widget(.*?)>/', $widget, $matches)) { if (preg_match('/id="(.*?)"/', $matches[1], $ids)) { $id = $ids[1]; } if (preg_match('/name="(.*?)"/', $matches[1], $names)) { $name = $names[1]; } if (preg_match('/class="(.*?)"/', $matches[1], $classes)) { $class = $classes[1]; } if ($name) { $style = theme_get_widget_style($name, $style); } $widget = preg_replace('/<widget[^>]+>/', '', $widget); if (preg_match('/<title>(.*)<\\/title>/', $widget, $matches)) { $title = $matches[1]; $widget = preg_replace('/<title>.*?<\\/title>/', '', $widget); } } $widgets[] = array('id' => $id, 'name' => $name, 'class' => $class, 'style' => $style, 'title' => $title, 'heading' => $heading, 'content' => $widget); } return array_filter($widgets, 'theme_is_displayed_widget'); }
/** * Sidebar Generator. * * @package WordPress * @subpackage Happy Kids * @since Happy Kids 1.0 * @version 3.2.9 */ function cws_register_sidebars() { $gen_sets = theme_get_option('general', 'gen_sets'); $custom_sidebars = isset($gen_sets['_sidebars_list']) ? $gen_sets['_sidebars_list'] : ''; if (function_exists('register_sidebars')) { register_sidebar(array('name' => 'Right Sidebar', 'id' => 'sidebar-1', 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>')); register_sidebar(array('name' => 'Left Sidebar', 'id' => 'sidebar-2', 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>')); register_sidebar(array('name' => 'Footer', 'id' => 'sidebar-3', 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>')); if (!empty($custom_sidebars)) { $sidebars_arr = explode("|", $custom_sidebars); $i = 3; foreach ($sidebars_arr as $sidebar) { $i++; if (function_exists('register_sidebar')) { register_sidebar(array('name' => $sidebar, 'id' => 'sidebar-' . $i, 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>')); } } } } }
function multitranslate($text = null, $id = null, $echo = true) { $gen_sets = theme_get_option('general', 'gen_sets'); if ($text && $id) { $option = isset($gen_sets[$id]) ? $gen_sets[$id] : ''; if ($option) { if (!$echo) { return $option; } else { echo $option; } } else { if (!$echo) { return $text; } else { echo $text; } } } }
function theme_exclude_the_categorys($thelist, $separator = ' ') { if (!defined('WP_ADMIN') && !isset($_GET['geo_mashup_content'])) { //Category IDs to exclude $exclude = theme_get_option('blog', 'exclude_categorys'); $exclude2 = array(); foreach ($exclude as $c) { $exclude2[] = get_cat_name($c); } $cats = explode($separator, $thelist); $newlist = array(); foreach ($cats as $cat) { $catname = trim(strip_tags($cat)); if (!in_array($catname, $exclude2)) { $newlist[] = $cat; } } return implode($separator, $newlist); } else { return $thelist; } }
function sitemap_portfolios($atts) { extract(shortcode_atts(array('show_comment' => false, 'number' => '0', 'cat' => ''), $atts)); if ($number == 0) { $number = 1000; } if ($show_comment === 'true' && theme_get_option('portfolio', 'enable_comment')) { $show_comment = true; } $query = array('showposts' => (int) $number, 'post_type' => 'portfolio'); if ($cat) { $query['taxonomy'] = 'portfolio_category'; $query['term'] = $cat; } query_posts($query); $output = ''; while (have_posts()) { the_post(); $output .= '<li><a href="' . get_permalink() . '" rel="bookmark" title="' . sprintf(__("Permanent Link to %s", 'striking_front'), get_the_title()) . '">' . get_the_title() . '</a>' . ($show_comment ? ' (' . get_comments_number() . ')' : '') . '</li>'; } wp_reset_query(); return '<ul>' . $output . '</ul>'; }
/** * The Template for displaying product archives, including the main shop page which is a post type archive. * * Override this template by copying it to yourtheme/woocommerce/archive-product.php * * @author WooThemes * @package WooCommerce/Templates * @version 2.0.0 */ if (!defined('ABSPATH')) { exit; } // Exit if accessed directly get_header(); $gen_sets = theme_get_option('general', 'gen_sets'); $woo_template = isset($gen_sets['_gen_woo_template_select']) ? $gen_sets['_gen_woo_template_select'] : ''; $gen_side_r = isset($gen_sets['_sidebar_main_woo_r']) ? $gen_sets['_sidebar_main_woo_r'] : false; $gen_side_l = isset($gen_sets['_sidebar_main_woo_l']) ? $gen_sets['_sidebar_main_woo_l'] : false; $show_slider = isset($gen_sets['_gen_slider_select']) ? $gen_sets['_gen_slider_select'] : ''; $slogan_sidebar = isset($gen_sets['slogan-area']) ? $gen_sets['slogan-area'] : ''; $benefits_sidebar = isset($gen_sets['benefits-area']) ? $gen_sets['benefits-area'] : ''; $page_custom = theme_get_post_custom(); $page_crumbs = isset($gen_sets['_gen_breadcrumbs']) ? $gen_sets['_gen_breadcrumbs'] : 'show'; switch ($woo_template) { case 'sb_right': case 'sb_left': $woo_style = "single-sidebar"; break; case 'sb_double': $woo_style = "double-sidebar";
paginate_comments_links(); $pagination = theme_stylize_pagination(theme_ob_get_clean()); echo $pagination; ?> <ul id="comments-list"> <?php wp_list_comments('type=all&callback=theme_comment'); ?> </ul> <?php echo $pagination; ?> </div> <?php } if (!comments_open()) { return; } /* comment form */ theme_ob_start(); $args = array(); if (theme_get_option('theme_comment_use_smilies')) { function theme_comment_form_field_comment($form_field) { theme_include_lib('smiley.php'); return theme_get_smilies_js() . '<p class="smilies">' . theme_get_smilies() . '</p>' . $form_field; } add_filter('comment_form_field_comment', 'theme_comment_form_field_comment'); } comment_form(); echo str_replace(array('id="respond"', '<h3', 'id="reply-title"', '</h3>', 'logged-in-as', 'type="submit"'), array('id="respond" class="cleantheme-commentsform"', '<h2', 'id="reply-title" class="cleantheme-postheader"', '</h2>', 'cleantheme-postcontent logged-in-as', 'class="cleantheme-button" type="submit"'), theme_ob_get_clean());
</h2> <?php } ?> </div> <div class="art-nav"> <div class="art-nav-outer"> <?php echo theme_get_menu(array('source' => theme_get_option('theme_menu_source'), 'depth' => theme_get_option('theme_menu_depth'), 'menu' => 'primary-menu', 'class' => 'art-hmenu')); ?> </div> </div> <div class="cleared reset-box"></div> <?php if (is_home()) { } ?>
function slideShow_anything() { echo <<<HTML <div id="feature_box" class="anything"> \t<div class="inner"> \t\t<div id="anything_slider_wrap"> \t\t\t<ul id="anything_slider"> HTML; $images = $this->slideShow_getPosts('-1', 'full'); $height = theme_get_option('slideshow', 'anything_height'); foreach ($images as $image) { $stop = get_post_meta($image['id'], '_anything_stop', true); if ($stop === '1') { echo "\n<li class='panel stoped'>\n"; } else { echo "\n<li class='panel'>\n"; } switch (get_post_meta($image['id'], '_anything_type', true)) { case 'sidebar': echo '<div class="anything_sidebar_' . get_post_meta($image['id'], '_sidebar_position', true) . '">'; echo '<div class="anything_sidebar_content">'; $page_data = get_page($image['id']); $content = $page_data->post_content; echo apply_filters('the_content', stripslashes($content)); echo '</div>'; echo '<div class="anything_sidebar_image">'; if ($image['link'] != '') { echo '<a href="' . $image['link'] . '"><img src="' . THEME_INCLUDES . '/timthumb.php?src=' . get_image_src($image['src']) . '&h=' . $height . '&w=660&zc=1" alt="" /></a>'; } else { echo '<img src="' . THEME_INCLUDES . '/timthumb.php?src=' . get_image_src($image['src']) . '&h=' . $height . '&w=660&zc=1" alt="" />'; } echo '</div>'; echo '</div>'; break; case 'html': $page_data = get_page($image['id']); $content = $page_data->post_content; echo apply_filters('the_content', stripslashes($content)); break; case 'image': default: $caption_position = get_post_meta($image['id'], '_image_caption_position', true); if ($caption_position != '' && $caption_position != 'disable') { echo '<div class="anything_caption caption_' . $caption_position . '">'; echo '<h3>' . $image['title'] . '</h3>'; if ($image['desc']) { echo '<p>' . $image['desc'] . '</p>'; } echo '</div>'; } if ($image['link'] != '') { echo '<a href="' . $image['link'] . '"><img src="' . THEME_INCLUDES . '/timthumb.php?src=' . get_image_src($image['src']) . '&h=' . $height . '&w=960&zc=1" alt="" /></a>'; } else { echo '<img src="' . THEME_INCLUDES . '/timthumb.php?src=' . get_image_src($image['src']) . '&h=' . $height . '&w=960&zc=1" alt="" />'; } break; } echo "\n</li>\n"; } echo <<<HTML \t\t\t</ul> \t\t</div> \t</div> </div> HTML; $options = array('height' => theme_get_option('slideshow', 'anything_height'), 'buildArrows' => theme_get_option('slideshow', 'anything_buildArrows'), 'toggleArrows' => theme_get_option('slideshow', 'anything_toggleArrows'), 'buildNavigation' => theme_get_option('slideshow', 'anything_buildNavigation'), 'toggleControls' => theme_get_option('slideshow', 'anything_toggleControls'), 'autoPlay' => theme_get_option('slideshow', 'anything_autoPlay'), 'pauseOnHover' => theme_get_option('slideshow', 'anything_pauseOnHover'), 'resumeOnVideoEnd' => theme_get_option('slideshow', 'anything_resumeOnVideoEnd'), 'stopAtEnd' => theme_get_option('slideshow', 'anything_stopAtEnd'), 'playRtl' => theme_get_option('slideshow', 'anything_playRtl'), 'delay' => theme_get_option('slideshow', 'anything_delay'), 'animationTime' => theme_get_option('slideshow', 'anything_animationTime'), 'easing' => theme_get_option('slideshow', 'anything_easing')); echo "\n<script type=\"text/javascript\">\n"; echo "var slideShow = []; \n"; foreach ($options as $key => $value) { if (is_bool($value)) { $value = $value ? "true" : "false"; } elseif ($value != "true" && $value != "false") { $value = "'" . $value . "'"; } echo "slideShow['" . $key . "'] = " . $value . "; \n"; } echo "</script>\n"; }
\tfont-weight:bold; } .custom-item { \tpadding-left:10px; } .custom-item span { \tmargin-right:10px; } </style> HTML; echo '<input type="text" id="add_custom" name="add_custom" pattern="([a-zA-Z\\x7f-\\xff][ a-zA-Z0-9_\\x7f-\\xff]*){0,1}" data-message="' . __('Please input a valid name which starts with a letter, followed by letters, numbers, spaces, or underscores.') . '" maxlength="20" /><span class="validator-error"></span>'; if (!empty($customs)) { echo '<div class="custom-title">' . __('Below are the Sizes you have created', 'striking_admin') . '</div>'; foreach ($customs as $custom) { echo '<div class="custom-item"><span>' . $custom . '</span><input type="hidden" class="custom-item-value" value="' . $custom . '"/><input type="button" class="button" value="' . __('Delete', 'striking_admin') . '"/></div>'; } } echo '<input type="hidden" value="' . $default . '" name="' . $value['id'] . '" id="customs"/>'; } } $options = array(array("name" => __("Image Sizes", 'striking_admin'), "desc" => __("The options listed below determine the dimensions in pixels to use in the shortcode of image.", 'striking_admin'), "type" => "title"), array("name" => __("Custom Sizes", 'striking_admin'), "type" => "start"), array("name" => __("Custom Sizes", 'striking_admin'), "desc" => __("Enter the name of custom you'd like to create.", 'striking_admin'), "id" => "customs", "function" => "theme_add_custom_option", "default" => "", "type" => "custom"), array("type" => "end"), array("name" => __("Small", 'striking_admin'), "type" => "start"), array("name" => __("Width", 'striking_admin'), "desc" => "", "id" => "small_width", "default" => 220, "min" => 0, "max" => 960, "unit" => 'px', "type" => "range"), array("name" => __("Height", 'striking_admin'), "desc" => "", "id" => "small_height", "default" => 150, "min" => 0, "max" => 960, "unit" => 'px', "type" => "range"), array("type" => "end"), array("name" => __("Medium", 'striking_admin'), "type" => "start"), array("name" => __("Width", 'striking_admin'), "desc" => "", "id" => "medium_width", "default" => 292, "min" => 0, "max" => 960, "unit" => 'px', "type" => "range"), array("name" => __("Height", 'striking_admin'), "desc" => "", "id" => "medium_height", "default" => 190, "min" => 0, "max" => 960, "unit" => 'px', "type" => "range"), array("type" => "end"), array("name" => __("Large", 'striking_admin'), "type" => "start"), array("name" => __("Width", 'striking_admin'), "desc" => "", "id" => "large_width", "default" => 459, "min" => 0, "max" => 960, "unit" => 'px', "type" => "range"), array("name" => __("Height", 'striking_admin'), "desc" => "", "id" => "large_height", "default" => 240, "min" => 0, "max" => 960, "unit" => 'px', "type" => "range"), array("type" => "end")); if ($customs = theme_get_option('image', 'customs')) { $custom_array = explode(',', $customs); foreach ($custom_array as $custom) { $options[] = array("name" => $custom . " Sizes", "type" => "start"); $options[] = array("name" => __("Width", 'striking_admin'), "desc" => "", "id" => $custom . "_width", "default" => 150, "min" => 0, "max" => 960, "unit" => 'px', "type" => "range"); $options[] = array("name" => __("Height", 'striking_admin'), "desc" => "", "id" => $custom . "_height", "default" => 150, "min" => 0, "max" => 960, "unit" => 'px', "type" => "range"); $options[] = array("type" => "end"); } } return array('auto' => true, 'name' => 'image', 'options' => $options);
<?php if (!theme_dynamic_sidebar('top')) { $style = theme_get_option('theme_sidebars_style_top'); ?> <?php }
function theme_get_adjacent_post_link($format, $link, $in_same_cat = false, $excluded_categories = '', $previous = true) { if ($previous && is_attachment()) { $post =& get_post($GLOBALS['post']->post_parent); } else { $post = get_adjacent_post($in_same_cat, $excluded_categories, $previous); } if (!$post) { return; } $title = $post->post_title; if (empty($post->post_title)) { $title = $previous ? __('Previous Post', THEME_NS) : __('Next Post', THEME_NS); } $title = apply_filters('the_title', $title, $post->ID); $short_title = $title; if (theme_get_option('theme_single_navigation_trim_title')) { $short_title = theme_trim_long_str($title, theme_get_option('theme_single_navigation_trim_len')); } $date = mysql2date(get_option('date_format'), $post->post_date); $rel = $previous ? 'prev' : 'next'; $string = '<a href="' . get_permalink($post) . '" title="' . esc_attr($title) . '" rel="' . $rel . '">'; $link = str_replace('%title', $short_title, $link); $link = str_replace('%date', $date, $link); $link = $string . $link . '</a>'; $format = str_replace('%link', $link, $format); $adjacent = $previous ? 'previous' : 'next'; return apply_filters("{$adjacent}_post_link", $format, $link); }
rewind_posts(); } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { echo '<h4>' . __('Blog Archives', THEME_NS) . '</h4>'; } theme_post_wrapper(array('content' => ob_get_clean(), 'class' => 'breadcrumbs')); /* Display navigation to next/previous pages when applicable */ if (theme_get_option('theme_top_posts_navigation')) { theme_page_navigation(); } /* Start the Loop */ while (have_posts()) { the_post(); get_template_part('content', get_post_format()); } /* Display navigation to next/previous pages when applicable */ if (theme_get_option('theme_bottom_posts_navigation')) { theme_page_navigation(); } } else { theme_404_content(); } ?> <?php get_sidebar('bottom'); ?> <div class="cleared"></div> </div> <div class="art-layout-cell art-sidebar1"> <?php get_sidebar('default'); ?>
<?php get_header(); theme_generator('introduce'); ?> <div id="page"> <div class="inner right_sidebar"> <div id="main"> <?php theme_generator('breadcrumbs'); ?> <div class="content"> <?php $exclude_cats = theme_get_option('blog', 'exclude_categorys'); foreach ($exclude_cats as $key => $value) { $exclude_cats[$key] = -$value; } $page = get_query_var('paged') ? get_query_var('paged') : 1; $s = get_query_var('s'); query_posts("s={$s}&paged={$page}&cat=" . implode(",", $exclude_cats)); get_template_part('loop', 'search'); ?> <div class="clearboth"></div> </div> <?php if (function_exists('wp_pagenavi')) { wp_pagenavi(); } ?> </div> <?php
public static function is_blog() { global $is_blog; if ($is_blog == true) { return true; } $blog_page_id = theme_get_option('blog', 'blog_page'); if (empty($blog_page_id)) { return false; } if (wpml_get_object_id($blog_page_id, 'page') == get_queried_object_id()) { $is_blog = true; return true; } return false; }
wp_head(); ?> </head> <body <?php body_class(); ?> > <div id="bdls-main"> <div class="bdls-sheet clearfix"> <?php if (theme_has_layout_part("header")) { ?> <header class="bdls-header<?php echo theme_get_option('theme_header_clickable') ? ' clickable' : ''; ?> "><?php get_sidebar('header'); ?> </header> <?php } ?> <div class="bdls-layout-wrapper"> <div class="bdls-content-layout"> <div class="bdls-content-layout-row"> <div class="bdls-layout-cell bdls-content">
<?php /** * * content*.php * * The post format template. You can change the structure of your posts or add/remove post elements here. * * 'id' - post id * 'class' - post class * 'thumbnail' - post icon * 'title' - post title * 'before' - post header metadata * 'content' - post content * 'after' - post footer metadata * * To create a new custom post format template you must create a file "content-YourTemplateName.php" * Then copy the contents of the existing content.php into your file and edit it the way you want. * * Change an existing get_template_part() function as follows: * get_template_part('content', 'YourTemplateName'); * */ global $post; theme_post_wrapper(array('id' => theme_get_post_id(), 'class' => theme_get_post_class(), 'title' => theme_get_meta_option($post->ID, 'theme_show_post_title') ? get_the_title() : '', 'heading' => theme_get_option('theme_single_article_title_tag'), 'before' => theme_get_metadata_icons('date,author,edit', 'header'), 'content' => theme_get_content(), 'after' => theme_get_metadata_icons('category,tag', 'footer')));
// filterable image width with, essentially, no limit for image height. ?> </a> </p> <?php } else { ?> <p class="attachment center"> <a href="<?php echo wp_get_attachment_url(); ?> " title="<?php echo esc_attr(strip_tags(get_the_title())); ?> " rel="attachment"> <?php echo basename(get_permalink()); ?> </a> </p> <?php } echo theme_get_content(); if (wp_attachment_is_image()) { $metadata = wp_get_attachment_metadata(); echo '<p class="center">' . sprintf(__('Full size is %s pixels', THEME_NS), sprintf('<a href="%1$s" title="%2$s">%3$s × %4$s</a>', wp_get_attachment_url(), esc_attr(__('Link to full-size image', THEME_NS)), $metadata['width'], $metadata['height'])) . '</p>'; } /* Display navigation to next/previous pages when applicable */ theme_post_navigation(array('wrap' => false, 'prev_link' => theme_get_next_image_link(false), 'next_link' => theme_get_previous_image_link(false))); theme_post_wrapper(array('id' => theme_get_post_id(), 'class' => theme_get_post_class(), 'title' => '<a href="' . get_permalink($post->ID) . '" rel="bookmark" title="' . strip_tags(get_the_title()) . '">' . get_the_title() . '</a>', 'heading' => theme_get_option('theme_' . (is_home() ? 'posts' : 'single') . '_article_title_tag'), 'before' => theme_get_metadata_icons('date,author,edit', 'header'), 'content' => theme_ob_get_clean()));
<?php get_header(); ?> <?php get_sidebar('top'); ?> <?php if (have_posts()) { /* Start the Loop */ while (have_posts()) { the_post(); get_template_part('content', 'page'); /* Display comments */ if (theme_get_option('theme_allow_comments')) { comments_template(); } } } else { theme_404_content(); } ?> <?php get_sidebar('bottom'); ?> <?php get_footer();
function theme_print_sidebar($name, $places) { $style = theme_get_option('theme_sidebars_style_' . $name); $place_count = count($places); if ($name != 'footer' && $place_count < 2) { theme_print_widgets(reset($places), $style); return; } ?> <div class="art-content-layout"> <div class="art-content-layout-row"> <?php foreach ($places as $place) { ?> <div class="clearfix art-layout-cell art-layout-cell-size<?php echo $place_count; ?> "> <?php if ($name == 'footer') { ?> <div class="art-center-wrapper"> <div class="art-center-inner"> <?php } ?> <?php theme_print_widgets($place, $style); ?> <?php if ($name == 'footer') { ?> </div> </div> <?php } ?> </div> <?php } ?> </div> </div> <?php }
<?php /** * * content*.php * * The post format template. You can change the structure of your posts or add/remove post elements here. * * 'id' - post id * 'class' - post class * 'thumbnail' - post icon * 'title' - post title * 'before' - post header metadata * 'content' - post content * 'after' - post footer metadata * * To create a new custom post format template you must create a file "content-YourTemplateName.php" * Then copy the contents of the existing content.php into your file and edit it the way you want. * * Change an existing get_template_part() function as follows: * get_template_part('content', 'YourTemplateName'); * */ global $post; theme_post_wrapper(array('id' => theme_get_post_id(), 'class' => theme_get_post_class(), 'title' => theme_get_meta_option($post->ID, 'theme_show_page_title') ? get_the_title() : '', 'heading' => theme_get_option('theme_single_article_title_tag'), 'before' => theme_get_metadata_icons('edit', 'header'), 'content' => theme_get_content())); ?>