';
elseif (isset($img_url)):
echo '
';
else :
echo get_bloginfo('name');
endif;
BJ_ACTIONS::bj_logo_slug();
}
/**
* Displaye the site slug of the default description
* @return type
*/
public static function site_slug() {
$description = get_bloginfo('description');
return $slug = get_theme_mod('bjc_site_slug', $description);
}
public static function footer_info() {
?>
© .
|
ShawnSandy.com'); ?>
P:
post_author;
?>
';
break;
case 'h2':
$content = '';
break;
case 'h3':
$content = '';
break;
case 'h4':
$content = '';
break;
case 'h5':
$content = '';
break;
case 'h6':
$content = '';
break;
case 'article' :
$content = '';
break;
case 'section':
$content = '';
break;
case 'a':
$content = '';
break;
default:
$content = '';
break;
}
echo $content;
}
/**
* Display a place holder images in your blog
* use array with sizes for desktop tablet and phone required to display on each device
* @param array $size : array( 'desktop' => '300x200', 'tablet' => '300x200', 'phone' => '300x200' )
* @param string $color : #000:#fff (background/foreground)
* @param string $text
*/
public static function img_placeholder($size = array('desktop' => '300x200'), $color = '#000:#fff', $text = 'SAMPLE-IMAGE') {
//@link http://imsky.github.com/holder/
wp_enqueue_script('holder-js');
if (isset($size['desktop']))
echo $content = '
';
if (isset($size['tablet']))
echo $content = '
';
if (isset($size['phone']))
echo $content = '
';
}
/**
* display a default post thumbnail.
*/
public static function default_post_thumbanils() {
add_filter('post_thumbnail_html', array('BJ', 'default_thumbnail'));
}
function default_thumbnail($html) {
global $_wp_additional_image_sizes;
$isize = $_wp_additional_image_sizes;
$w = $isize['post-thumbnail']['width'];
$h = $isize['post-thumbnail']['height'];
if (empty($html)) {
$html = '';
$html .= '
';
$html .='';
}
return $html;
}
public static function posts_summary($ps_query = null, $length = 55) {
if (!isset($ps_query))
$q_args = array('showposts' => 5, 'post__not_in' => get_option('sticky_posts'));
$q_args = $ps_query;
$t_query = new WP_Query($q_args);
if ($t_query->have_posts()):
while ($t_query->have_posts()):
$t_query->the_post();
$post_type = get_post_type();
$post_format = (get_post_format() ? get_post_format() : 'general');
// if ($tpl_slug == 'post_type')
// $tpl_slug = $post_type;
// if ($tpl_slug == 'format')
// $tpl_slug = $post_format;
//
// $slug = isset($tpl_slug) ? $tpl_slug : 'base';
// $name = isset($tpl_name) ? $tpl_name : 'general';
//cwp_layout::tpl_part($slug, $name);
?>
' . $name . '';
foreach ($tags as $tag):
$tag_link = get_tag_link($tag->term_id);
?>
name); ?>
';
}
/**
* Display post tagged featured or highlights
* @param array $query - wp_query
* @param string $tpl tpl name
*/
public static function highlights($query = array('showposts' => 5, 'tag' => 'featured,highlights'), $tpl = 'highlights') {
//$query_highlights = array('showposts' => 3);
BJ_POSTDATA::factory()
->set_template_slug($tpl)
->set_wp_query($query)
->query();
}
public static function google_authorship($user_id = null, $meta_field = '1') {
echo '';
}
public static function twitter_card() {
global $post;
$img = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'medium');
if (is_single() || is_page()):
setup_postdata($post);
?>
get_item_quantity($quantity);
$rss_items = $rss->get_items(0, $maxitems);
?>
No items.';
else
// Loop through each feed item and display each item as a hyperlink.
foreach ($rss_items as $item) :
?>
-
get_title(); ?>