Plugin Directory

Changeset 204729


Ignore:
Timestamp:
02/12/2010 11:45:58 PM (16 years ago)
Author:
joshfraz
Message:

added patch from Stephen Weber to add hooks for other plugin developers to add PuSH support to their own custom feeds

Location:
pubsubhubbub/trunk
Files:
5 added
2 edited

Legend:

Unmodified
Added
Removed
  • pubsubhubbub/trunk/pubsubhubbub.php

    r197282 r204729  
    1313
    1414// function that is called whenever a new post is published
    15 function publish_to_hub($post_id)  {
     15// the ability for other plugins to hook into the PuSH code was added by Stephen Paul Weber (http://singpolyma.net)
     16function publish_to_hub($post_id,$feed_urls=NULL)  {
    1617   
    1718    // we want to notify the hub for every feed
    18     $feed_urls = array();
    19     $feed_urls[] = get_bloginfo('atom_url');
    20     $feed_urls[] = get_bloginfo('rss_url');
    21     $feed_urls[] = get_bloginfo('rdf_url');
    22     $feed_urls[] = get_bloginfo('rss2_url');
     19    if(!$feed_urls) {
     20        $feed_urls = array();
     21        $feed_urls[] = get_bloginfo('atom_url');
     22        $feed_urls[] = get_bloginfo('rss_url');
     23        $feed_urls[] = get_bloginfo('rdf_url');
     24        $feed_urls[] = get_bloginfo('rss2_url');
     25    }
    2326    // remove dups (ie. they all point to feedburner)
    2427    $feed_urls = array_unique($feed_urls);
  • pubsubhubbub/trunk/readme.txt

    r198444 r204729  
    1515This plugin:
    1616 
    17 * Supports multi-user installations (NEW!)
     17* Supports multi-user installations
    1818* Supports multiple hubs
     19* Offers hooks for other plugin developers to add PuSH support to their own custom feeds (NEW!)
    1920* Supports all of the feed formats used by WordPress, not just ATOM and RSS2
    2021* Announces which hubs you are using by adding `<link rel="hub" ...>` declarations to your template header and ATOM feed
Note: See TracChangeset for help on using the changeset viewer.