feat: prima versione del plugin, blocco e shortcode con iframe stampato lato server
This commit is contained in:
commit
5c73bbc2b8
20 changed files with 1562 additions and 0 deletions
28
includes/shortcode.php
Normal file
28
includes/shortcode.php
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
/**
|
||||
* The [piazza-in-festa] shortcode.
|
||||
*
|
||||
* Attribute names are Italian because the data is Italian: they match the town
|
||||
* identifiers and the parameters documented on piazzainfesta.it, so what you
|
||||
* read there is what you write here.
|
||||
*
|
||||
* [piazza-in-festa comuni="alba,barolo,la-morra" limite="5"]
|
||||
* [piazza-in-festa regione="Piemonte" categoria="sagra_enogastronomica"]
|
||||
*
|
||||
* @package PiazzaInFesta
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
/**
|
||||
* Renders the shortcode.
|
||||
*
|
||||
* @param array|string $atts Shortcode attributes.
|
||||
* @return string HTML.
|
||||
*/
|
||||
function pinfesta_shortcode( $atts ) {
|
||||
$args = shortcode_atts( pinfesta_defaults(), $atts, 'piazza-in-festa' );
|
||||
|
||||
return pinfesta_render_iframe( $args );
|
||||
}
|
||||
add_shortcode( 'piazza-in-festa', 'pinfesta_shortcode' );
|
||||
Loading…
Add table
Add a link
Reference in a new issue