PluginProbe
Stream – Activity Log & Audit Trail / 4.0.2
Stream – Activity Log & Audit Trail v4.0.2
4.4.0 4.3.0 4.2.2 4.2.1 trunk 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.1 3.1.1 3.10.0 3.2.0 3.2.1 3.2.2 3.2.3 All 50 releases
stream / includes / feeds / rss-2.0.php

rss-2.0.php in Stream – Activity Log & Audit Trail 4.0.2, at includes/feeds/rss-2.0.php

72 lines 2.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php // phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase
2 /**
3 * Renders a RSS feed of records.
4 *
5 * @package WP_Stream
6 */
7
8 header( 'Content-Type: ' . feed_content_type( 'rss-http' ) . '; charset=' . get_option( 'blog_charset' ), true );
9 printf( '<?xml version="1.0" encoding="%s"?>', esc_attr( get_option( 'blog_charset' ) ) );
10 ?>
11
12 <rss version="2.0"
13 xmlns:content="http://purl.org/rss/1.0/modules/content/"
14 xmlns:wfw="http://wellformedweb.org/CommentAPI/"
15 xmlns:dc="http://purl.org/dc/elements/1.1/"
16 xmlns:atom="http://www.w3.org/2005/Atom"
17 xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
18 xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
19 <?php
20 /**
21 * Action fires during RSS xmls printing
22 */
23 do_action( 'rss2_ns' )
24 ?>
25 >
26 <channel>
27 <title><?php bloginfo_rss( 'name' ); ?> - <?php esc_html_e( 'Stream Feed', 'stream' ); ?></title>
28 <atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
29 <link><?php echo esc_url( $records_admin_url ); ?></link>
30 <description><?php bloginfo_rss( 'description' ); ?></description>
31 <lastBuildDate><?php echo esc_html( mysql2date( 'r', $latest_record, false ) ); ?></lastBuildDate>
32 <language><?php bloginfo_rss( 'language' ); ?></language>
33 <sy:updatePeriod><?php echo esc_html( 'hourly' ); ?></sy:updatePeriod>
34 <sy:updateFrequency><?php echo absint( 1 ); ?></sy:updateFrequency>
35 <?php
36 /**
37 * Action fires during RSS head
38 */
39 do_action( 'rss2_head' );
40
41 foreach ( $records as $record ) :
42 $record_link = add_query_arg(
43 array(
44 'record__in' => $record->ID,
45 ),
46 $records_admin_url
47 );
48
49 $author = get_userdata( $record->author );
50 $display_name = isset( $author->display_name ) ? $author->display_name : 'N/A';
51 ?>
52 <item>
53 <title><![CDATA[ <?php echo esc_html( $record->summary ); ?> ]]></title>
54 <pubDate><?php echo esc_html( mysql2date( 'r', $record->created, false ) ); ?></pubDate>
55 <dc:creator><?php echo esc_html( $display_name ); ?></dc:creator>
56 <category domain="connector"><![CDATA[ <?php echo esc_html( $record->connector ); ?> ]]></category>
57 <category domain="context"><![CDATA[ <?php echo esc_html( $record->context ); ?> ]]></category>
58 <category domain="action"><![CDATA[ <?php echo esc_html( $record->action ); ?> ]]></category>
59 <category domain="ip"><?php echo esc_html( $record->ip ); ?></category>
60 <guid isPermaLink="false"><?php echo esc_url( $record_link ); ?></guid>
61 <link><?php echo esc_url( $record_link ); ?></link>
62 <?php
63 /**
64 * Action fires during RSS item
65 */
66 do_action( 'rss2_item' )
67 ?>
68 </item>
69 <?php endforeach; ?>
70 </channel>
71 </rss>
72