PluginProbe
Friends / 4.3.2
Friends v4.3.2
4.3.2 4.3.1 4.3.0 4.2.2 4.2.1 4.2.0 4.1.0 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 2.8.0 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.8 2.8.9 2.9.0 2.9.1 All 88 releases
friends / templates / admin / opml.php

opml.php in Friends 4.3.2, at templates/admin/opml.php

35 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * This template generates the OPML to read your friend posts in a feed reader.
4 *
5 * @version 1.0
6 * @package Friends
7 */
8
9 header( 'Content-Disposition: attachment; filename=' . $args['filename'] );
10 header( 'Content-Type: text/opml+xml' );
11
12 echo '<' . '?xml version="1.0" encoding="utf-8"?' . '>';
13
14 ?>
15 <opml version="2.0">
16 <head>
17 <title><?php echo esc_html( $args['title'] ); ?></title>
18 <dateCreated><?php echo esc_html( gmdate( 'r' ) ); ?></dateCreated>
19 <ownerName><?php echo esc_html( wp_get_current_user()->display_name ); ?></ownerName>
20 </head>
21 <body>
22 <?php
23 foreach ( $args['feeds'] as $_role => $users ) {
24 ?>
25 <outline text="<?php echo esc_attr( $_role ); ?>">
26 <?php foreach ( $users as $user ) : /* phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect */ ?>
27 <?php foreach ( $user['feeds'] as $feed ) : /* phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect */ ?>
28 <outline text="<?php echo esc_attr( $user['friend_user']->display_name ); ?>" htmlUrl="<?php echo esc_url( $feed['html_url'] ); ?>" title="<?php echo esc_attr( $feed['title'] ); ?>" type="<?php echo esc_attr( $feed['type'] ); ?>" xmlUrl="<?php echo esc_url( $feed['xml_url'] ); ?>"/>
29 <?php endforeach; ?>
30 <?php endforeach; ?>
31 </outline>
32 <?php } ?>
33 </body>
34 </opml>
35