Ich binde youtube videos bei mir mit einem klasse plugin ein. das sieht so aus:
PHP
<?php
/*
Plugin Name: YouTube
Plugin URI: http://bassistance.de/index.php/2006/04/09/wordpress-youtube-plugin/
Description: A filter for WordPress that displays youtube.com videos
Version: 1.0
Author: Jörn Zaefferer
Author URI: http://bassistance.de/
Instructions
Copy this file you unzipped into the wp-content/plugins folder of WordPress,
then go to Administration > Plugins, it should be in the list. Activtate it
and avery occurence of the expression [youtube id] (case unsensitive) will as
an embedded flash player. Replace "id" with the youtube id.
For the URL http://youtube.com/watch?v=83FWE_qBudU, the id part is 83FWE_qBudU.
*/
define("YOUTUBE_WIDTH", 425);
define("YOUTUBE_HEIGHT", 350);
define("YOUTUBE_REGEXP", "/\[youtube ([[:print:]]+)\]/");
define("YOUTUBE_TARGET", "<object type=\"application/x-shockwave-flash\" data=\"http://www.youtube.com/v/###URL###\" width=\"".YOUTUBE_WIDTH."\" height=\"".YOUTUBE_HEIGHT."\"><param name=\"movie\" value=\"http://www.youtube.com/v/###URL###\" /></object>");
function youtube_plugin_callback($match)
{
$output = YOUTUBE_TARGET;
$output = str_replace("###URL###", $match[1], $output);
return ($output);
}
function youtube_plugin($content)
{
return (preg_replace_callback(YOUTUBE_REGEXP, 'youtube_plugin_callback', $content));
}
add_filter('the_content', 'youtube_plugin');
add_filter('comment_text', 'youtube_plugin');
?>
Alles anzeigen
Jetzt möchte ich gerne für den RSS-Feed eine extra Ausgabe haben. Dafür habe ich herausgefunden gibt es die Funktion: is_feed()
Nun meine Frage an euch: Wo muss ich das denn bitte einsetzen damit ich für meinen RSS-Feed eine extra Ausgabe habe wie z.B. den direkten Link zum youtube Video?