diff --git a/incl/feed.php b/incl/feed.php index 284c5d7..df4d38d 100644 --- a/incl/feed.php +++ b/incl/feed.php @@ -39,3 +39,79 @@ function eduinaf_postrss($content) { add_filter('the_excerpt_rss', 'eduinaf_postrss'); add_filter('the_content', 'eduinaf_postrss'); + +# creazione link esterni con shortcode +# astroEdu +add_shortcode('astroedu', 'astroedu'); +function astroedu ($atts, $content = null) { + exctract( + shortcode_atts( + array( + 'lang' => null, + 'code' => null, + ) + ) + ); + + if ( $lang <> null ) { + $link = ''.$content.''; + } else { + $link = ''.$content.''; + } + + return $link; +} + +# Spacescoop +add_shortcode('spacescoop', 'spacescoop'); +function spacescoop ($atts, $content = null) { + extract( + shortcode_atts( + array( + 'lang' => null, + 'code' => null, + ), + $atts + ) + ); + + if ( $lang <> null ) { + $link = ''.$content.''; + } else { + $link = ''.$content.''; + } + + return $link; +} + +# Sapere +add_shortcode('sapere', 'sapere'); +function sapere ($atts, $content = null) { + extract( + shortcode_atts( + array( + 'url' => null, + 'num' => null, + 'data' => null, + 'doi' => null, + ), + $atts + ) + ); + + if ( $doi <> null ) { + if ( $url <> null ) { + $link = 'Estratto dall\'articolo "'.$content.'" uscito su Sapere n.'.$num.' di '.$data.'. doi:'.$doi.''; + } else { + $link = 'Estratto dall\'articolo "'.$content.'" uscito su Sapere n.'.$num.' di '.$data.'. doi:'.$doi.''; + } + } else { + if ( $url <> null ) { + $link = 'Estratto dall\'articolo "'.$content.'" uscito su Sapere n.'.$num.' di '.$data.'.'; + } else { + $link = 'Estratto dall\'articolo "'.$content.'" uscito su Sapere n.'.$num.' di '.$data.'.'; + } + } + + return $link; +} \ No newline at end of file