forked from zeen101/issuem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
issuem-feeds.php
105 lines (71 loc) · 2.19 KB
/
issuem-feeds.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<?php
/**
* This script modifies and displays the default feed templates for IssueM Article feeds.
*
* @package IssueM
* @since 1.0.2
*/
if ( !function_exists( 'do_issuem_feed_rdf' ) ) {
/**
* Load the RDF RSS 0.91 Feed template customized for IssueM Issues
*
* @since 1.0.2
*/
function do_issuem_feed_rdf() {
if ( get_query_var( 'post_type' ) == 'article' ) {
load_template( ISSUEM_PATH . '/feed-templates/feed-rdf.php' );
remove_action( 'do_feed_rdf', 'do_feed_rdf', 10, 1 );
}
}
add_action( 'do_feed_rdf', 'do_issuem_feed_rdf', 1, 1 );
}
if ( !function_exists( 'do_issuem_feed_atom' ) ) {
/**
* Load either Atom comment feed or Atom posts feed template customized for IssueM Issues
*
* @since 1.0.2
*
* @param bool $for_comments false for normal all article feeds
*/
function do_issuem_feed_atom( $for_comments ) {
if ( $for_comments )
return;
if ( get_query_var( 'post_type' ) == 'article' ) {
load_template( ISSUEM_PATH . '/feed-templates/feed-atom.php' );
remove_action( 'do_feed_atom', 'do_feed_atom', 10, 1 );
}
}
add_action( 'do_feed_atom', 'do_issuem_feed_atom', 1, 1 );
}
if ( !function_exists( 'do_issuem_feed_rss' ) ) {
/**
* Load the RSS 1.0 feed template customized for IssueM Issues
*
* @since 1.0.2
*/
function do_issuem_feed_rss() {
if ( get_query_var( 'post_type' ) == 'article' ) {
load_template( ISSUEM_PATH . '/feed-templates/feed-rss.php' );
remove_action( 'do_feed_rss', 'do_feed_rss', 10, 1 );
}
}
add_action( 'do_feed_rss', 'do_issuem_feed_rss', 1, 1 );
}
if ( !function_exists( 'do_issuem_feed_rss2' ) ) {
/**
* Load either the RSS2 comment feed or the RSS2 posts feed template customized for IssueM Issues
*
* @since 1.0.2
*
* @param bool $for_comments false for normal all article feeds
*/
function do_issuem_feed_rss2( $for_comments ) {
if ( $for_comments )
return;
if ( get_query_var( 'post_type' ) == 'article' ) {
load_template( ISSUEM_PATH . '/feed-templates/feed-rss2.php' );
remove_action( 'do_feed_rss2', 'do_feed_rss2', 10, 1 );
}
}
add_action( 'do_feed_rss2', 'do_issuem_feed_rss2', 1, 1 );
}