Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Plugin Name: Pew Custom Feeds
- Description: Enables different custom feeds of posts.
- Version: 1.0
- Author: Russell Heimlich
- Author URI: http://www.russellheimlich.com
- */
- function create_prism_xml_output() {
- load_template( dirname(__FILE__) . '/prism-xml-template.php');
- }
- function create_json_output() {
- load_template( dirname(__FILE__) . '/json-template.php');
- }
- function create_plain_output() {
- load_template( dirname(__FILE__) . '/plain-template.php');
- }
- function pew_custom_feeds_init() {
- add_feed('json', 'create_json_output');
- add_feed('prism', 'create_prism_xml_output');
- add_feed('plain', 'create_plain_output');
- }
- add_action('init', 'pew_custom_feeds_init');
- ?>
Advertisement
Add Comment
Please, Sign In to add comment