"; $content_box_section_title = evolve_theme_mod( 'evl_content_boxes_title', '' ); if ( evolve_theme_mod( 'evl_content_boxes_title', '' ) ) { $content_box_section_title = '

' . evolve_theme_mod( 'evl_content_boxes_title', '' ) . '

'; } echo "
" . $content_box_section_title . "
"; $content_box1_title = evolve_theme_mod( 'evl_content_box1_title', '' ); if ( $content_box1_title === false ) { $content_box1_title = ''; } $content_box1_desc = evolve_theme_mod( 'evl_content_box1_desc', '' ); if ( $content_box1_desc === false ) { $content_box1_desc = ''; } $content_box1_button = evolve_theme_mod( 'evl_content_box1_button', '' ); if ( $content_box1_button === false ) { $content_box1_button = ''; } $content_box1_icon = evolve_theme_mod( 'evl_content_box1_icon', '' ); if ( $content_box1_icon === false ) { $content_box1_icon = ''; } if ( $content_box1_enable == true ) { echo "
"; echo "
"; echo "
" . esc_attr( $content_box1_title ) . "
"; echo "

" . do_shortcode( $content_box1_desc ) . "

"; echo "
"; echo "
"; } $content_box2_title = evolve_theme_mod( 'evl_content_box2_title', '' ); if ( $content_box2_title === false ) { $content_box2_title = ''; } $content_box2_desc = evolve_theme_mod( 'evl_content_box2_desc', '' ); if ( $content_box2_desc === false ) { $content_box2_desc = ''; } $content_box2_button = evolve_theme_mod( 'evl_content_box2_button', '' ); if ( $content_box2_button === false ) { $content_box2_button = ''; } $content_box2_icon = evolve_theme_mod( 'evl_content_box2_icon', '' ); if ( $content_box2_icon === false ) { $content_box2_icon = ''; } if ( $content_box2_enable == true ) { echo "
"; echo "
"; echo "
" . esc_attr( $content_box2_title ) . "
"; echo "

" . do_shortcode( $content_box2_desc ) . "

"; echo "
"; echo "
"; } $content_box3_title = evolve_theme_mod( 'evl_content_box3_title', '' ); if ( $content_box3_title === false ) { $content_box3_title = ''; } $content_box3_desc = evolve_theme_mod( 'evl_content_box3_desc', '' ); if ( $content_box3_desc === false ) { $content_box3_desc = ''; } $content_box3_button = evolve_theme_mod( 'evl_content_box3_button', '' ); if ( $content_box3_button === false ) { $content_box3_button = ''; } $content_box3_icon = evolve_theme_mod( 'evl_content_box3_icon', '' ); if ( $content_box3_icon === false ) { $content_box3_icon = ''; } if ( $content_box3_enable == true ) { echo "
"; echo "
"; echo "
" . esc_attr( $content_box3_title ) . "
"; echo "

" . do_shortcode( $content_box3_desc ) . "

"; echo "
"; echo "
"; } $content_box4_title = evolve_theme_mod( 'evl_content_box4_title', '' ); if ( $content_box4_title === false ) { $content_box4_title = ''; } $content_box4_desc = evolve_theme_mod( 'evl_content_box4_desc', '' ); if ( $content_box4_desc === false ) { $content_box4_desc = ''; } $content_box4_button = evolve_theme_mod( 'evl_content_box4_button', '' ); if ( $content_box4_button === false ) { $content_box4_button = ''; } $content_box4_icon = evolve_theme_mod( 'evl_content_box4_icon', '' ); if ( $content_box4_icon === false ) { $content_box4_icon = ''; } if ( $content_box4_enable == true ) { echo "
"; echo "
"; echo "
" . esc_attr( $content_box4_title ) . "
"; echo "

" . do_shortcode( $content_box4_desc ) . "

"; echo "
"; echo "
"; } echo "
"; } } /* Testimonials ======================================= */ if ( ! function_exists( 'evolve_testimonials' ) ) { function evolve_testimonials() { $html = ''; $testimonials_counter = 0; echo "
"; $testimonials_section_title = evolve_theme_mod( 'evl_testimonials_title', '' ); if ( evolve_theme_mod( 'evl_testimonials_title', '' ) ) { $testimonials_section_title = '

' . evolve_theme_mod( 'evl_testimonials_title', '' ) . '

'; } echo "
" . $testimonials_section_title . "
"; echo $html; } } if ( ! function_exists( 'evolve_get_attachment_id_from_url' ) ) { function evolve_get_attachment_id_from_url( $attachment_url = '' ) { global $wpdb; $attachment_id = false; if ( $attachment_url == '' ) { return; } $upload_dir_paths = wp_upload_dir(); // Make sure the upload path base directory exists in the attachment URL, to verify that we're working with a media library image if ( false !== strpos( $attachment_url, $upload_dir_paths['baseurl'] ) ) { // If this is the URL of an auto-generated thumbnail, get the URL of the original image $attachment_url = preg_replace( '/-\d+x\d+(?=\.(jpg|jpeg|png|gif)$)/i', '', $attachment_url ); // Remove the upload path base directory from the attachment URL $attachment_url = str_replace( $upload_dir_paths['baseurl'] . '/', '', $attachment_url ); // Run a custom database query to get the attachment ID from the modified attachment URL $attachment_id = $wpdb->get_var( $wpdb->prepare( "SELECT wposts.ID FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta WHERE wposts.ID = wpostmeta.post_id AND wpostmeta.meta_key = '_wp_attached_file' AND wpostmeta.meta_value = '%s' AND wposts.post_type = 'attachment'", $attachment_url ) ); } return $attachment_id; } } /* Counter Circle ======================================= */ if ( ! function_exists( 'evolve_counter_circle' ) ) { function evolve_counter_circle() { $html = ''; echo "
"; $counter_circle_section_title = evolve_theme_mod( 'evl_counter_circle_title', '' ); if ( evolve_theme_mod( 'evl_counter_circle_title', '' ) ) { $counter_circle_section_title = '

' . evolve_theme_mod( 'evl_counter_circle_title', '' ) . '

'; } echo $counter_circle_section_title . "
"; for ( $i = 1; $i <= 3; $i ++ ) { $enabled = evolve_theme_mod( "evl_fp_counter_circle{$i}", '0' ); if ( $enabled == 1 ) { $title = evolve_theme_mod( "evl_fp_counter_circle{$i}_text" ); $value = evolve_theme_mod( "evl_fp_counter_circle{$i}_percentage" ); $filledcolor = evolve_theme_mod( "evl_fp_counter_circle{$i}_filledcolor" ); $unfilledcolor = evolve_theme_mod( "evl_fp_counter_circle{$i}_unfilledcolor" ); $size = '220'; $icon = "
"; $scales = 'no'; $countdown = 'no'; $speed = '1500'; $multiplicator = $size / 220; $stroke_size = 11 * $multiplicator; $circle_title = "
{$icon}
" . $title . "
"; $data_percent = $value; $data_countdown = ( $countdown == 'no' ) ? '' : 1; $data_filledcolor = $filledcolor; $data_unfilledcolor = $unfilledcolor; $data_scale = ( $scales == 'no' ) ? '' : 1; $data_size = $size; $data_speed = $speed; $data_strokesize = $stroke_size; $child_wrapper_style = sprintf( 'height:%spx;width:%spx;', $size, $size ); $output = "
{$circle_title}
"; $html .= "
{$output}
"; } } $html .= "
"; echo $html; } } /* WooCommerce Product ======================================= */ if ( ! function_exists( 'evolve_woocommerce_products' ) ) { function evolve_woocommerce_products() { $product_categories = evolve_theme_mod( "evl_fp_woo_product" ); $product_number = evolve_theme_mod( "evl_fp_woo_product_number" ); $product_cat = ''; if( $product_categories ) $product_cat = implode( ",", $product_categories ); $html = ''; echo "
"; $woo_product_section_title = evolve_theme_mod( 'evl_woo_product_title', '' ); if ( evolve_theme_mod( 'evl_woo_product_title', '' ) ) { $woo_product_section_title = '

' . evolve_theme_mod( 'evl_woo_product_title', '' ) . '

'; } echo $woo_product_section_title . "
"; if ( $product_cat ) { $html .= do_shortcode( '[products category="' . $product_cat . '" limit="' . $product_number . '" orderby="title" order="asc"]' ); } else { $html .= do_shortcode( '[products limit="' . $product_number . '" category="" orderby="title" order="asc"]' ); } $html .= "
"; echo $html; } } /* Custom Content ======================================= */ if ( ! function_exists( 'evolve_custom_content' ) ) { function evolve_custom_content() { $content = evolve_theme_mod( "evl_fp_custom_content_editor", '' ); $html = ''; echo "
"; $custom_content_section_title = evolve_theme_mod( 'evl_custom_content_title', '' ); if ( evolve_theme_mod( 'evl_custom_content_title', '' ) ) { $custom_content_section_title = '

' . evolve_theme_mod( 'evl_custom_content_title', '' ) . '

'; } echo $custom_content_section_title . "
"; $html .= "
" . $content . "
"; $html .= "
"; echo $html; } } /* Blog/Page Content ======================================= */ if ( ! function_exists( 'evolve_blog_page_content' ) ) { function evolve_blog_page_content() { /* Hooked: evolve_breadcrumbs() - 10 ======================================= */ do_action( 'evolve_before_post_title' ); if ( have_posts() ) : if ( ! is_page() && evolve_theme_mod( 'evl_nav_links', 'after' ) != "after" && evolve_theme_mod( 'evl_pagination_type', 'pagination' ) != "infinite" ) : get_template_part( 'template-parts/navigation/navigation', 'index' ); endif; if ( evolve_theme_mod( 'evl_post_layout', 'two' ) != "one" && is_home() ) : echo '
'; endif; while ( have_posts() ) : the_post(); get_template_part( 'template-parts/post/content', 'post' ); endwhile; if ( evolve_theme_mod( 'evl_post_layout', 'two' ) != "one" && is_home() ) : echo '
'; endif; if ( ! is_page() && evolve_theme_mod( 'evl_nav_links', 'after' ) != "before" || ( evolve_theme_mod( 'evl_nav_links', 'after' ) != "after" && evolve_theme_mod( 'evl_pagination_type', 'pagination' ) == "infinite" ) ) : get_template_part( 'template-parts/navigation/navigation', 'index' ); endif; else : get_template_part( 'template-parts/post/content', 'none' ); endif; } }