PluginProbe
Stream – Activity Log & Audit Trail / 4.3.0
Stream – Activity Log & Audit Trail v4.3.0
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.3.0, at includes/feeds/rss-2.0.php

76 lines 2.7 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 if ( ! defined( 'ABSPATH' ) ) {
9 exit;
10 }
11
12 header( 'Content-Type: ' . feed_content_type( 'rss-http' ) . '; charset=' . get_option( 'blog_charset' ), true );
13 printf( '<?xml version="1.0" encoding="%s"?>', esc_attr( get_option( 'blog_charset' ) ) );
14 ?>
15
16 <rss version="2.0"
17 xmlns:content="http://purl.org/rss/1.0/modules/content/"
18 xmlns:wfw="http://wellformedweb.org/CommentAPI/"
19 xmlns:dc="http://purl.org/dc/elements/1.1/"
20 xmlns:atom="http://www.w3.org/2005/Atom"
21 xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
22 xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
23 <?php
24 /**
25 * Action fires during RSS xmls printing
26 */
27 do_action( 'rss2_ns' )
28 ?>
29 >
30 <channel>
31 <title><?php bloginfo_rss( 'name' ); ?> - <?php esc_html_e( 'Stream Feed', 'stream' ); ?></title>
32 <atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
33 <link><?php echo esc_url( $records_admin_url ); ?></link>
34 <description><?php bloginfo_rss( 'description' ); ?></description>
35 <lastBuildDate><?php echo esc_html( mysql2date( 'r', $latest_record, false ) ); ?></lastBuildDate>
36 <language><?php bloginfo_rss( 'language' ); ?></language>
37 <sy:updatePeriod><?php echo esc_html( 'hourly' ); ?></sy:updatePeriod>
38 <sy:updateFrequency><?php echo absint( 1 ); ?></sy:updateFrequency>
39 <?php
40 /**
41 * Action fires during RSS head
42 */
43 do_action( 'rss2_head' );
44
45 foreach ( $records as $record ) :
46 $record_link = add_query_arg(
47 array(
48 'record__in' => $record->ID,
49 ),
50 $records_admin_url
51 );
52
53 $author = get_userdata( $record->author );
54 $display_name = isset( $author->display_name ) ? $author->display_name : 'N/A';
55 ?>
56 <item>
57 <title><![CDATA[ <?php echo esc_html( $record->summary ); ?> ]]></title>
58 <pubDate><?php echo esc_html( mysql2date( 'r', $record->created, false ) ); ?></pubDate>
59 <dc:creator><?php echo esc_html( $display_name ); ?></dc:creator>
60 <category domain="connector"><![CDATA[ <?php echo esc_html( $record->connector ); ?> ]]></category>
61 <category domain="context"><![CDATA[ <?php echo esc_html( $record->context ); ?> ]]></category>
62 <category domain="action"><![CDATA[ <?php echo esc_html( $record->action ); ?> ]]></category>
63 <category domain="ip"><?php echo esc_html( $record->ip ); ?></category>
64 <guid isPermaLink="false"><?php echo esc_url( $record_link ); ?></guid>
65 <link><?php echo esc_url( $record_link ); ?></link>
66 <?php
67 /**
68 * Action fires during RSS item
69 */
70 do_action( 'rss2_item' )
71 ?>
72 </item>
73 <?php endforeach; ?>
74 </channel>
75 </rss>
76