%2$s'; if ( is_single() ) { $time_string = sprintf( $time_string, esc_attr( get_the_date( 'c' ) ), human_time_diff( get_the_time( 'U' ), current_time( 'timestamp' ) ) ); $posted_on = sprintf( // Translators: post date in "ago" format. esc_html_x( '%s ago', 'post date', 'blover' ), '' . $time_string . '' ); $byline = ' '; echo '
' . $the_excerpt . '
'; return $the_excerpt; } endif; if ( ! function_exists( 'blover_custom_popular_posts_html_list' ) ) : /** * Builds custom HTML * * With this function, I can alter WPP's HTML output from my theme's functions.php. * This way, the modification is permanent even if the plugin gets updated. * * @param array $mostpopular WPP mostpopular. * @param array $instance WPP instance. * @return string */ function blover_custom_popular_posts_html_list( $mostpopular, $instance ) { $output = '', ), 'label_submit' => esc_html__( 'Submit', 'blover' ), 'logged_in_as' => '', 'comment_field' => '', ); $account_page_url = wc_get_page_permalink( 'myaccount' ); if ( $account_page_url ) { // Translators: url to "my account" page. $comment_form['must_log_in'] = '
' . sprintf( esc_html__( 'You must be %s to post a review.', 'blover' ), '' . esc_html__( 'logged in', 'blover' ) . '' ) . '
'; } if ( get_option( 'woocommerce_enable_review_rating' ) === 'yes' ) { $comment_form['comment_field'] = ''; } $comment_form['comment_field'] .= ''; return $comment_form; } endif; add_filter( 'woocommerce_product_review_comment_form_args', 'blover_woocommerce_comment_fields' ); add_filter( 'add_to_cart_fragments', 'blover_woocommerce_header_add_to_cart_fragment' ); /** * Adding ajax calls when cart is updated. * * @param string $fragments todo. */ function blover_woocommerce_header_add_to_cart_fragment( $fragments ) { global $woocommerce; ob_start(); ?> (cart->get_cart_contents_count() ); ?>) ' . sharing_display( '', false ) . ''; // WPCS: XSS OK. } elseif ( in_array( 'index', $display_options, true ) && ( is_home() || is_front_page() || is_archive() || is_search() || in_array( get_post_type(), $display_options, true ) ) ) { echo '
', 'email' => '
', 'url' => '