can_use_premium_code() ? 'free' : 'premium'; ?>

  • $data) { $slug = self::create_slug($title); echo '
  • '. esc_html($title) .'
  • '; } ?>
$data) : $slug = self::create_slug($title); for ( $i=0; $i < count($data); $i++ ) : $template_slug = $slug .'-'. $data[$i]; $template_class = strpos($template_slug, 'pro') && (!defined('WPR_ADDONS_PRO_VERSION') || !wpr_fs()->can_use_premium_code()) ? ' wpr-tplib-pro-wrap' : ''; $template_class .= strpos($template_slug, 'woo') && !class_exists( 'woocommerce' ) ? ' wpr-tplib-woo-wrap' : ''; if (defined('WPR_ADDONS_PRO_VERSION') && wpr_fs()->can_use_premium_code()) { $template_class .= ' wpr-tplib-pro-active'; } ?>
id) ) { exit; } } public static function create_slug($str, $delimiter = '-'){ // Try to convert the string with iconv $converted_str = iconv('UTF-8', 'ASCII//TRANSLIT', $str); // If iconv fails, fallback to the original string if ($converted_str === false) { $converted_str = $str; // Fallback to the original string } // Continue with the rest of the slug generation $slug = strtolower(trim(preg_replace('/[\s-]+/', $delimiter, preg_replace('/[^A-Za-z0-9-]+/', $delimiter, preg_replace('/[&]/', 'and', preg_replace('/[\']/', '', $converted_str)))), $delimiter)); return $slug; } }