mirror of
https://github.com/ulaulaman/eduinaf.git
synced 2025-01-08 19:41:32 +01:00
43 lines
765 B
PHP
43 lines
765 B
PHP
|
<?php
|
||
|
|
||
|
# creazione link esterni con shortcode
|
||
|
# astroedu
|
||
|
add_shortcode('astroedu', 'astroedu');
|
||
|
|
||
|
function astroedu ($atts, $content = null) {
|
||
|
|
||
|
extract(
|
||
|
shortcode_atts(
|
||
|
array(
|
||
|
'lang' => null,
|
||
|
'code' => null,
|
||
|
),
|
||
|
$atts
|
||
|
)
|
||
|
);
|
||
|
|
||
|
$link = '<a href="http://astroedu.iau.org/'.$lang.'/activities/'.$code.'/" target="astroedu">'.$content.'</a>';
|
||
|
|
||
|
return $link;
|
||
|
}
|
||
|
|
||
|
# spacescoop
|
||
|
add_shortcode('spacescoop', 'spacescoop');
|
||
|
|
||
|
function spacescoop ($atts, $content = null) {
|
||
|
|
||
|
extract(
|
||
|
shortcode_atts(
|
||
|
array(
|
||
|
'lang' => null,
|
||
|
'code' => null,
|
||
|
),
|
||
|
$atts
|
||
|
)
|
||
|
);
|
||
|
|
||
|
$link = '<a href="http://www.spacescoop.org/'.$lang.'/scoops/'.$code.'/" target="spacescoop">'.$content.'</a>';
|
||
|
|
||
|
return $link;
|
||
|
}
|