WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Difference between revisions of "Rewrite API/add feed"

Line 1: Line 1:
 
==Description==
 
==Description==
 
Add a new feed type like /atom1/
 
Add a new feed type like /atom1/
  +
  +
== Usage ==
  +
  +
%%%<?php add_feed( $feedname, $function ); ?>%%%
  +
'''Use the <tt>init</tt> action to call this function.'''
   
 
== Parameters ==
 
== Parameters ==

Revision as of 23:10, 24 May 2012

Description

Add a new feed type like /atom1/

Usage

<?php add_feed$feedname$function ); ?> Use the init action to call this function.

Parameters

$feedname
(string) (required)
Default: None
$function
(callback) (required) Callback to run on feed display.
Default: None

Return Values

(string) 
Feed action name.

Change Log

Since: 2.1

Source File

add_feed() is located in wp-includes/rewrite.php

Related Articles