= 2 || $page >= 2 )
$title = "$title $sep " . sprintf( __( 'Page %s', 'Beverly' ), max( $paged, $page ) );
return $title;
}
function beverly_content_filter($content) {
global $is_sticky;
if(!$content || is_feed()) return $content;
$content = '
'.$content.'
';
if($is_sticky) return $content;
if( !is_singular() ) {
global $post;
if(post_password_required()) return '';
if(beverly_get_post_parts()['show_excerpt']) {
return ''.$content.'
';
}
return '';
} else {
return $content;
}
}
function beverly_more_link_scroll_remove( $link ) {
$link = preg_replace( '|#more-[0-9]+|', '', $link );
return $link;
}
function beverly_thumbnail_filter($html) {
global $post;
global $is_sticky;
if(!is_singular()) {
if($is_sticky) {
if(has_post_thumbnail()) {
return $html;
} elseif(beverly_has_first_img()) {
return beverly_get_first_img();
} else {
return ''.get_the_content().'
';
}
}
if(beverly_get_post_parts()['show_media']) {
if(has_post_thumbnail($post->ID)) {
return '';
} elseif(beverly_has_first_img()) {
return '';
}
}
return '';
} else {
return $html;
}
}
function beverly_author_filter($author) {
return ''.$author.'';
}
function beverly_date_filter($date) {
if( is_feed() ) return $date;
return '';
}
function beverly_tags_filter($tags) {
if( is_feed() ) return $tags;
if( !is_singular() ) {
global $post;
if(beverly_get_post_parts()['show_tags'] && $tags) {
return '';
}
return '';
}
else {
return $tags;
}
}
function beverly_comment_form_filter($defaults) {
$commenter = wp_get_current_commenter();
$req = get_option('require_name_email');
$aria_req = ( $req ? " aria-required='true'" : '' );
$info_text = ( $req ? __('(required)', 'Beverly') : __('(optional)', 'Beverly') );
$fields = array(
'author' => '',
'email' =>
'',
'url' => '',
);
$defaults['fields'] = $fields;
$defaults['comment_notes_before'] = '';
$defaults['comment_notes_after'] = '';
$defaults['comment_field'] = '';
$defaults['title_reply'] = __('Leave a Comment', 'Beverly').'
';
return $defaults;
}
function beverly_comment_author_filter($author) {
$user = get_user_by( 'email', get_comment_author_email());
if($user) {
return ''.$author.'';
} else {
if(get_comment_author_url()) return get_comment_author_url_link($author);
return $author;
}
}
function beverly_oembed_elements_filter($html, $url, $attr) {
if ( strpos( $html, "