Last active
August 29, 2015 14:00
-
-
Save KeSch/11229408 to your computer and use it in GitHub Desktop.
Toolbox-Modul um den Standard-Feedlink mit dem Feedburner-Feedlink zu ersetzen.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Module Name: Original RSS-Feed ersetzen | |
Module-URL: http://kevinschludermann.com/toolbox-module-rss-feed/ | |
Description: Ersetzt den Link des originalen Artikel-Feeds mit dem Link zu deinem Feedburner-Feed. [Frontend] | |
Author: Kevin Schludermann | |
Author URI: http://kevinschludermann.com | |
*/ | |
/* Sicherheitsabfrage */ | |
if ( !class_exists('Toolbox') ) { | |
die(); | |
} | |
/* Ab hier kann's los gehen */ | |
function ks_custom_rss_feed( $output, $feed ) { | |
if ( strpos( $output, 'comments' ) ) | |
return $output; | |
/* Link mit deinem persönlichen Feed-Link ersetzen */ | |
return esc_url( 'http://feeds.feedburner.com/exampleuser/' ); | |
} | |
add_action( 'feed_link', 'ks_custom_rss_feed', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment