PluginProbe
Friends / 2.9.0
Friends v2.9.0
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 2.9.0, at templates/admin/opml.php

39 lines 1.1 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
27 foreach ( $users as $user ) {
28 foreach ( $user['feeds'] as $feed ) {
29 ?>
30 <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'] ); ?>"/>
31 <?php
32 }
33 }
34 ?>
35 </outline>
36 <?php } ?>
37 </body>
38 </opml>
39