feat: rilascio 1.2.0, il widget parla italiano, inglese, tedesco e francese e di default segue la lingua del sito, anche con WPML o Polylang
All checks were successful
Release su wordpress.org / rilascio (push) Successful in 45s
All checks were successful
Release su wordpress.org / rilascio (push) Successful in 45s
This commit is contained in:
parent
368682bd07
commit
e9c483f885
8 changed files with 59 additions and 8 deletions
|
|
@ -2,7 +2,7 @@
|
||||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||||
"apiVersion": 3,
|
"apiVersion": 3,
|
||||||
"name": "piazza-in-festa/eventi",
|
"name": "piazza-in-festa/eventi",
|
||||||
"version": "1.1.0",
|
"version": "1.2.0",
|
||||||
"title": "Piazza in Festa",
|
"title": "Piazza in Festa",
|
||||||
"category": "widgets",
|
"category": "widgets",
|
||||||
"icon": "calendar-alt",
|
"icon": "calendar-alt",
|
||||||
|
|
@ -26,7 +26,8 @@
|
||||||
"dal": { "type": "string", "default": "" },
|
"dal": { "type": "string", "default": "" },
|
||||||
"al": { "type": "string", "default": "" },
|
"al": { "type": "string", "default": "" },
|
||||||
"cerca": { "type": "string", "default": "" },
|
"cerca": { "type": "string", "default": "" },
|
||||||
"font": { "type": "string", "default": "" }
|
"font": { "type": "string", "default": "" },
|
||||||
|
"lingua": { "type": "string", "default": "" }
|
||||||
},
|
},
|
||||||
"editorScript": "file:./index.js"
|
"editorScript": "file:./index.js"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -143,6 +143,23 @@
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
campo('colore', __('Accent colour', 'piazza-in-festa'), __('Hex code, for instance #b4315a.', 'piazza-in-festa')),
|
campo('colore', __('Accent colour', 'piazza-in-festa'), __('Hex code, for instance #b4315a.', 'piazza-in-festa')),
|
||||||
|
el(SelectControl, {
|
||||||
|
label: __('Language', 'piazza-in-festa'),
|
||||||
|
help: __('Event texts are shown translated when a translation is available.', 'piazza-in-festa'),
|
||||||
|
value: a.lingua,
|
||||||
|
options: [
|
||||||
|
{ label: __('Same as the site', 'piazza-in-festa'), value: '' },
|
||||||
|
{ label: 'Italiano', value: 'it' },
|
||||||
|
{ label: 'English', value: 'en' },
|
||||||
|
{ label: 'Deutsch', value: 'de' },
|
||||||
|
{ label: 'Français', value: 'fr' }
|
||||||
|
],
|
||||||
|
__next40pxDefaultSize: true,
|
||||||
|
__nextHasNoMarginBottom: true,
|
||||||
|
onChange: function (v) {
|
||||||
|
set({ lingua: v });
|
||||||
|
}
|
||||||
|
}),
|
||||||
el(SelectControl, {
|
el(SelectControl, {
|
||||||
label: __('Font', 'piazza-in-festa'),
|
label: __('Font', 'piazza-in-festa'),
|
||||||
value: a.font,
|
value: a.font,
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ function pinfesta_defaults() {
|
||||||
'al' => '',
|
'al' => '',
|
||||||
'cerca' => '',
|
'cerca' => '',
|
||||||
'font' => '',
|
'font' => '',
|
||||||
|
'lingua' => '',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -135,6 +136,25 @@ function pinfesta_build_url( $args ) {
|
||||||
$query['cerca'] = mb_substr( $cerca, 0, 40 );
|
$query['cerca'] = mb_substr( $cerca, 0, 40 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Language of the widget: event texts (when translated), labels and links.
|
||||||
|
// Empty means "follow the site": the current locale, which multilingual
|
||||||
|
// plugins such as WPML or Polylang switch page by page. The service speaks
|
||||||
|
// Italian, English, German and French; any other language gets English,
|
||||||
|
// which a foreign visitor reads better than Italian.
|
||||||
|
$lingua = sanitize_key( (string) $args['lingua'] );
|
||||||
|
|
||||||
|
if ( '' === $lingua ) {
|
||||||
|
$lingua = substr( function_exists( 'determine_locale' ) ? determine_locale() : get_locale(), 0, 2 );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ! in_array( $lingua, array( 'it', 'en', 'de', 'fr' ), true ) ) {
|
||||||
|
$lingua = 'en';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( 'it' !== $lingua ) {
|
||||||
|
$query['lingua'] = $lingua;
|
||||||
|
}
|
||||||
|
|
||||||
// The widget lives in an iframe and cannot inherit the site's font: the
|
// The widget lives in an iframe and cannot inherit the site's font: the
|
||||||
// service offers a few safe stacks to pick from.
|
// service offers a few safe stacks to pick from.
|
||||||
if ( in_array( $args['font'], array( 'helvetica', 'serif' ), true ) ) {
|
if ( in_array( $args['font'], array( 'helvetica', 'serif' ), true ) ) {
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@
|
||||||
* [piazza-in-festa comuni="alba,barolo,la-morra" limite="5"]
|
* [piazza-in-festa comuni="alba,barolo,la-morra" limite="5"]
|
||||||
* [piazza-in-festa regione="Piemonte" categoria="sagra_enogastronomica,mercatini"]
|
* [piazza-in-festa regione="Piemonte" categoria="sagra_enogastronomica,mercatini"]
|
||||||
* [piazza-in-festa regione="Veneto" categoria="mercatini" cerca="natale" dal="2026-11-01" al="2027-01-06"]
|
* [piazza-in-festa regione="Veneto" categoria="mercatini" cerca="natale" dal="2026-11-01" al="2027-01-06"]
|
||||||
|
* [piazza-in-festa comuni="alba" lingua="en"] (default: the language of the site)
|
||||||
*
|
*
|
||||||
* @package PiazzaInFesta
|
* @package PiazzaInFesta
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -174,3 +174,12 @@ msgstr "Carattere"
|
||||||
|
|
||||||
msgid "Visitor device font"
|
msgid "Visitor device font"
|
||||||
msgstr "Carattere del dispositivo del visitatore"
|
msgstr "Carattere del dispositivo del visitatore"
|
||||||
|
|
||||||
|
msgid "Language"
|
||||||
|
msgstr "Lingua"
|
||||||
|
|
||||||
|
msgid "Event texts are shown translated when a translation is available."
|
||||||
|
msgstr "I testi degli eventi compaiono tradotti quando c'è una traduzione."
|
||||||
|
|
||||||
|
msgid "Same as the site"
|
||||||
|
msgstr "Quella del sito"
|
||||||
|
|
|
||||||
|
|
@ -95,8 +95,8 @@ msgid "As with any embedded content, that request reaches the service with the v
|
||||||
msgstr "Come per qualsiasi contenuto incorporato, quella richiesta arriva al servizio con l'indirizzo IP del visitatore e lo user agent del browser. Il plugin non manda niente dal tuo server, non conserva niente sui tuoi visitatori e non usa cookie propri."
|
msgstr "Come per qualsiasi contenuto incorporato, quella richiesta arriva al servizio con l'indirizzo IP del visitatore e lo user agent del browser. Il plugin non manda niente dal tuo server, non conserva niente sui tuoi visitatori e non usa cookie propri."
|
||||||
|
|
||||||
#. Found in description paragraph.
|
#. Found in description paragraph.
|
||||||
msgid "When a visitor opens a page that contains the block or the shortcode, their browser loads a page from <code>https://piazzainfesta.it/embed</code> with the parameters you configured: the towns or the region, the categories, the optional period and word in the title, how many events to show, and the appearance options (theme, colour, font, heading). If you saved a service key in the settings, the key is part of that address as well."
|
msgid "When a visitor opens a page that contains the block or the shortcode, their browser loads a page from <code>https://piazzainfesta.it/embed</code> with the parameters you configured: the towns or the region, the categories, the optional period and word in the title, how many events to show, the language, and the appearance options (theme, colour, font, heading). If you saved a service key in the settings, the key is part of that address as well."
|
||||||
msgstr "Quando un visitatore apre una pagina che contiene il blocco o lo shortcode, il suo browser carica una pagina da <code>https://piazzainfesta.it/embed</code> con i parametri che hai configurato: i comuni o la regione, le categorie, l'eventuale periodo e la parola nel titolo, quanti eventi mostrare e le opzioni di aspetto (tema, colore, carattere, titolo). Se hai salvato una chiave del servizio nelle impostazioni, anche la chiave fa parte di quell'indirizzo."
|
msgstr "Quando un visitatore apre una pagina che contiene il blocco o lo shortcode, il suo browser carica una pagina da <code>https://piazzainfesta.it/embed</code> con i parametri che hai configurato: i comuni o la regione, le categorie, l'eventuale periodo e la parola nel titolo, quanti eventi mostrare, la lingua e le opzioni di aspetto (tema, colore, carattere, titolo). Se hai salvato una chiave del servizio nelle impostazioni, anche la chiave fa parte di quell'indirizzo."
|
||||||
|
|
||||||
#. Found in description paragraph.
|
#. Found in description paragraph.
|
||||||
msgid "This plugin displays events served by <strong>Piazza in Festa</strong>, an external service run by the plugin author."
|
msgid "This plugin displays events served by <strong>Piazza in Festa</strong>, an external service run by the plugin author."
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
* Plugin Name: Piazza in Festa
|
* Plugin Name: Piazza in Festa
|
||||||
* Plugin URI: https://piazzainfesta.it/widget
|
* Plugin URI: https://piazzainfesta.it/widget
|
||||||
* Description: Show the upcoming local events of the Italian towns you follow: village feasts, concerts, fairs, exhibitions. Shortcode and block, updated daily.
|
* Description: Show the upcoming local events of the Italian towns you follow: village feasts, concerts, fairs, exhibitions. Shortcode and block, updated daily.
|
||||||
* Version: 1.1.0
|
* Version: 1.2.0
|
||||||
* Requires at least: 6.5
|
* Requires at least: 6.5
|
||||||
* Requires PHP: 7.4
|
* Requires PHP: 7.4
|
||||||
* Author: Piazza in Festa
|
* Author: Piazza in Festa
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
defined( 'ABSPATH' ) || exit;
|
defined( 'ABSPATH' ) || exit;
|
||||||
|
|
||||||
define( 'PINFESTA_VERSION', '1.1.0' );
|
define( 'PINFESTA_VERSION', '1.2.0' );
|
||||||
define( 'PINFESTA_FILE', __FILE__ );
|
define( 'PINFESTA_FILE', __FILE__ );
|
||||||
define( 'PINFESTA_DIR', plugin_dir_path( __FILE__ ) );
|
define( 'PINFESTA_DIR', plugin_dir_path( __FILE__ ) );
|
||||||
define( 'PINFESTA_URL', plugin_dir_url( __FILE__ ) );
|
define( 'PINFESTA_URL', plugin_dir_url( __FILE__ ) );
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Tags: eventi, sagre, comuni, pro loco, turismo
|
||||||
Requires at least: 6.5
|
Requires at least: 6.5
|
||||||
Tested up to: 7.1
|
Tested up to: 7.1
|
||||||
Requires PHP: 7.4
|
Requires PHP: 7.4
|
||||||
Stable tag: 1.1.0
|
Stable tag: 1.2.0
|
||||||
License: GPLv2 or later
|
License: GPLv2 or later
|
||||||
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
|
||||||
|
|
@ -36,7 +36,7 @@ The plugin is free and complete: every option described here works, with or with
|
||||||
|
|
||||||
This plugin displays events served by **Piazza in Festa**, an external service run by the plugin author.
|
This plugin displays events served by **Piazza in Festa**, an external service run by the plugin author.
|
||||||
|
|
||||||
When a visitor opens a page that contains the block or the shortcode, their browser loads a page from `https://piazzainfesta.it/embed` with the parameters you configured: the towns or the region, the categories, the optional period and word in the title, how many events to show, and the appearance options (theme, colour, font, heading). If you saved a service key in the settings, the key is part of that address as well.
|
When a visitor opens a page that contains the block or the shortcode, their browser loads a page from `https://piazzainfesta.it/embed` with the parameters you configured: the towns or the region, the categories, the optional period and word in the title, how many events to show, the language, and the appearance options (theme, colour, font, heading). If you saved a service key in the settings, the key is part of that address as well.
|
||||||
|
|
||||||
As with any embedded content, that request reaches the service with the visitor's IP address and browser user agent. The plugin sends nothing from your server, stores nothing about your visitors, and sets no cookies of its own.
|
As with any embedded content, that request reaches the service with the visitor's IP address and browser user agent. The plugin sends nothing from your server, stores nothing about your visitors, and sets no cookies of its own.
|
||||||
|
|
||||||
|
|
@ -90,6 +90,9 @@ You can set the theme (light or dark), the accent colour and the heading. The re
|
||||||
|
|
||||||
== Changelog ==
|
== Changelog ==
|
||||||
|
|
||||||
|
= 1.2.0 =
|
||||||
|
* The widget speaks Italian, English, German and French: event texts are translated when a translation is available, and labels and links follow. By default it follows the language of the site, including multilingual sites with WPML or Polylang.
|
||||||
|
|
||||||
= 1.1.0 =
|
= 1.1.0 =
|
||||||
* Several categories at once, comma separated in the shortcode.
|
* Several categories at once, comma separated in the shortcode.
|
||||||
* Period filter (`dal`, `al`): only events that start between two dates, for a page about Christmas or the summer.
|
* Period filter (`dal`, `al`): only events that start between two dates, for a page about Christmas or the summer.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue