'.$title.'';
} else {
// isolate part 1 and part 2.
$title_part_one = strstr($title, ' ', true); // As of PHP 5.3.0
$title_part_two = strstr($title, ' ');
$output = '
'.$title_part_one.''.$title_part_two.'
';
}
echo $output;
}
/**
* Get Attachment Image Src
*
* @since 1.0.1
* @return string
*/
function agama_return_image_src( $thumb_size ) {
$att_id = get_post_thumbnail_id();
$att_src = wp_get_attachment_image_src( $att_id, $thumb_size );
return esc_url( $att_src[0] );
}
/**
* Check if $page is template page
*
* @since 1.0.1
* @return string
*/
function agama_is_page_template( $page ) {
if( is_page_template( 'page-templates/'.$page ) ) {
return true;
}
return false;
}
/**
* Displays navigation to next/previous pages when applicable.
*
* @since 1.0
*/
if ( ! function_exists( 'agama_content_nav' ) ) {
function agama_content_nav( $html_id ) {
global $wp_query;
if ( $wp_query->max_num_pages > 1 ) : ?>
comment_type ) :
case 'pingback' :
case 'trackback' :
// Display trackbacks differently than normal comments.
?>
id="comment-">
', '' ); ?>
id="li-comment-">
',
esc_url( get_permalink() ),
esc_attr( get_the_time() ),
esc_attr( get_the_date('c') ),
esc_html( get_the_date() )
);
$author = sprintf( '%3$s',
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
esc_attr( sprintf( __( 'View all posts by %s', 'agama' ), get_the_author() ) ),
get_the_author()
);
// Translators: 1 is category, 2 is tag, 3 is the date and 4 is the author's name.
if ( $tag_list ) {
$utility_text = __( 'This entry was posted in %1$s and tagged %2$s on %3$s by %4$s.', 'agama' );
} elseif ( $categories_list ) {
$utility_text = __( 'This entry was posted in %1$s on %3$s by %4$s.', 'agama' );
} else {
$utility_text = __( 'This entry was posted on %3$s by %4$s.', 'agama' );
}
printf(
$utility_text,
$categories_list,
$tag_list,
$date,
$author
);
}
}
/**
* .article-wrapper Grid, List - Style
*
* @since 1.0.1
*/
function agama_article_wrapper_class() {
$blog_layout = esc_attr( get_theme_mod( 'agama_blog_layout', 'list' ) );
switch( $blog_layout ):
case 'list':
echo 'list-style';
break;
case 'grid':
echo 'grid-style';
break;
case 'small_thumbs':
echo 'small_thumbs';
break;
endswitch;
}
/* Omit closing PHP tag to avoid "Headers already sent" issues. */
', '
' ); ?> '', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>