urlencode( implode( '|', $font_families ) ),
'subset' => urlencode( 'latin,latin-ext' ),
);
$fonts_url = add_query_arg( $query_args, "//fonts.googleapis.com/css" );
}
return $fonts_url;
}
function beverly_format_comment($comment, $args, $depth) {
$GLOBALS['comment'] = $comment;
extract($args, EXTR_SKIP);
$tag = 'div';
$add_below = 'comment';
?>
id="comment-">
get_comment_ID())); ?>
';
$hrefs = beverly_get_links();
if(sizeof($hrefs) > 3) {
$more_links = true;
$hrefs = array_slice($hrefs,0,3);
}
foreach ($hrefs as $href) {
echo '
'.beverly_get_nice_url($href).'';
}
if($more_links) echo '...';
echo '
';
}
function beverly_get_links( $content = false ){
global $post;
if(!$content) $content = $post->post_content;
$dom = new DomDocument();
@$dom->loadHTML($content);
$urls = $dom->getElementsByTagName('a');
$hrefs = array();
foreach ($urls as $url) {
$hrefs[] = $url->getAttribute('href');
}
return $hrefs;
}
function beverly_get_first_quote( $content = false ) {
global $post;
if(!$content) $content = $post->post_content;
$dom = new DomDocument();
@$dom->loadHTML(''.$content);
$quotes = $dom->getElementsByTagName('q');
if($quotes->length == 0) $quotes = $dom->getElementsByTagName('blockquote');
if($quotes->length == 0) return "";
return $quotes->item(0);
}
function beverly_the_quote() {
echo '';
if($card_info['show_title']) {
beverly_post_card_title();
}
if($have_post_meta) {
echo '
';
$fullInfo = ($card_info['show_author'] && $card_info["show_pubdate"] && $card_info['show_comments'] && $card_info['show_category'] && get_post_type() != "page");
if($fullInfo) echo '';
if($card_info['show_author']) {
echo '';
the_author();
echo '';
}
if($card_info["show_pubdate"]) {
echo '';
beverly_the_date_archive();
echo '';
}
if($fullInfo) echo '';
if($card_info['show_category'] && get_post_type() != "page") {
echo '';
the_category(', ');
echo '';
}
if ( has_post_format( 'gallery' )) {
global $post;
global $is_parsing_img;
$is_parsing_img = true;
$galleries = get_post_galleries_images( $post );
$is_parsing_img = false;
$i = 0;
foreach($galleries as $gallery) {
$i += count($gallery);
}
echo ''.$i.'';
}
if($card_info['show_comments']) {
echo '';
}
if($fullInfo) echo '';
echo '
';
}
echo '
';
}
}
function beverly_settings_checkbox($id, $name, $db_value, $value, $label) {
echo "