'; $linkend = ''; endif; $routput = ''; $routput = $linkstart . $contentt . $linkend; if ( $nolnknotxt == '1' && $routput == $contentt ) $routput = ''; return $routput; else: return ''; endif; } // CSS Property Change from Options function associationx_cngstyle($option, $default, $items='', $property='', $unit='', $isimportant='', $extrainside='', $extraoutside='', $countzerovalasfalse='' ) { $result = ''; if ($option && $default): $itemvalue = associationx_get_option($option,$default); if($countzerovalasfalse =='1' || $countzerovalasfalse =='true'): if(empty($itemvalue) || $itemvalue == '0'): $itemvalue ='false'; $unit=''; endif; endif; if ( $isimportant == '1' || $isimportant == 'true'): $isimportant = '!important'; endif; if ($itemvalue != $default): if ( $items && $property ): if ( $property == 'background-image' ): $itemvalue = 'url("'.$itemvalue.'")'; endif; $result= $items.'{'.$property.':'.$itemvalue.''.$unit.''.$isimportant.';'.$extrainside.'}'.$extraoutside.''; else: $result=$extraoutside; endif; endif; endif; return $result; } // Background Change function associationx_backchange($option, $itemforback, $image ='', $color = '', $repeat = 'repeat', $position='top left', $attachment = 'scroll' ){ $optionval = associationx_get_option($option); if ( $optionval && $itemforback ): $nimage = $optionval['image']; $ncolor = $optionval['color']; $nrepeat = $optionval['repeat']; $nposition = $optionval['position']; $nattachment = $optionval['attachment']; if ( $nimage == $image && $ncolor == $color && $nrepeat == $repeat && $nposition == $position && $nattachment == $attachment ) : return ''; else: $nfoutput = ''; if($ncolor && $ncolor != $color) $nfoutput .= 'background-color:'. $ncolor . ';'; if($nimage): if($nimage && $nimage != $image): $nfoutput .= 'background-image: url("'.$nimage.'");'; endif; if($nrepeat && $nrepeat != $repeat ): $nfoutput .= 'background-repeat:'. $nrepeat . ';'; endif; if($nposition && $nposition != $position): $nfoutput .= 'background-position:'. $nposition . ';'; endif; if($nattachment && $nattachment != $attachment): $nfoutput .= 'background-attachment:'. $nattachment . ';'; endif; else: $nfoutput .= 'background-image:none;'; endif; if($nfoutput): return $itemforback .'{'.$nfoutput.'}'; else: return ''; endif; endif; else: return ''; endif; } // WooCommerce Check function associationx_woo_check() { if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) )): return true; else: return false; endif; } // WooCommerce Cart Icon Add if ( associationx_get_option('woo-cart-icon', '1') && associationx_woo_check() ) { function associationx_wc_cart_count($d5wmenu, $wargs) { if( $wargs->theme_location == 'main-menu'): $wcsccount = WC()->cart->get_cart_contents_count(); $wclink = function_exists( 'wc_get_cart_url' ) ? wc_get_cart_url() : WC()->cart->get_cart_url(); $newmenup = '