PluginProbe
Stream – Activity Log & Audit Trail / 3.6.1
Stream – Activity Log & Audit Trail v3.6.1
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
← All changes | includes/feeds/atom.php +26 -20 3.13.6.1 View file →
@@ -1,18 +1,24 @@
1 1 <?php
2 +/**
3 + * Renders an Atom feed of records.
4 + *
5 + * @package WP_Stream
6 + */
7 +
2 8 header( 'Content-Type: ' . feed_content_type( 'atom' ) . '; charset=' . get_option( 'blog_charset' ), true );
3 9 printf( '<?xml version="1.0" encoding="%s"?>', esc_attr( get_option( 'blog_charset' ) ) );
4 10 ?>
5 11
6 -<feed xmlns="http://www.w3.org/2005/Atom" xmlns:thr="http://purl.org/syndication/thread/1.0" xml:lang="<?php echo esc_attr( bloginfo_rss( 'language' ) ) ?>" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" <?php do_action( 'atom_ns' ) ?>>
7 - <title><?php bloginfo_rss( 'name' ) ?> - <?php esc_html_e( 'Stream Feed', 'stream' ) ?></title>
8 - <link href="<?php self_link() ?>" rel="self" type="application/rss+xml" />
9 - <link href="<?php echo esc_url( $records_admin_url ) ?>" />
10 - <subtitle type="html"><?php esc_html( bloginfo_rss( 'description' ) ) ?></subtitle>
11 - <updated><?php echo esc_html( mysql2date( 'c', $latest_record, false ) ) ?></updated>
12 - <id><?php echo esc_url( $latest_link ) ?></id>
13 - <sy:updatePeriod><?php echo esc_html( 'hourly' ) ?></sy:updatePeriod>
14 - <sy:updateFrequency><?php echo absint( 1 ) ?></sy:updateFrequency>
12 +<feed xmlns="http://www.w3.org/2005/Atom" xmlns:thr="http://purl.org/syndication/thread/1.0" xml:lang="<?php echo esc_attr( bloginfo_rss( 'language' ) ); ?>" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" <?php do_action( 'atom_ns' ); ?>>
13 + <title><?php bloginfo_rss( 'name' ); ?> - <?php esc_html_e( 'Stream Feed', 'stream' ); ?></title>
14 + <link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
15 + <link href="<?php echo esc_url( $records_admin_url ); ?>" />
16 + <subtitle type="html"><?php esc_html( bloginfo_rss( 'description' ) ); ?></subtitle>
17 + <updated><?php echo esc_html( mysql2date( 'c', $latest_record, false ) ); ?></updated>
18 + <id><?php echo esc_url( $latest_link ); ?></id>
19 + <sy:updatePeriod><?php echo esc_html( 'hourly' ); ?></sy:updatePeriod>
20 + <sy:updateFrequency><?php echo absint( 1 ); ?></sy:updateFrequency>
15 21 <?php
16 22 /**
17 23 * Action fires during RSS head
18 24 */
@@ -18,9 +24,9 @@
18 24 */
19 25 do_action( 'atom_head' );
20 26
21 27 foreach ( $records as $record ) :
22 - $record_link = add_query_arg(
28 + $record_link = add_query_arg(
23 29 array(
24 30 'record__in' => $record->ID,
25 31 ),
26 32 $records_admin_url
@@ -29,20 +35,20 @@
29 35 $author = get_userdata( $record->author );
30 36 $display_name = isset( $author->display_name ) ? $author->display_name : 'N/A';
31 37 ?>
32 38 <entry>
33 - <title type="html"><![CDATA[[<?php echo esc_html( $domain ) ?>] <?php echo esc_html( $record->summary ) // xss ok ?> ]]></title>
34 - <link href="<?php echo esc_url( $record_link ) ?>" />
35 - <updated><?php echo esc_html( mysql2date( 'c', $record->created, false ) ) ?></updated>
39 + <title type="html"><![CDATA[[<?php echo esc_html( $domain ); ?>] <?php echo esc_html( $record->summary ); // xss ok. ?> ]]></title>
40 + <link href="<?php echo esc_url( $record_link ); ?>" />
41 + <updated><?php echo esc_html( mysql2date( 'c', $record->created, false ) ); ?></updated>
36 42 <author>
37 - <name><?php echo esc_html( $display_name ) ?></name>
43 + <name><?php echo esc_html( $display_name ); ?></name>
38 44 </author>
39 - <category term="connector" label="<?php echo esc_html( $record->connector ) ?>" />
40 - <category term="context" label="<?php echo esc_html( $record->context ) ?>"/>
41 - <category term="action" label="<?php echo esc_html( $record->action ) ?>" />
42 - <category term="ip" label="<?php echo esc_html( $record->ip ) ?>" />
43 - <id><?php echo esc_url( $record_link ) ?></id>
44 - <summary type="html"><![CDATA[- <?php echo esc_html( $display_name ) ?> ]]></summary>
45 + <category term="connector" label="<?php echo esc_html( $record->connector ); ?>" />
46 + <category term="context" label="<?php echo esc_html( $record->context ); ?>"/>
47 + <category term="action" label="<?php echo esc_html( $record->action ); ?>" />
48 + <category term="ip" label="<?php echo esc_html( $record->ip ); ?>" />
49 + <id><?php echo esc_url( $record_link ); ?></id>
50 + <summary type="html"><![CDATA[- <?php echo esc_html( $display_name ); ?> ]]></summary>
45 51 <?php
46 52 /**
47 53 * Action fires during Atom item
48 54 */