| 1 |
<?php |
| 2 |
|
| 3 |
function opengare_func($atts) { |
| 4 |
|
| 5 |
extract(shortcode_atts(array('tipo' => '1', 'anno' => ''), $atts)); |
| 6 |
// 1 torta di tipo di affidamento |
| 7 |
// 2 grafico agglomerato di inizio gare |
| 8 |
// 3 tempi e costi medi |
| 9 |
// 4 timeline |
| 10 |
|
| 11 |
ob_start(); |
| 12 |
switch($tipo) { |
| 13 |
case 1: |
| 14 |
include(plugin_dir_path(__FILE__) . '1.php'); |
| 15 |
break; |
| 16 |
case 2: |
| 17 |
include(plugin_dir_path(__FILE__) . '2.php'); |
| 18 |
break; |
| 19 |
case 3: |
| 20 |
include(plugin_dir_path(__FILE__) . '3.php'); |
| 21 |
break; |
| 22 |
case 4: |
| 23 |
include(plugin_dir_path(__FILE__) . '4.php'); |
| 24 |
break; |
| 25 |
} |
| 26 |
$shortcode = ob_get_clean(); |
| 27 |
return $shortcode; |
| 28 |
} |
| 29 |
add_shortcode('opengare', 'opengare_func'); |
| 30 |
|
| 31 |
?> |
| 32 |
|