'; $svg .= ' '; $svg .= ''; return $svg; } } /* Truncate Function ======================================= */ if ( ! function_exists( 'evolve_truncate' ) ) { function evolve_truncate( $maxLength, $html, $isUtf8 = true, $trailing = '...' ) { $printedLength = 0; $position = 0; $tags = array(); // For UTF-8, we need to count multibyte sequences as one character. $re = $isUtf8 ? '{]*>|&#?[a-zA-Z0-9]+;|[\x80-\xFF][\x80-\xBF]*}' : '{]*>|&#?[a-zA-Z0-9]+;}'; while ( $printedLength < $maxLength && preg_match( $re, $html, $match, PREG_OFFSET_CAPTURE, $position ) ) { list( $tag, $tagPosition ) = $match[0]; // Print text leading up to the tag. $str = substr( $html, $position, $tagPosition - $position ); if ( $printedLength + strlen( $str ) > $maxLength ) { print( substr( $str, 0, $maxLength - $printedLength ) ); $printedLength = $maxLength; break; } print( $str ); $printedLength += strlen( $str ); if ( $printedLength >= $maxLength ) { break; } if ( $tag[0] == '&' || ord( $tag ) >= 0x80 ) { // Pass the entity or UTF-8 multibyte sequence through unchanged. print( $tag ); $printedLength ++; } else { // Handle the tag. $tagName = $match[1][0]; if ( $tag[1] == '/' ) { // This is a closing tag. $openingTag = array_pop( $tags ); assert( $openingTag == $tagName ); // check that tags are properly nested. print( $tag ); } else if ( $tag[ strlen( $tag ) - 2 ] == '/' ) { // Self-closing tag. print( $tag ); } else { // Opening tag. print( $tag ); $tags[] = $tagName; } } // Continue after the tag. $position = $tagPosition + strlen( $tag ); } // Print any remaining text. if ( $printedLength < $maxLength && $position < strlen( $html ) ) { print( substr( $html, $position, $maxLength - $printedLength ) ); } // Print Trailing if ( ( ( ( $maxLength - $printedLength ) == $maxLength || ( $maxLength - $printedLength ) == 0 ) && $position == 0 && strlen( $html ) > $maxLength ) ) { print $trailing; } // Close any open tags. while ( ! empty( $tags ) ) { printf( '', array_pop( $tags ) ); } } } /* Custom Excerpt Length ======================================= */ if ( ! function_exists( 'evolve_excerpt_max_charlength' ) ) { function evolve_excerpt_max_charlength( $limit ) { return wp_trim_words( get_the_excerpt(), $limit ); } } /* Get First Image ======================================= */ if ( ! function_exists( 'evolve_get_first_image' ) ) { function evolve_get_first_image() { global $post; if ( evolve_theme_mod( 'evl_featured_images', '1' ) != "1" ) { return; } $first_img = ''; preg_match_all( '//i', $post->post_content, $matches ); if ( isset( $matches[1][0] ) ) { $first_img = $matches [1][0]; } return $first_img; } } /* Tiny URL ======================================= */ if ( ! function_exists( 'evolve_tinyurl' ) ) { function evolve_tinyurl( $url ) { $response = esc_url( wp_remote_retrieve_body( wp_remote_get( 'http://tinyurl.com/api-create.php?url=' . $url ) ) ); return $response; } } /* Function To Change The HEX Color Code ======================================= */ if ( ! function_exists( 'evolve_hex_change' ) ) { function evolve_hex_change( $hex, $steps = '-12' ) { // Steps should be between -255 and 255. Negative = darker, positive = lighter $steps = max( - 255, min( 255, $steps ) ); // Normalize into a six character long hex string $hex = str_replace( '#', '', $hex ); if ( strlen( $hex ) == 3 ) { $hex = str_repeat( substr( $hex, 0, 1 ), 2 ) . str_repeat( substr( $hex, 1, 1 ), 2 ) . str_repeat( substr( $hex, 2, 1 ), 2 ); } // Split into three parts: R, G and B $color_parts = str_split( $hex, 2 ); $return = '#'; foreach ( $color_parts as $color ) { $color = hexdec( $color ); // Convert to decimal $color = max( 0, min( 255, $color + $steps ) ); // Adjust color $return .= str_pad( dechex( $color ), 2, '0', STR_PAD_LEFT ); // Make two char hex code } return $return; } } /* Convert HEX Color Code To RGB(a) With Alpha ======================================= */ if ( ! function_exists( 'evolve_hex_rgba' ) ) { function evolve_hex_rgba( $hex, $alpha = false ) { $hex = str_replace( '#', '', $hex ); $length = strlen( $hex ); $rgb['r'] = hexdec( $length == 6 ? substr( $hex, 0, 2 ) : ( $length == 3 ? str_repeat( substr( $hex, 0, 1 ), 2 ) : 0 ) ); $rgb['g'] = hexdec( $length == 6 ? substr( $hex, 2, 2 ) : ( $length == 3 ? str_repeat( substr( $hex, 1, 1 ), 2 ) : 0 ) ); $rgb['b'] = hexdec( $length == 6 ? substr( $hex, 4, 2 ) : ( $length == 3 ? str_repeat( substr( $hex, 2, 1 ), 2 ) : 0 ) ); if ( $alpha ) { $rgb['a'] = $alpha; } return implode( array_keys( $rgb ) ) . '(' . implode( ', ', $rgb ) . ')'; } } /* Custom Menu Walker ======================================= */ if ( ! class_exists( 'evolve_custom_menu_walker' ) ) { /** * WP_Bootstrap_Navwalker class. * * @extends Walker_Nav_Menu */ class evolve_custom_menu_walker extends Walker_Nav_Menu { /** * Starts the list before the elements are added. * * @since WP 3.0.0 * * @see Walker_Nav_Menu::start_lvl() * * @param string $output Used to append additional content (passed by reference). * @param int $depth Depth of menu item. Used for padding. * @param stdClass $args An object of wp_nav_menu() arguments. */ public function start_lvl( &$output, $depth = 0, $args = array() ) { if ( isset( $args->item_spacing ) && 'discard' === $args->item_spacing ) { $t = ''; $n = ''; } else { $t = "\t"; $n = "\n"; } $indent = str_repeat( $t, $depth ); // Default class to add to the file. $classes = array( 'dropdown-menu' ); /** * Filters the CSS class(es) applied to a menu list element. * * @since WP 4.8.0 * * @param array $classes The CSS classes that are applied to the menu `'; if ( $container ) { $fallback_output .= ''; } // if $args has 'echo' key and it's true echo, otherwise return. if ( array_key_exists( 'echo', $args ) && $args['echo'] ) { echo $fallback_output; // WPCS: XSS OK. } else { return $fallback_output; } } } /** * Find any custom linkmod or icon classes and store in their holder * arrays then remove them from the main classes array. * * Supported linkmods: .disabled, .dropdown-header, .dropdown-divider, .sr-only * Supported iconsets: Font Awesome 4/5, Glypicons * * NOTE: This accepts the linkmod and icon arrays by reference. * * @since 4.0.0 * * @param array $classes an array of classes currently assigned to the item. * @param array $linkmod_classes an array to hold linkmod classes. * @param array $icon_classes an array to hold icon classes. * @param integer $depth an integer holding current depth level. * * @return array $classes a maybe modified array of classnames. */ private function seporate_linkmods_and_icons_from_classes( $classes, &$linkmod_classes, &$icon_classes, $depth ) { // Loop through $classes array to find linkmod or icon classes. foreach ( $classes as $key => $class ) { // If any special classes are found, store the class in it's // holder array and and unset the item from $classes. if ( preg_match( '/^disabled|^sr-only/i', $class ) ) { // Test for .disabled or .sr-only classes. $linkmod_classes[] = $class; unset( $classes[ $key ] ); } elseif ( preg_match( '/^dropdown-header|^dropdown-divider|^dropdown-item-text/i', $class ) && $depth > 0 ) { // Test for .dropdown-header or .dropdown-divider and a // depth greater than 0 - IE inside a dropdown. $linkmod_classes[] = $class; unset( $classes[ $key ] ); } elseif ( preg_match( '/^fa-(\S*)?|^fa(s|r|l|b)?(\s?)?$/i', $class ) ) { // Font Awesome. $icon_classes[] = $class; unset( $classes[ $key ] ); } elseif ( preg_match( '/^glyphicon-(\S*)?|^glyphicon(\s?)$/i', $class ) ) { // Glyphicons. $icon_classes[] = $class; unset( $classes[ $key ] ); } } return $classes; } /** * Return a string containing a linkmod type and update $atts array * accordingly depending on the decided. * * @since 4.0.0 * * @param array $linkmod_classes array of any link modifier classes. * * @return string empty for default, a linkmod type string otherwise. */ private function get_linkmod_type( $linkmod_classes = array() ) { $linkmod_type = ''; // Loop through array of linkmod classes to handle their $atts. if ( ! empty( $linkmod_classes ) ) { foreach ( $linkmod_classes as $link_class ) { if ( ! empty( $link_class ) ) { // check for special class types and set a flag for them. if ( 'dropdown-header' === $link_class ) { $linkmod_type = 'dropdown-header'; } elseif ( 'dropdown-divider' === $link_class ) { $linkmod_type = 'dropdown-divider'; } elseif ( 'dropdown-item-text' === $link_class ) { $linkmod_type = 'dropdown-item-text'; } } } } return $linkmod_type; } /** * Update the attributes of a nav item depending on the limkmod classes. * * @since 4.0.0 * * @param array $atts array of atts for the current link in nav item. * @param array $linkmod_classes an array of classes that modify link or nav item behaviors or displays. * * @return array maybe updated array of attributes for item. */ private function update_atts_for_linkmod_type( $atts = array(), $linkmod_classes = array() ) { if ( ! empty( $linkmod_classes ) ) { foreach ( $linkmod_classes as $link_class ) { if ( ! empty( $link_class ) ) { // update $atts with a space and the extra classname... // so long as it's not a sr-only class. if ( 'sr-only' !== $link_class ) { $atts['class'] .= ' ' . esc_attr( $link_class ); } // check for special class types we need additional handling for. if ( 'disabled' === $link_class ) { // Convert link to '#' and unset open targets. $atts['href'] = '#'; unset( $atts['target'] ); } elseif ( 'dropdown-header' === $link_class || 'dropdown-divider' === $link_class || 'dropdown-item-text' === $link_class ) { // Store a type flag and unset href and target. unset( $atts['href'] ); unset( $atts['target'] ); } } } } return $atts; } /** * Wraps the passed text in a screen reader only class. * * @since 4.0.0 * * @param string $text the string of text to be wrapped in a screen reader class. * * @return string the string wrapped in a span with the class. */ private function wrap_for_screen_reader( $text = '' ) { if ( $text ) { $text = '' . $text . ''; } return $text; } /** * Returns the correct opening element and attributes for a linkmod. * * @since 4.0.0 * * @param string $linkmod_type a sting containing a linkmod type flag. * @param string $attributes a string of attributes to add to the element. * * @return string a string with the openign tag for the element with attribibutes added. */ private function linkmod_element_open( $linkmod_type, $attributes = '' ) { $output = ''; if ( 'dropdown-item-text' === $linkmod_type ) { $output .= ''; } elseif ( 'dropdown-header' === $linkmod_type ) { // For a header use a span with the .h6 class instead of a real // header tag so that it doesn't confuse screen readers. $output .= ''; } elseif ( 'dropdown-divider' === $linkmod_type ) { // this is a divider. $output .= ''; } return $output; } } } /* Get BuddyPress Page ID ======================================= */ if ( ! function_exists( 'evolve_bp_get_id' ) ) { function evolve_bp_get_id() { $post_id = ''; $bp_page_id = get_option( 'bp-pages' ); if ( ( function_exists( 'is_buddypress' ) && is_buddypress() ) ) { if ( bp_is_current_component( 'members' ) ) { $post_id = $bp_page_id['members']; } elseif ( bp_is_current_component( 'activity' ) ) { $post_id = $bp_page_id['activity']; } elseif ( bp_is_current_component( 'groups' ) ) { $post_id = $bp_page_id['groups']; } elseif ( bp_is_current_component( 'register' ) ) { $post_id = $bp_page_id['register']; } elseif ( bp_is_current_component( 'activate' ) ) { $post_id = $bp_page_id['activate']; } else { $post_id = ''; } } return $post_id; } } /* Function To Print Out CSS Class According To Layout Or Post Meta ======================================= */ if ( ! function_exists( 'evolve_layout_class' ) ) { function evolve_layout_class( $type = 1 ) { global $post, $wp_query; $post_id = ''; if ( $wp_query->is_posts_page ) { $post_id = get_option( 'page_for_posts' ); } elseif ( ( function_exists( 'is_buddypress' ) && is_buddypress() ) ) { $post_id = evolve_bp_get_id(); } else { $post_id = isset( $post->ID ) ? $post->ID : ''; } $layout_css = ''; switch ( evolve_theme_mod( 'evl_layout', '2cl' ) ): case "1c": $layout_css = 'col-12'; break; case "2cl": $layout_css = 'col-sm-12 col-md-8'; break; case "2cr": $layout_css = 'col-sm-12 col-md-8 order-1 order-md-2'; break; case "3cm": $layout_css = 'col-md-12 col-lg-6 order-1 order-lg-2'; break; case "3cr": $layout_css = 'col-md-12 col-lg-6 order-1 order-lg-3'; break; case "3cl": $layout_css = 'col-md-12 col-lg-6 order-1'; break; endswitch; if ( is_single() || is_page() || $wp_query->is_posts_page || ( function_exists( 'is_buddypress' ) && is_buddypress() ) || ( class_exists( 'bbPress' ) && is_bbpress() ) ): $sidebar_position = get_post_meta( $post_id, 'evolve_sidebar_position', true ); if ( ( $type == 1 && $sidebar_position == "default" ) || ( $type == 2 && $sidebar_position == "default" ) ) { if ( get_post_meta( $post_id, 'evolve_full_width', true ) == 'yes' ) { $layout_css = 'col'; } } switch ( $sidebar_position ): case "default": //do nothing break; case "2cl": $layout_css = 'col-sm-12 col-md-8'; break; case "2cr": $layout_css = 'col-sm-12 col-md-8 order-1 order-md-2'; break; case "3cm": $layout_css = 'col-md-12 col-lg-6 order-1 order-lg-2'; break; case "3cr": $layout_css = 'col-md-12 col-lg-6 order-1 order-lg-3'; break; case "3cl": $layout_css = 'col-md-12 col-lg-6 order-1'; break; endswitch; endif; if ( is_front_page() && is_page() || is_home() ) { switch ( evolve_theme_mod( 'evl_frontpage_layout', '1c' ) ): case "1c": $layout_css = 'col-12'; break; case "2cl": $layout_css = 'col-sm-12 col-md-8'; break; case "2cr": $layout_css = 'col-sm-12 col-md-8 order-1 order-md-2'; break; case "3cm": $layout_css = 'col-md-12 col-lg-6 order-1 order-lg-2'; break; case "3cr": $layout_css = 'col-md-12 col-lg-6 order-1 order-lg-3'; break; case "3cl": $layout_css = 'col-md-12 col-lg-6 order-1'; break; endswitch; } if ( $type == 1 ) { if ( class_exists( 'Woocommerce' ) ): if ( is_cart() || is_checkout() || is_account_page() || ( get_option( 'woocommerce_thanks_page_id' ) && is_page( get_option( 'woocommerce_thanks_page_id' ) ) ) ) { $layout_css = 'col'; } endif; } echo $layout_css; } } /* Function To Print Out CSS Class According To Sidebar Layout ======================================= */ if ( ! function_exists( 'evolve_sidebar_class' ) ) { function evolve_sidebar_class() { global $wp_query, $post; $post_id = ''; if ( $wp_query->is_posts_page ) { $post_id = get_option( 'page_for_posts' ); } elseif ( ( function_exists( 'is_buddypress' ) && is_buddypress() ) ) { $post_id = evolve_bp_get_id(); } else { $post_id = isset( $post->ID ) ? $post->ID : ''; } $sidebar_css = ''; switch ( evolve_theme_mod( 'evl_layout', '2cl' ) ): case "1c": //do nothing break; case "2cl": $sidebar_css = 'col-sm-12 col-md-4'; break; case "2cr": $sidebar_css = 'col-sm-12 col-md-4 order-2 order-md-1'; break; case "3cm": case "3cl": $sidebar_css = 'col-md-12 col-lg-3 order-3'; break; case "3cr": $sidebar_css = 'col-md-12 col-lg-3 order-3 order-lg-2'; break; endswitch; $sidebar_position = get_post_meta( $post_id, 'evolve_sidebar_position', true ); if ( is_page() || is_single() ): switch ( $sidebar_position ): case "default": //do nothing break; case "2cl": $sidebar_css = 'col-sm-12 col-md-4'; break; case "2cr": $sidebar_css = 'col-sm-12 col-md-4 order-2 order-md-1'; break; case "3cm": case "3cl": $sidebar_css = 'col-md-12 col-lg-3 order-3'; break; case "3cr": $sidebar_css = 'col-md-12 col-lg-3 order-3 order-lg-2'; break; endswitch; endif; if ( is_front_page() && is_page() || is_home() ) { switch ( evolve_theme_mod( 'evl_frontpage_layout', '1c' ) ): case "1c": $sidebar_css = ''; break; case "2cl": $sidebar_css = 'col-sm-12 col-md-4'; break; case "2cr": $sidebar_css = 'col-sm-12 col-md-4 order-2 order-md-1'; break; case "3cm": case "3cl": $sidebar_css = 'col-md-12 col-lg-3 order-3'; break; case "3cr": $sidebar_css = 'col-md-12 col-lg-3 order-3 order-lg-2'; break; endswitch; } echo $sidebar_css; } } /* Function To Print Out CSS Class According To Sidebar-2 Layout ======================================= */ if ( ! function_exists( 'evolve_sidebar_class_2' ) ) { function evolve_sidebar_class_2() { global $wp_query, $post; $post_id = ''; if ( $wp_query->is_posts_page ) { $post_id = get_option( 'page_for_posts' ); } elseif ( ( function_exists( 'is_buddypress' ) && is_buddypress() ) ) { $post_id = evolve_bp_get_id(); } else { $post_id = isset( $post->ID ) ? $post->ID : ''; } $sidebar_css = ''; switch ( evolve_theme_mod( 'evl_layout', '2cl' ) ): case "3cm": case "3cr": $sidebar_css = 'col-md-12 col-lg-3 order-2 order-lg-1'; break; case "3cl": $sidebar_css = 'col-md-12 col-lg-3 order-2'; break; endswitch; $sidebar_position = get_post_meta( $post_id, 'evolve_sidebar_position', true ); if ( is_page() || is_single() ): switch ( $sidebar_position ): case "3cm": case "3cr": $sidebar_css = 'col-md-12 col-lg-3 order-2 order-lg-1'; break; case "3cl": $sidebar_css = 'col-md-12 col-lg-3 order-2'; break; endswitch; endif; if ( is_front_page() && is_page() || is_home() ) { switch ( evolve_theme_mod( 'evl_frontpage_layout', '1c' ) ): case "3cm": case "3cr": $sidebar_css = 'col-md-12 col-lg-3 order-2 order-lg-1'; break; case "3cl": $sidebar_css = 'col-md-12 col-lg-3 order-2'; break; endswitch; } echo $sidebar_css; } } /* Function To Determine Whether To get_sidebar(), Depending On Theme Options Layout And Post Meta Layout ======================================= */ if ( ! function_exists( 'evolve_lets_get_sidebar' ) ) { function evolve_lets_get_sidebar() { global $wp_query, $post; $post_id = ''; if ( $wp_query->is_posts_page ) { $post_id = get_option( 'page_for_posts' ); } elseif ( ( function_exists( 'is_buddypress' ) && is_buddypress() ) ) { $post_id = evolve_bp_get_id(); } else { $post_id = isset( $post->ID ) ? $post->ID : ''; } $get_sidebar = false; if ( evolve_theme_mod( 'evl_layout', '2cl' ) != "1c" ) { $get_sidebar = true; } if ( ( is_page() || is_single() || $wp_query->is_posts_page || ( function_exists( 'is_buddypress' ) && is_buddypress() ) || ( class_exists( 'bbPress' ) && is_bbpress() ) ) && get_post_meta( $post_id, 'evolve_full_width', true ) == 'yes' ) { $get_sidebar = false; } if ( is_single() || is_page() || $wp_query->is_posts_page || ( function_exists( 'is_buddypress' ) && is_buddypress() ) || ( class_exists( 'bbPress' ) && is_bbpress() ) ) { $sidebar_position = get_post_meta( $post_id, 'evolve_sidebar_position', true ); if ( $sidebar_position != 'default' && $sidebar_position != '' ) { $get_sidebar = true; } } if ( ( is_front_page() && is_page() ) || is_home() ) { if ( evolve_theme_mod( 'evl_frontpage_layout', '1c' ) == "1c" ) { $get_sidebar = false; } else { $get_sidebar = true; } } return $get_sidebar; } } /* Function To Determine Whether To get_sidebar(2), Depending On Theme Options Layout And Post Meta Layout ======================================= */ if ( ! function_exists( 'evolve_lets_get_sidebar_2' ) ) { function evolve_lets_get_sidebar_2() { global $wp_query, $post; $post_id = ''; if ( $wp_query->is_posts_page ) { $post_id = get_option( 'page_for_posts' ); } elseif ( ( function_exists( 'is_buddypress' ) && is_buddypress() ) ) { $post_id = evolve_bp_get_id(); } else { $post_id = isset( $post->ID ) ? $post->ID : ''; } $get_sidebar = false; if ( evolve_theme_mod( 'evl_layout', '2cl' ) == "3cm" || evolve_theme_mod( 'evl_layout', '2cl' ) == "3cl" || evolve_theme_mod( 'evl_layout', '2cl' ) == "3cr" ) { $get_sidebar = true; } if ( ( is_page() || is_single() || $wp_query->is_posts_page || ( function_exists( 'is_buddypress' ) && is_buddypress() ) || ( class_exists( 'bbPress' ) && is_bbpress() ) ) && get_post_meta( $post_id, 'evolve_full_width', true ) == 'yes' ) { $get_sidebar = false; } if ( is_single() || is_page() || $wp_query->is_posts_page || ( function_exists( 'is_buddypress' ) && is_buddypress() ) || ( class_exists( 'bbPress' ) && is_bbpress() ) ) { $sidebar_position = get_post_meta( $post_id, 'evolve_sidebar_position', true ); if ( $sidebar_position == '2cl' || $sidebar_position == '2cr' ) { $get_sidebar = false; } if ( $sidebar_position == "3cm" || $sidebar_position == "3cl" || $sidebar_position == "3cr" ) { $get_sidebar = true; } } if ( ( is_front_page() && is_page() || is_home() ) ) { if ( evolve_theme_mod( 'evl_frontpage_layout', '1c' ) == "1c" || evolve_theme_mod( 'evl_frontpage_layout', '1c' ) == "2cl" || evolve_theme_mod( 'evl_frontpage_layout', '1c' ) == "2cr" ) { $get_sidebar = false; } else { $get_sidebar = true; } } return $get_sidebar; } } /* Print Typography ======================================= */ if ( ! function_exists( 'evolve_print_fonts' ) ) { function evolve_print_fonts( $name, $css_class, $additional_css = '', $additional_color_css_class = '', $imp = '' ) { global $options; $options[ $name ] = evolve_theme_mod( $name ); $css = "$css_class {"; $font_size = ''; $font_family = ''; $font_style = ''; $font_weight = ''; $font_align = ''; $color = ''; if ( isset( $options[ $name ]['font-size'] ) && $options[ $name ]['font-size'] != '' ) { $font_size = $options[ $name ]['font-size']; $css .= " font-size: " . $font_size . "" . $imp . ";"; } if ( isset( $options[ $name ]['font-family'] ) && $options[ $name ]['font-family'] != '' ) { $font_family = $options[ $name ]['font-family']; $css .= " font-family: " . $font_family . ";"; } if ( isset( $options[ $name ]['font-style'] ) && $options[ $name ]['font-style'] != '' ) { $font_style = $options[ $name ]['font-style']; $css .= " font-style: " . $font_style . ";"; } if ( isset( $options[ $name ]['font-weight'] ) && $options[ $name ]['font-weight'] != '' ) { $font_weight = $options[ $name ]['font-weight']; $css .= " font-weight: " . $font_weight . ";"; } if ( isset( $options[ $name ]['text-align'] ) && $options[ $name ]['text-align'] != '' ) { $font_align = $options[ $name ]['text-align']; $css .= " text-align: " . $font_align . ";"; } if ( isset( $options[ $name ]['color'] ) && $options[ $name ]['color'] != '' ) { $color = $options[ $name ]['color']; $css .= " color: " . $color . ";"; } if ( $additional_css != '' ) { $css .= "" . $additional_css . ";"; } $css .= " }"; if ( isset( $options[ $name ]['color'] ) && $additional_color_css_class != '' ) { $color = $options[ $name ]['color']; $css .= "$additional_color_css_class{ color:" . $color . "; }"; } return $css; } } /* Function To Separate Values ======================================= */ if ( ! function_exists( 'evolve_remove_comma' ) ) { function evolve_remove_comma( $str = '' ) { $str = substr( $str, 1 ); return $str; } } /* Custom Front Page Builder ======================================= */ if ( ! function_exists( 'evolve_front_page_builder' ) ) { function evolve_front_page_builder() { foreach ( evolve_theme_mod( 'evl_front_elements_content_area' ) as $elementkey => $elementval ) { switch ( $elementval ) { case 'content_box': evolve_content_boxes(); break; case 'testimonial': if ( $elementval ) { evolve_testimonials(); } break; case 'blog_post': if ( $elementval ) { if ( evolve_theme_mod( 'evl_front_elements_content_display', 'above' ) == 'above' ) { ?>