Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Issue #191 Some remarks about poor programming practices... #221

merged 8 commits into from

2 participants


Since the original author of this fix, @hajikelist , didn't have time to fix it, and I also find it annoying, I have forked&fixed, so resulting example code is easier to follow.


Thanks for the pull request! Can you please change the spaces to tabs in your patch? (On the line inside the if statement)

@rmccue rmccue merged commit 7f138e3 into simplepie:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 11 additions and 1 deletion.
  1. +11 −1 demo/index.php
12 demo/index.php
@@ -196,7 +196,17 @@
<div class="chunk focus" align="center">
<!-- If the feed has a link back to the site that publishes it (which 99% of them do), link the feed's title to it. -->
- <h3 class="header"><?php if ($feed->get_link()) echo '<a href="' . $feed->get_link() . '">'; echo $feed->get_title(); if ($feed->get_link()) echo '</a>'; ?></h3>
+ <h3 class="header">
+ <?php
+ $link = $feed->get_link();
+ $title = $feed->get_title();
+ if ($link)
+ {
+ $title = "<a href='$link' title='$title'>$title</a>";
+ }
+ echo $title;
+ ?>
+ </h3>
<!-- If the feed has a description, display it. -->
<?php echo $feed->get_description(); ?>
Something went wrong with that request. Please try again.