Changeset 35118
- Timestamp:
- 10/13/2015 02:58:21 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rewrite-functions.php
r34946 r35118 97 97 * @return string Feed action name. 98 98 */ 99 function add_feed($feedname, $function) { 100 global $wp_rewrite; 101 if ( ! in_array($feedname, $wp_rewrite->feeds) ) //override the file if it is 99 function add_feed( $feedname, $function ) { 100 global $wp_rewrite; 101 102 if ( ! in_array( $feedname, $wp_rewrite->feeds ) ) { 103 // Override the file if it is 102 104 $wp_rewrite->feeds[] = $feedname; 105 } 106 103 107 $hook = 'do_feed_' . $feedname; 108 104 109 // Remove default function hook 105 remove_action($hook, $hook); 106 add_action($hook, $function, 10, 1); 110 remove_action( $hook, $hook ); 111 112 add_action( $hook, $function, 10, 2 ); 113 107 114 return $hook; 108 115 }
Note: See TracChangeset
for help on using the changeset viewer.