comment_type ) { case 'pingback' : case 'trackback' : ?>
  • ', '' ); ?>

  • id="li-comment-" >
    comment_parent ) $avatar_size = 32; echo get_avatar( $comment, $avatar_size ); /* translators: 1: comment author, 2: date and time */ printf( __( '%1$s on %2$s said:','weaver-xtreme'), sprintf( '%s', get_comment_author_link() ), sprintf( '', esc_url( get_comment_link( $comment->comment_ID ) ), get_comment_time( 'c' ), /* translators: 1: date, 2: time */ sprintf( __( '%1$s at %2$s','weaver-xtreme'), get_comment_date(), get_comment_time() ) ) ); edit_comment_link( __( 'Edit','weaver-xtreme'), '', '' ); ?>
    comment_approved == '0' ) : ?>
    __( 'Reply ','weaver-xtreme'), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); if ($rl != '') { ?>
    '; comments_popup_link( '' . ' ' . '', _x( '1', 'comments number','weaver-xtreme'), _x( '%', 'comments number','weaver-xtreme') ); echo ''; } } } //-- if ( ! function_exists('weaverx_content_nav') ) { /** * Display navigation to next/previous pages when applicable */ function weaverx_content_nav( $nav_id , $from_search=false) { global $wp_query; if ( $wp_query->max_num_pages > 1 ) { ?>
    ' . $rep . ''; else $msg = __( 'Continue reading →','weaver-xtreme'); return ' ' . $msg . ''; } } //-- add_filter('weaverx_more_message','weaverx_more_message_filter'); function weaverx_more_message_filter($msg) { return do_shortcode($msg); } if ( !function_exists( 'weaverx_edit_link')) { function weaverx_edit_link($echo = 'echo') { $before = ''; $after = ''; $link_label = __( 'Edit','weaver-xtreme'); $id = 0; if ( !$post = get_post( $id ) ) return; if ( !$url = get_edit_post_link( $post->ID ) ) return; $post_type_obj = get_post_type_object( $post->post_type ); $link = '' . $link_label . ''; $flink = apply_filters( 'edit_post_link', $link, $post->ID ); if (!$flink) $flink = $link; // some https vs http bug in WP $edit = $before . $flink . $after; if ( function_exists('the_gutenberg_project') && strpos( $post->post_content, '"; $link = '' . $link_label . ''; $flink = apply_filters( 'edit_post_link', $link, $post->ID ); if (!$flink) $flink = $link; // some https vs http bug in WP $edit .= $before . $flink. $after; } if ('echo' == $echo) echo $edit; else return $edit; } } //-- if ( ! function_exists( 'weaverx_get_wp_custom_logo' ) ) { /** * Displays the optional custom logo. * * Does nothing if the custom logo is not available. * */ function weaverx_get_wp_custom_logo( ) { if ( function_exists( 'the_custom_logo' ) ) { return get_custom_logo(); } return ''; } } if ( ! function_exists( 'weaverx_get_wp_custom_logo_url' ) ) { /** * Displays the optional custom logo. * * Does nothing if the custom logo is not available. * */ function weaverx_get_wp_custom_logo_url( $size = 'full' ) { $custom_logo_id = get_theme_mod( 'custom_logo' ); $image = ''; // We have a logo. Logo is go. if ( $custom_logo_id ) $image = wp_get_attachment_image_url( $custom_logo_id, $size ); return $image; } } if ( ! function_exists( 'weaverx_entry_header' ) ) { function weaverx_entry_header( $format_title='', $do_excerpt = false ) { /* display entry header (title ) for posts */ $arg = ($do_excerpt) ? 'post_excerpt' : 'post_full'; weaverx_fi( $arg, 'title-before'); $lead = '

    ' ; if ( $format_title != '' && ! weaverx_getopt( 'hide_post_format_icon' ) && ! weaverx_is_checked_post_opt('_pp_hide_post_format_label' ) ) { $icon = ""; $lead .= $icon; } weaverx_post_title($lead, '

    '); } } //-- if ( ! function_exists( 'weaverx_post_title' ) ) { // display the post title function weaverx_post_title($before='', $after='') { if ( weaverx_is_checked_post_opt('_pp_hide_post_title') || weaverx_t_get('hide_title') ) return; echo($before); $title = the_title('', '', false); ?> '' ) ); } } //-- if ( ! function_exists('weaverx_not_found_search')) { function weaverx_not_found_search($file_name) { ?>

    ]*?href=[\'"](.+?)[\'"]/is', get_the_content(), $matches ) ) return false; return esc_url_raw( $matches[1] ); } //-- // ------------------------------------- POST META INFO ----------------------------------- if (! function_exists('weaverx_format_posted_on_footer')) { function weaverx_format_posted_on_footer($who) { if (weaverx_is_checked_post_opt('_pp_hide_bottom_post_meta') || weaverx_is_checked_page_opt('_pp_hide_infobottom')) { weaverx_edit_link(); return; } ?> \n"; if ($type == 'single') { /* translators: used between list items, there is a space after the comma */ $categories_list = get_the_category_list( __( ', ','weaver-xtreme') ); /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list( '', __( ', ','weaver-xtreme') ); if ( '' != $tags_list ) { $utility_text = __( 'This entry was posted in %1$s and tagged %2$s by %5$s. Bookmark the permalink.','weaver-xtreme'); } elseif ( '' != $categories_list ) { $utility_text = __( 'This entry was posted in %1$s by %5$s. Bookmark the permalink.','weaver-xtreme'); } else { $utility_text = __( 'This entry was posted by %5$s. Bookmark the permalink.','weaver-xtreme'); } if ( $categories_list ) { $cat_count = count( get_the_category() ); if ($cat_count < 2 && weaverx_getopt_checked('hide_singleton_category')) $pi .= "\t\t\t\n"; else $pi .="\t\t\t\n"; $pi .= sprintf( __( 'Posted in %2$s','weaver-xtreme'), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list ); $pi .="\t\t\t\n"; } // End if categories /* translators: used between list items, there is a space after the comma */ if ($tags_list ) { $pi .="\t\t\t\n"; $pi .= sprintf( __( 'Tagged %2$s','weaver-xtreme'), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); $pi .= "\t\t\t\n"; } // End if $tags_list $pi .= '' . __('permalink','weaver-xtreme') . ''; $pi .= weaverx_edit_link('noecho'); } else if ($type == 'reply') { $dummy = true; } else { // else not single $show_sep = false; if ( 'page' != get_post_type() ) { // Hide category and tag text for pages on Search /* translators: used between list items, there is a space after the comma */ $categories_list = get_the_category_list( __( ', ','weaver-xtreme') ); $cat_count = count( get_the_category() ); $skip = ($cat_count < 2 && weaverx_getopt_checked('hide_singleton_category')); if ( $categories_list && !$skip) { $pi .= ''; $pi .= sprintf( __( 'Posted in %2$s','weaver-xtreme'), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list ); $show_sep = true; $pi .= ''; } // End if categories /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list( '', __( ', ','weaver-xtreme') ); if ( $tags_list ) { if ( $show_sep ) { $pi .= ' | '; } // End if $show_sep $pi .= ''; $pi .= sprintf( __( 'Tagged %2$s','weaver-xtreme'), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); $show_sep = true; $pi .= ''; } // End if $tags_list } // End if 'page' != get_post_type() if ( comments_open() ) { if ( $show_sep ) { $pi .= ' | '; } // End if $show_sep $pi .= ''; ob_start(); // yuck - why doesn't WP make all the utilities have an echo option?? comments_popup_link( '' . __( 'Leave a reply','weaver-xtreme') . '', __( '1 Reply','weaver-xtreme'), __( '% Replies','weaver-xtreme') ); $pi .= ob_get_clean(); $pi .= ''; } // End if comments_open() $pi .= weaverx_edit_link('noecho'); } // end non-single $pi .= "\n\n"; echo apply_filters('weaverx_posted_in',$pi,$type); } } //-- if ( ! function_exists( 'weaverx_posted_on' ) ) { function weaverx_posted_on($type='') { /** * Prints HTML with meta information for the current post-date/time and author. * Create your own weaverx_posted_on to override in a child theme */ if (weaverx_getopt_checked('post_info_hide_top') || weaverx_is_checked_post_opt('_pp_hide_top_post_meta') || weaverx_is_checked_page_opt('_pp_hide_infotop') || weaverx_t_get('hide_top_info')) { // hide top? return; } if (weaverx_is_checked_page_opt('_pp_hide_infotop') && ! weaverx_t_get('showposts')) { return; } $po = "\n"; if ( (weaverx_getopt_default('show_post_avatar', 'hide') == 'start') || weaverx_is_checked_post_opt('_pp_show_post_avatar') || weaverx_t_get('show_avatar') ) { $po .= ''; $po .= get_avatar( get_the_author_meta('user_email') ,weaverx_getopt_default('post_avatar_int',28),null,'avatar' ); $po .= ''; } $po .= sprintf( __( 'Posted on by ','weaver-xtreme'), esc_url( get_permalink() ), esc_attr( get_the_time() ), esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ), esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), sprintf( esc_attr(__( 'View all posts by %s','weaver-xtreme')), get_the_author() ), weaverx_get_the_author() ); // updated time changed 3.1.11 to handle published as well. Can't mess with messages because of translations. if ( get_the_time( 'Y/m/d' ) !== get_the_modified_time( 'Y/m/d' ) ) { // get original and modified dates - ignore revisions on same day $time_string = ''; } else { $time_string = ''; } $po .= $time_string; // required for Google Structured Data if ( weaverx_getopt_default('show_post_avatar', 'hide') == 'end' ) { $po .= ''; $po .= get_avatar( get_the_author_meta('user_email') ,weaverx_getopt_default('post_avatar_int',28),null,'avatar' ); $po .= ''; } $po .= "\n"; echo apply_filters('weaverx_posted_on',$po, $type); } } //-- if ( ! function_exists( 'weaverx_post_top_meta' ) ) { function weaverx_post_top_meta( $type='' ) { /** * Prints HTML with meta information for the top meta line. */ // $type for single echo "
    \n"; echo weaverx_schema( 'published' ); weaverx_posted_on($type); weaverx_comments_popup_link(); echo "
    \n"; } } //-- function weaverx_per_post_style() { // Emit a '; $image = wp_get_attachment_image_src( get_post_thumbnail_id( ), 'full' ); // (url, width, height) $hdr = $image[0]; $hdr_height = $image[2]; $hdr_width = $image[1]; // wp customizer preview hack for WP 4.4 beta, might go away for 4.4 release $url = get_template_directory_uri(); $url = str_replace(array('http://', 'https://'),'', $url); $hdr = str_replace('%s', $url, $hdr); // 4.4 preview breaks this $hdr = str_replace(array('http://', 'https://'),'//', $hdr); if ($who == 'page' ) $selector = '#container'; else if ( $who == 'post' && $where == 'post-pre') { $selector = '#post-' . get_the_ID() . '{background-color:transparent;}' . '#container'; } else $selector = '#post-' . get_the_ID(); $style = ''; switch ($show) { case 'post-bg-parallax': case 'post-bg-parallax-full': // previous: background-repeat: no-repeat; background-position: center center; background-attachment: fixed; $style = "background-image:url({$hdr});"; // parallax full - use in conjunction with .wvrx-parallax break; case 'post-bg': $style = "background:url({$hdr}) repeat;background-color:transparent;"; // tile vertically break; case 'post-bg-cover': // cover - responsive $style = "background:url({$hdr});background-repeat:no-repeat;background-position:center center; background-size:cover;background-color:transparent;box-sizing:border-box;"; // cover break; default: // no others break; } // echo "{$before}{$selector}{ {$style} }{$after}\n"; if ($style) weaverx_inline_style( "{$before}{$selector}{ {$style} }{$after}\n", 'weaverx-fi:lib-content.php' ); return true; } // end as bg image //weaverx_alert('in fi - who: ' . $who . ' where: ' . $where . ' show: ' . $show); //$align = ($where == 'title_featured') ? 'fi-alignleft' : weaverx_getopt_default( $who . '_fi_align' , 'fi-alignleft'); $align = weaverx_getopt_default( $who . '_fi_align' , 'fi-alignleft'); $before = ''; if ( $where == 'post-pre' ) { $align .= '-pb'; // need to be able to fixup alignment for small devices $before = '
    '; } $fi_class = 'featured-image fi-' . $who . '-' . $where . ' fi-' . $show . ' ' . $hide . ' ' . $align; // construct fi class $attr = array('class' => $fi_class ); // add width if defined $w = weaverx_getopt( $who . '_fi_width' ); if ( $w ) $attr['style'] = 'width:' . $w . '%'; //weaverx_alert('in fi - who: ' . $who . ' where: ' . $where . ' show: ' . $show); if ( $show == $where || ($show == 'post-before' && $where == 'post-pre') || ($show == 'title-banner' && $where == 'title-before') ) { if ( $show == 'header-image') { // special case : header replacement area $image = wp_get_attachment_image_src( get_post_thumbnail_id( ), 'full' ); // (url, width, height) if (!$image) return false; return $image[0]; // let the header code handle the details... } $size = weaverx_getopt_default( $who . '_fi_size', 'thumbnail' ); // weaverx_debug_comment('FI who:' . $who . ' FI size:' . $size); if ( get_post_thumbnail_id() ) { if ( ($href = weaverx_get_per_post_value( '_pp_fi_link' )) == '' ) { // per page link override? if ( $who == 'post_excerpt') { $href = esc_url( get_permalink() ); } else { $image = wp_get_attachment_image_src( get_post_thumbnail_id( ), 'full' ); // (url, width, height) $href = esc_url($image[0]); } } $fi_img = weaverx_schema( 'image' , get_the_post_thumbnail(null, $size, $attr )); $fi_after = apply_filters( 'weaverx_fi_after', '' ); // added 3.1.10 if ($who == 'page' && weaverx_getopt('page_fi_nolink') ) $the_fi = "\n{$before}{$fi_img}{$fi_after}\n"; elseif ($who != 'page' && weaverx_getopt('post_fi_nolink')) $the_fi = "\n{$before}{$fi_img}{$fi_after}\n"; else $the_fi = "\n{$before}{$fi_img}{$fi_after}\n"; /* else if ($who == 'page' ){ $link = weaverx_getopt('page_fi_altlink'); if ( $link != '' ) $href = $link; $the_fi = "\n{$before}{$fi_img}{$fi_after}\n"; } else { // not a page $link = weaverx_getopt('post_fi_altlink'); if ( $link != '' ) $href = $link; $the_fi = "\n{$before}{$fi_img}{$fi_after}\n"; } */ echo apply_filters('weaverx_fi_link', $the_fi, $before, $href, $fi_img, $who, $fi_after); // Added 3.1.5; Changed 3.1.11 to add the $fi_after if ( $show == 'title-banner' ) echo '
    '; return false; } } return false; } } //-- function weaverx_the_page_content( $who = '' ) { weaverx_fi( $who, 'content-top' ); weaverx_the_contnt(); weaverx_fi( $who, 'content-bottom' ); } //-- function weaverx_the_contnt( ) { if ( (weaverx_is_checked_page_opt('_pp_raw_html') && !weaverx_t_get('showposts')) || weaverx_is_checked_post_opt('_pp_raw_html') ) { remove_filter('the_content', 'wpautop'); remove_filter('the_content', 'wptexturize'); } the_content(weaverx_continue_reading_link()); } //-- // ========================= special content ========================= function weaverx_post_div($type = 'content') { // echo the start
    for posts // include columns class if set $class = ''; $cols = weaverx_getopt('post_cols'); if ($cols != '' && $cols != '1') $class = ' cols-' . $cols; echo '
    ' . "\n"; } function weaverx_the_post_full() { if ( weaverx_is_checked_post_opt( '_pp_force_post_excerpt' ) && ! weaverx_is_checked_post_opt( '_pp_force_post_full' ) ) { // check both values - force_excerpt and force_full - here to avoid recursion weaverx_the_post_excerpt(); return; } weaverx_fi( 'post_full', 'content-top' ); weaverx_the_contnt(); weaverx_fi( 'post_full', 'content-bottom' ); } //-- function weaverx_the_post_excerpt() { if ( weaverx_is_checked_post_opt( '_pp_force_post_full' ) ) { weaverx_the_post_full(); return; } weaverx_fi( 'post_excerpt', 'content-top' ); the_excerpt('more...'); weaverx_fi( 'post_excerpt', 'content-bottom' ); } //-- function weaverx_the_post_full_single() { global $page; if ($page <= 1) weaverx_fi( 'post', 'content-top' ); weaverx_the_contnt(); if ($page <= 1) weaverx_fi( 'post', 'content-bottom' ); } //-- function weaverx_show_only_title() { //echo "\n \n"; if ( ! weaverx_t_get( 'showposts' ) && ( weaverx_get_per_page_value('_pp_wvrx_pwp_type') == 'title' || weaverx_t_get('show') == 'title' ) ) { echo weaverx_schema( 'mainEntityOfPage' ); echo "\t\n"; return true; } else if ( ! weaverx_t_get( 'showposts' ) && ( weaverx_get_per_page_value('_pp_wvrx_pwp_type') == 'title_featured' || weaverx_t_get('show') == 'title_featured' ) ) { weaverx_fi( 'post_excerpt', 'title_featured'); // show FI //echo "\t
    \n"; echo weaverx_schema( 'mainEntityOfPage' ); echo "\t\n"; return true; } elseif ( weaverx_t_get('showposts') && weaverx_t_get('show') == 'title_featured') { weaverx_fi( 'post_excerpt', 'title_featured'); // show FI echo weaverx_schema( 'mainEntityOfPage' ); echo "\t
    \n"; return true; } elseif ( weaverx_t_get('showposts') && (weaverx_t_get('show') == 'title' || weaverx_t_get('show') == 'titlelist')) { echo weaverx_schema( 'mainEntityOfPage' ); echo "\t\n"; return true; } return false; } //-- function weaverx_do_excerpt() { // return true if this kind of page should be excerpted if (weaverx_t_get('show')=='excerpt') // for Weaver Xtreme Plus return true; if (weaverx_t_get('show')=='full') // for Weaver Xtreme Plus return false; if (weaverx_is_checked_post_opt('_pp_force_post_excerpt')) return true; if (weaverx_is_checked_post_opt('_pp_force_post_full')) return false; $n1 = weaverx_get_per_page_value('_pp_fullposts'); if (!$n1) $n1 = weaverx_getopt('fullpost_first'); if ($n1) { global $page, $paged; if (!( $paged >= 2 || $page >= 2 ) && weaverx_post_count() <= $n1) return false; } $pwp = weaverx_get_per_page_value('_pp_wvrx_pwp_type'); if ($pwp == 'full') // need to check before archive/search return false; // override global setting if ($pwp == 'excerpt') return true; // override global setting if (is_search()) { return !weaverx_getopt_checked('fullpost_search'); } if (is_archive()) { return !weaverx_getopt_checked('fullpost_archive'); } return !weaverx_getopt_checked('fullpost_blog'); } //-- function weaverx_inline_style( $style, $who ) { /* if ( !isset($GLOBALS['weaverx_end_style']) ) $GLOBALS['weaverx_end_style'] = ''; $GLOBALS['weaverx_end_style'] .= $style . " \n"; */ echo $style; } function weaverx_end_body() { return; // for now... if ( !isset($GLOBALS['weaverx_end_style']) ) return; echo $GLOBALS['weaverx_end_style']; } function weaverx_author_info() { if ( get_the_author_meta( 'description' ) && !weaverx_getopt('hide_author_bio')) { // If a user has filled out their description, show a bio on their entries ?>
    …' . weaverx_continue_reading_link(); } add_filter( 'excerpt_more', 'weaverx_auto_excerpt_more' ); function weaverx_custom_excerpt_more( $output ) { /** * Adds a pretty "Continue Reading" link to custom post excerpts. * * To override this link in a child theme, remove the filter and add your own * function tied to the get_weaverx_the_post_excerpt filter hook. */ if ( has_excerpt() && !is_attachment() ) { $output .= weaverx_continue_reading_link(); } return $output; } add_filter( 'the_excerpt', 'weaverx_custom_excerpt_more' ); function weaverx_the_excerpt_filter($excerpt) { // filter definition return do_shortcode($excerpt); } add_filter('the_excerpt','weaverx_the_excerpt_filter', 10,1); function weaverx_trim_excerpt($text = '') { $raw_excerpt = $text; if ( '' == $text ) { $text = get_the_content(''); $orig_text_len = strlen($text); $text = strip_shortcodes( $text ); // $stripped_text_len = strlen($text); $text = apply_filters('the_content', $text); $text = str_replace(']]>', ']]>', $text); $excerpt_length = apply_filters('excerpt_length', 55); $excerpt_more = apply_filters('excerpt_more', ' ' . '[...]'); $text = wp_trim_words( $text, $excerpt_length, $excerpt_more ); $stripped_text_len = strlen($text); } if ('' == $raw_excerpt && $orig_text_len > $stripped_text_len && get_post_format() == '') { // have stripped shortcodes if ( strpos($text,$excerpt_more) === false) $text .= $excerpt_more; } return apply_filters('wp_trim_excerpt', $text, $raw_excerpt); } //-- remove_filter( 'get_the_excerpt', 'wp_trim_excerpt' ); add_filter( 'get_the_excerpt', 'weaverx_trim_excerpt' ); ?>