$wp_query->max_num_pages ) {
return;
}
?>
%2$s', esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ), esc_attr( get_the_modified_date( 'c' ) ), esc_html( get_the_modified_date() ) ), '' . esc_html( get_the_author() ) . '' ); ?>
ID ) || empty( $briar_share_buttons_on ) || empty( $briar_share_buttons ) || ( is_home() && ! $briar_share_buttons_home_on ) || ( is_archive() && ! $briar_share_buttons_archive_on ) || ( is_search() && ! $briar_share_buttons_search_on ) || ( is_single() && ( ( in_array( 'blog-post-share-links-top', $classes ) && ! $briar_share_buttons_single_top_on ) || ( in_array( 'blog-post-share-links-bottom', $classes ) && ! $briar_share_buttons_single_bottom_on ) ) ) ) && ! is_customize_preview() ) {
return;
}
wp_enqueue_script( 'briar-sharrre' );
array_unshift( $classes, 'briar-share-buttons' );
$share_url = get_permalink( $post->ID );
$share_text = get_the_title( $post );
$share_media = has_post_thumbnail( $post->ID ) ? wp_get_attachment_url( get_post_thumbnail_id( $post->ID ) ) : '';
$share_via = '';
if ( ! empty( $briar_share_buttons_via ) ) {
$share_via = $briar_share_buttons_via;
}
$share_buttons = array(
'twitter' => __( 'Tweet', 'briar' ),
'facebook' => __( 'Like', 'briar' ),
'googleplus' => __( '+1', 'briar' ),
'pinterest' => __( 'Pin it', 'briar' ),
'linkedin' => __( 'Share on LinkedIn', 'briar' ),
'digg' => __( 'Digg it!', 'briar' ),
'delicious' => __( 'Share on Delicious', 'briar' ),
'stumbleupon' => __( 'Stumble', 'briar' ),
);
$urlCurl = get_template_directory_uri() . '/inc/sharrre.php';
if ( is_customize_preview() ) {
$briar_share_buttons = array();
}
?>
'ids',
'hide_empty' => 1,
// We only need to know if there is more than one category.
'number' => 2,
) );
// Count the number of categories that are attached to the posts.
$all_the_cool_cats = count( $all_the_cool_cats );
set_transient( 'briar_categories', $all_the_cool_cats );
}
if ( $all_the_cool_cats > 1 ) {
// This blog has more than 1 category so briar_categorized_blog should return true.
return true;
} else {
// This blog has only 1 category so briar_categorized_blog should return false.
return false;
}
}
/**
* Flush out the transients used in briar_categorized_blog.
*/
function briar_category_transient_flusher() {
// Like, beat it. Dig?
delete_transient( 'briar_categories' );
}
add_action( 'edit_category', 'briar_category_transient_flusher' );
add_action( 'save_post', 'briar_category_transient_flusher' );
/**
* Display an optional post thumbnail or specific post format header.
*
* @since 1.0
*/
function briar_post_thumbnail() {
if ( post_password_required() || is_attachment() ) {
return;
}
if ( ! has_post_thumbnail() ) {
return;
}
if ( is_singular() ) : ?>
$max_chars ) {
$read_more = true;
$content = mb_substr( $content, 0, $max_chars ) . '...';
}
echo wp_kses( apply_filters( 'the_content', $content ), $allowedposttags );
if ( $read_more ) {
printf( '
%1$s
', sprintf( esc_html__( 'Read more%s', 'briar' ), '
' . get_the_title() . '' ), esc_url( get_permalink() ) );
}
} else {
if ( ( has_excerpt() && ! is_singular() ) || ( 'audio' !== get_post_format() && 'video' !== get_post_format() && ( is_search() || is_archive() ) ) ) :
the_excerpt();
printf( '
%1$s
', sprintf( esc_html__( 'Read more%s', 'briar' ), '
' . get_the_title() . '' ), esc_url( get_permalink() ) );
else :
the_content( sprintf( __( 'Read more%s', 'briar' ), '
' . get_the_title() . '' ) );
endif;
}
}
/**
* Parse chat content
*
* @param string $content Post content.
* @since 1.0
*/
function briar_parse_chat_content( $content ) {
return preg_replace( '/([a-z0-9 ]*)(\:)/mi', '
$1', $content );
}