WordPress Plugin: T5 Short Feed
<?php # -*- coding: utf-8 -*- | |
/** | |
* Plugin Name: T5 Short Feed | |
* Plugin URI: https://gist.github.com/toscho/86d6ebcdec3be4d04af8 | |
* Description: Creates a feed with just the excerpt, no matter what you have set for the main feed. Please visit the permalinks page once after activation. The feed is then available at <code>/feed/summary/</code>. Requires PHP 5.3. | |
* Version: 07.05.15 | |
* Required: 4.2 | |
* Author: Thomas Scholz <info@toscho.de> | |
* Author URI: http://toscho.de | |
* License: MIT | |
* License URI: http://www.opensource.org/licenses/mit-license.php | |
*/ | |
add_action( 'wp_loaded', function() { | |
add_feed( 'summary', function() { | |
add_filter( 'pre_option_rss_use_excerpt', '__return_true' ); | |
require ABSPATH . WPINC . '/feed-rss2.php'; | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment