private static function get_trending_terms(string $lang): array {
global $wpdb;
$out = [];
$stats = $wpdb->prefix . 'dgwt_wcas_stats';
// Esiste la tabella?
$exists = $wpdb->get_var( $wpdb->prepare("SHOW TABLES LIKE %s", $stats) );
if ( $exists !== $stats ) return $out;
// Colonne opzionali
$cols = $wpdb->get_col("SHOW COLUMNS FROM {$stats}", 0);
$has_autocomplete = in_array('autocomplete', $cols, true);
$has_lang = in_array('lang', $cols, true);
// Helper che esegue una query costruita dinamicamente
$run = function(array $opts) use ($wpdb, $stats) {
$where = [];
$params = [];
$where[] = "created_at >= (NOW() - INTERVAL %d DAY)";
$params[] = FG_FiboSearch_Smart_Suggest_Single::DAYS_WINDOW;
$where[] = "CHAR_LENGTH(phrase) BETWEEN 3 AND 50";
if (!empty($opts['regex_clean'])) {
$where[] = "(" .
"phrase REGEXP '^[0-9]{6,9}$' OR " . // SKU 6–9 cifre
"phrase REGEXP '^[A-Za-z0-9À-ÖØ-öø-ÿ .,''’-]+$'" .
")";
$where[] = "phrase NOT REGEXP '\\\\.[a-z]{2,5}($|\\\\s)'"; // niente domini
}
if (!empty($opts['only_autocomplete']) && $opts['has_autocomplete']) {
$where[] = "COALESCE(autocomplete,0) = 1";
}
if (!empty($opts['lang_it']) && $opts['has_lang']) {
$where[] = "(COALESCE(lang,'') IN ('it','it_IT',''))";
}
$sql = "
SELECT phrase, COUNT(*) AS cnt
FROM {$stats}
WHERE " . implode(' AND ', $where) . "
GROUP BY phrase
HAVING cnt >= %d
ORDER BY cnt DESC
LIMIT %d
";
$params[] = 3; // frequenza minima
$params[] = FG_FiboSearch_Smart_Suggest_Single::LIMIT_TERMS;
$prepared = $wpdb->prepare($sql, $params);
return $wpdb->get_results($prepared);
};
// 1) Pulita ma prudente
$rows = $run([
'regex_clean' => true,
'only_autocomplete'=> false, // prima prova senza restringere troppo
'has_autocomplete' => $has_autocomplete,
'lang_it' => true,
'has_lang' => $has_lang,
]);
// 2) Se pochi risultati, togli filtro lingua
if (count($rows) < 5) {
$rows = $run([
'regex_clean' => true,
'only_autocomplete'=> false,
'has_autocomplete' => $has_autocomplete,
'lang_it' => false,
'has_lang' => $has_lang,
]);
}
// 3) Se ancora pochi, togli pulizia regex (accettiamo un po' di rumore)
if (count($rows) < 5) {
$rows = $run([
'regex_clean' => false,
'only_autocomplete'=> false,
'has_autocomplete' => $has_autocomplete,
'lang_it' => false,
'has_lang' => $has_lang,
]);
}
// 4) Ultimo step (opzionale): limita ad autocomplete se la colonna esiste e c'è volume
if (count($rows) < 5 && $has_autocomplete) {
$rows = $run([
'regex_clean' => false,
'only_autocomplete'=> true,
'has_autocomplete' => $has_autocomplete,
'lang_it' => false,
'has_lang' => $has_lang,
]);
}
foreach ($rows as $r) {
$out[] = ['phrase' => $r->phrase, 'count' => (int)$r->cnt];
}
return $out;
}
private static function get_trending_terms(string $lang): array {
global $wpdb;
$out = [];
$stats = $wpdb->prefix . 'dgwt_wcas_stats';
// Esiste la tabella?
$exists = $wpdb->get_var( $wpdb->prepare("SHOW TABLES LIKE %s", $stats) );
if ( $exists !== $stats ) return $out;
// Colonne opzionali
$cols = $wpdb->get_col("SHOW COLUMNS FROM {$stats}", 0);
$has_autocomplete = in_array('autocomplete', $cols, true);
$has_lang = in_array('lang', $cols, true);
// Helper che esegue una query costruita dinamicamente
$run = function(array $opts) use ($wpdb, $stats) {
$where = [];
$params = [];
$where[] = "created_at >= (NOW() - INTERVAL %d DAY)";
$params[] = FG_FiboSearch_Smart_Suggest_Single::DAYS_WINDOW;
$where[] = "CHAR_LENGTH(phrase) BETWEEN 3 AND 50";
if (!empty($opts['regex_clean'])) {
$where[] = "(" .
"phrase REGEXP '^[0-9]{6,9}$' OR " . // SKU 6–9 cifre
"phrase REGEXP '^[A-Za-z0-9À-ÖØ-öø-ÿ .,''’-]+$'" .
")";
$where[] = "phrase NOT REGEXP '\\\\.[a-z]{2,5}($|\\\\s)'"; // niente domini
}
if (!empty($opts['only_autocomplete']) && $opts['has_autocomplete']) {
$where[] = "COALESCE(autocomplete,0) = 1";
}
if (!empty($opts['lang_it']) && $opts['has_lang']) {
$where[] = "(COALESCE(lang,'') IN ('it','it_IT',''))";
}
$sql = "
SELECT phrase, COUNT(*) AS cnt
FROM {$stats}
WHERE " . implode(' AND ', $where) . "
GROUP BY phrase
HAVING cnt >= %d
ORDER BY cnt DESC
LIMIT %d
";
$params[] = 3; // frequenza minima
$params[] = FG_FiboSearch_Smart_Suggest_Single::LIMIT_TERMS;
$prepared = $wpdb->prepare($sql, $params);
return $wpdb->get_results($prepared);
};
// 1) Pulita ma prudente
$rows = $run([
'regex_clean' => true,
'only_autocomplete'=> false, // prima prova senza restringere troppo
'has_autocomplete' => $has_autocomplete,
'lang_it' => true,
'has_lang' => $has_lang,
]);
// 2) Se pochi risultati, togli filtro lingua
if (count($rows) < 5) {
$rows = $run([
'regex_clean' => true,
'only_autocomplete'=> false,
'has_autocomplete' => $has_autocomplete,
'lang_it' => false,
'has_lang' => $has_lang,
]);
}
// 3) Se ancora pochi, togli pulizia regex (accettiamo un po' di rumore)
if (count($rows) < 5) {
$rows = $run([
'regex_clean' => false,
'only_autocomplete'=> false,
'has_autocomplete' => $has_autocomplete,
'lang_it' => false,
'has_lang' => $has_lang,
]);
}
// 4) Ultimo step (opzionale): limita ad autocomplete se la colonna esiste e c'è volume
if (count($rows) < 5 && $has_autocomplete) {
$rows = $run([
'regex_clean' => false,
'only_autocomplete'=> true,
'has_autocomplete' => $has_autocomplete,
'lang_it' => false,
'has_lang' => $has_lang,
]);
}
foreach ($rows as $r) {
$out[] = ['phrase' => $r->phrase, 'count' => (int)$r->cnt];
}
return $out;
}
private static function get_trending_terms(string $lang): array {
global $wpdb;
$out = [];
$stats = $wpdb->prefix . 'dgwt_wcas_stats';
// Esiste la tabella?
$exists = $wpdb->get_var( $wpdb->prepare("SHOW TABLES LIKE %s", $stats) );
if ( $exists !== $stats ) return $out;
// Colonne opzionali
$cols = $wpdb->get_col("SHOW COLUMNS FROM {$stats}", 0);
$has_autocomplete = in_array('autocomplete', $cols, true);
$has_lang = in_array('lang', $cols, true);
// Helper che esegue una query costruita dinamicamente
$run = function(array $opts) use ($wpdb, $stats) {
$where = [];
$params = [];
$where[] = "created_at >= (NOW() - INTERVAL %d DAY)";
$params[] = FG_FiboSearch_Smart_Suggest_Single::DAYS_WINDOW;
$where[] = "CHAR_LENGTH(phrase) BETWEEN 3 AND 50";
if (!empty($opts['regex_clean'])) {
$where[] = "(" .
"phrase REGEXP '^[0-9]{6,9}$' OR " . // SKU 6–9 cifre
"phrase REGEXP '^[A-Za-z0-9À-ÖØ-öø-ÿ .,''’-]+$'" .
")";
$where[] = "phrase NOT REGEXP '\\\\.[a-z]{2,5}($|\\\\s)'"; // niente domini
}
if (!empty($opts['only_autocomplete']) && $opts['has_autocomplete']) {
$where[] = "COALESCE(autocomplete,0) = 1";
}
if (!empty($opts['lang_it']) && $opts['has_lang']) {
$where[] = "(COALESCE(lang,'') IN ('it','it_IT',''))";
}
$sql = "
SELECT phrase, COUNT(*) AS cnt
FROM {$stats}
WHERE " . implode(' AND ', $where) . "
GROUP BY phrase
HAVING cnt >= %d
ORDER BY cnt DESC
LIMIT %d
";
$params[] = 3; // frequenza minima
$params[] = FG_FiboSearch_Smart_Suggest_Single::LIMIT_TERMS;
$prepared = $wpdb->prepare($sql, $params);
return $wpdb->get_results($prepared);
};
// 1) Pulita ma prudente
$rows = $run([
'regex_clean' => true,
'only_autocomplete'=> false, // prima prova senza restringere troppo
'has_autocomplete' => $has_autocomplete,
'lang_it' => true,
'has_lang' => $has_lang,
]);
// 2) Se pochi risultati, togli filtro lingua
if (count($rows) < 5) {
$rows = $run([
'regex_clean' => true,
'only_autocomplete'=> false,
'has_autocomplete' => $has_autocomplete,
'lang_it' => false,
'has_lang' => $has_lang,
]);
}
// 3) Se ancora pochi, togli pulizia regex (accettiamo un po' di rumore)
if (count($rows) < 5) {
$rows = $run([
'regex_clean' => false,
'only_autocomplete'=> false,
'has_autocomplete' => $has_autocomplete,
'lang_it' => false,
'has_lang' => $has_lang,
]);
}
// 4) Ultimo step (opzionale): limita ad autocomplete se la colonna esiste e c'è volume
if (count($rows) < 5 && $has_autocomplete) {
$rows = $run([
'regex_clean' => false,
'only_autocomplete'=> true,
'has_autocomplete' => $has_autocomplete,
'lang_it' => false,
'has_lang' => $has_lang,
]);
}
foreach ($rows as $r) {
$out[] = ['phrase' => $r->phrase, 'count' => (int)$r->cnt];
}
return $out;
}
private static function get_trending_terms(string $lang): array {
global $wpdb;
$out = [];
$stats = $wpdb->prefix . 'dgwt_wcas_stats';
// Esiste la tabella?
$exists = $wpdb->get_var( $wpdb->prepare("SHOW TABLES LIKE %s", $stats) );
if ( $exists !== $stats ) return $out;
// Colonne opzionali
$cols = $wpdb->get_col("SHOW COLUMNS FROM {$stats}", 0);
$has_autocomplete = in_array('autocomplete', $cols, true);
$has_lang = in_array('lang', $cols, true);
// Helper che esegue una query costruita dinamicamente
$run = function(array $opts) use ($wpdb, $stats) {
$where = [];
$params = [];
$where[] = "created_at >= (NOW() - INTERVAL %d DAY)";
$params[] = FG_FiboSearch_Smart_Suggest_Single::DAYS_WINDOW;
$where[] = "CHAR_LENGTH(phrase) BETWEEN 3 AND 50";
if (!empty($opts['regex_clean'])) {
$where[] = "(" .
"phrase REGEXP '^[0-9]{6,9}$' OR " . // SKU 6–9 cifre
"phrase REGEXP '^[A-Za-z0-9À-ÖØ-öø-ÿ .,''’-]+$'" .
")";
$where[] = "phrase NOT REGEXP '\\\\.[a-z]{2,5}($|\\\\s)'"; // niente domini
}
if (!empty($opts['only_autocomplete']) && $opts['has_autocomplete']) {
$where[] = "COALESCE(autocomplete,0) = 1";
}
if (!empty($opts['lang_it']) && $opts['has_lang']) {
$where[] = "(COALESCE(lang,'') IN ('it','it_IT',''))";
}
$sql = "
SELECT phrase, COUNT(*) AS cnt
FROM {$stats}
WHERE " . implode(' AND ', $where) . "
GROUP BY phrase
HAVING cnt >= %d
ORDER BY cnt DESC
LIMIT %d
";
$params[] = 3; // frequenza minima
$params[] = FG_FiboSearch_Smart_Suggest_Single::LIMIT_TERMS;
$prepared = $wpdb->prepare($sql, $params);
return $wpdb->get_results($prepared);
};
// 1) Pulita ma prudente
$rows = $run([
'regex_clean' => true,
'only_autocomplete'=> false, // prima prova senza restringere troppo
'has_autocomplete' => $has_autocomplete,
'lang_it' => true,
'has_lang' => $has_lang,
]);
// 2) Se pochi risultati, togli filtro lingua
if (count($rows) < 5) {
$rows = $run([
'regex_clean' => true,
'only_autocomplete'=> false,
'has_autocomplete' => $has_autocomplete,
'lang_it' => false,
'has_lang' => $has_lang,
]);
}
// 3) Se ancora pochi, togli pulizia regex (accettiamo un po' di rumore)
if (count($rows) < 5) {
$rows = $run([
'regex_clean' => false,
'only_autocomplete'=> false,
'has_autocomplete' => $has_autocomplete,
'lang_it' => false,
'has_lang' => $has_lang,
]);
}
// 4) Ultimo step (opzionale): limita ad autocomplete se la colonna esiste e c'è volume
if (count($rows) < 5 && $has_autocomplete) {
$rows = $run([
'regex_clean' => false,
'only_autocomplete'=> true,
'has_autocomplete' => $has_autocomplete,
'lang_it' => false,
'has_lang' => $has_lang,
]);
}
foreach ($rows as $r) {
$out[] = ['phrase' => $r->phrase, 'count' => (int)$r->cnt];
}
return $out;
}
private static function get_trending_terms(string $lang): array {
global $wpdb;
$out = [];
$stats = $wpdb->prefix . 'dgwt_wcas_stats';
// Esiste la tabella?
$exists = $wpdb->get_var( $wpdb->prepare("SHOW TABLES LIKE %s", $stats) );
if ( $exists !== $stats ) return $out;
// Colonne opzionali
$cols = $wpdb->get_col("SHOW COLUMNS FROM {$stats}", 0);
$has_autocomplete = in_array('autocomplete', $cols, true);
$has_lang = in_array('lang', $cols, true);
// Helper che esegue una query costruita dinamicamente
$run = function(array $opts) use ($wpdb, $stats) {
$where = [];
$params = [];
$where[] = "created_at >= (NOW() - INTERVAL %d DAY)";
$params[] = FG_FiboSearch_Smart_Suggest_Single::DAYS_WINDOW;
$where[] = "CHAR_LENGTH(phrase) BETWEEN 3 AND 50";
if (!empty($opts['regex_clean'])) {
$where[] = "(" .
"phrase REGEXP '^[0-9]{6,9}$' OR " . // SKU 6–9 cifre
"phrase REGEXP '^[A-Za-z0-9À-ÖØ-öø-ÿ .,''’-]+$'" .
")";
$where[] = "phrase NOT REGEXP '[.][a-z]{2,5}($|[[:space:]])'";
}
if (!empty($opts['only_autocomplete']) && $opts['has_autocomplete']) {
$where[] = "COALESCE(autocomplete,0) = 1";
}
if (!empty($opts['lang_it']) && $opts['has_lang']) {
$where[] = "(COALESCE(lang,'') IN ('it','it_IT',''))";
}
$sql = "
SELECT phrase, COUNT(*) AS cnt
FROM {$stats}
WHERE " . implode(' AND ', $where) . "
GROUP BY phrase
HAVING cnt >= %d
ORDER BY cnt DESC
LIMIT %d
";
$params[] = 3; // frequenza minima
$params[] = FG_FiboSearch_Smart_Suggest_Single::LIMIT_TERMS;
$prepared = $wpdb->prepare($sql, $params);
return $wpdb->get_results($prepared);
};
// 1) Pulita ma prudente
$rows = $run([
'regex_clean' => true,
'only_autocomplete'=> false, // prima prova senza restringere troppo
'has_autocomplete' => $has_autocomplete,
'lang_it' => true,
'has_lang' => $has_lang,
]);
// 2) Se pochi risultati, togli filtro lingua
if (count($rows) < 5) {
$rows = $run([
'regex_clean' => true,
'only_autocomplete'=> false,
'has_autocomplete' => $has_autocomplete,
'lang_it' => false,
'has_lang' => $has_lang,
]);
}
// 3) Se ancora pochi, togli pulizia regex (accettiamo un po' di rumore)
if (count($rows) < 5) {
$rows = $run([
'regex_clean' => false,
'only_autocomplete'=> false,
'has_autocomplete' => $has_autocomplete,
'lang_it' => false,
'has_lang' => $has_lang,
]);
}
// 4) Ultimo step (opzionale): limita ad autocomplete se la colonna esiste e c'è volume
if (count($rows) < 5 && $has_autocomplete) {
$rows = $run([
'regex_clean' => false,
'only_autocomplete'=> true,
'has_autocomplete' => $has_autocomplete,
'lang_it' => false,
'has_lang' => $has_lang,
]);
}
foreach ($rows as $r) {
$out[] = ['phrase' => $r->phrase, 'count' => (int)$r->cnt];
}
return $out;
}
Notice: wp_woocommerce_session_a59ea2e80aa4813e0db8c1fcd52b8cc9 cookie cannot be set - headers already sent by /home/floralgarden/public_html/wp-content/mu-plugins/fg-fibosearch-smart-suggest.php on line 1 in /home/floralgarden/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php on line 1121
Notice: wordpress_sp_pswp_recent_view cookie cannot be set - headers already sent by /home/floralgarden/public_html/wp-content/mu-plugins/fg-fibosearch-smart-suggest.php on line 1 in /home/floralgarden/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php on line 1121
L’Eugenia Myrtifolia diventa un arbusto sempreverde, con una bellissima fioritura primaverile, seguita da bacche rosse, commestibili, con cui in altre parti del mondo si preparano salse e marmellate. In tarda primavera e in estate, produce dei fiori riuniti in pannocchie all’apice dei rami, piccoli ma davvero graziosi, con boccioli di un colore viola intenso e con numerosi stami bianchi.
Le foglie ovali e coriacee sono simili a quelle del mediterraneo mirto, verde intenso che virano al rosso biancastro in autunno e i piccoli frutti violacei, di circa 2 centimetri, hanno una polpa acidula con retrogusto di chiodo di garofano ed un solo seme al centro.
Prendersene cura:
L’Eugenia Myrtifolia è abbastanza rustica e sopporta il freddo senza problemi; nei periodo più gelidi dell’anno, infatti, non dobbiamo preoccuparci per le temperature minime; può sopportare una temperatura di alcuni gradi inferiore allo zero: resiste fino a –5 °C, purché in posizione soleggiata e protetta dai venti freddi. In alternativa si può coltivare in vaso grande per essere poi trasportata.
Ama le posizioni luminose, ma non un eccesso di raggi diretti: necessita solo di alcune ore al giorno di sole.
Preferisce un substrato fertile, leggero, ben drenato. Si concima in autunno e primavera con un prodotto organico o a lenta cessione e in estate può abbisognare di irrigazioni di soccorso, su terra ben asciutta.
Questa pianta non ama l’umidità eccessiva, quindi se il terreno rimane a lungo umido possiamo diradare ulteriormente le annaffiature, soprattutto nei mesi autunnali.
È molto importante evitare di annaffiare l’ Eugenia Myrtifolia eccessivamente, lasciando sempre che tra un’annaffiatura e l’altra il terreno rimanga asciutto per almeno un paio di giorni, quindi interveniamo bagnando il substrato in profondità ogni 2-3 settimane , con 1-2 secchi d’acqua.
Per fornire le migliori esperienze, utilizziamo tecnologie come i cookie per memorizzare e/o accedere alle informazioni del dispositivo. Il consenso a queste tecnologie ci permetterà di elaborare dati come il comportamento di navigazione o ID unici su questo sito. Non acconsentire o ritirare il consenso può influire negativamente su alcune caratteristiche e funzioni.
Funzionale
Sempre attivo
L'archiviazione tecnica o l'accesso sono strettamente necessari al fine legittimo di consentire l'uso di un servizio specifico esplicitamente richiesto dall'abbonato o dall'utente, o al solo scopo di effettuare la trasmissione di una comunicazione su una rete di comunicazione elettronica.
Preferenze
L'archiviazione tecnica o l'accesso sono necessari per lo scopo legittimo di memorizzare le preferenze che non sono richieste dall'abbonato o dall'utente.
Statistiche
L'archiviazione tecnica o l'accesso che viene utilizzato esclusivamente per scopi statistici.L'archiviazione tecnica o l'accesso che viene utilizzato esclusivamente per scopi statistici anonimi. Senza un mandato di comparizione, una conformità volontaria da parte del vostro Fornitore di Servizi Internet, o ulteriori registrazioni da parte di terzi, le informazioni memorizzate o recuperate per questo scopo da sole non possono di solito essere utilizzate per l'identificazione.
Marketing
L'archiviazione tecnica o l'accesso sono necessari per creare profili di utenti per inviare pubblicità, o per tracciare l'utente su un sito web o su diversi siti web per scopi di marketing simili.
Recensioni
Ancora non ci sono recensioni.