Skip to content


WordPress Plugin: Wonderping

I have come up with the following WordPress plugin for the pingWondergeeks() function that Rick King wrote back in the day.

Please note: Wondergeeks.net is a closed system. Only users of Wondergeeks need mess with this!

pingWondergeeks() in a Plugin!

<?php
/*
Plugin Name: pingWondergeeks
Plugin URI: http://gfmorris.org/archives/2004/05/28/wordpress-plugin-wonderping/
Description: Notifies wondergeeks.net when a new, public post is made.
Version: 0.1
Author: Geof F. Morris
Author URI: http://gfmorris.net/
*/

function pingWondergeeks() {
        // Rick King
        $client = new xmlrpc_client("/ping/pingme.php?name=[domain.tld]", "wondergeeks.net", 80);
        $message = new xmlrpcmsg("", array(new xmlrpcval("[domain.tld]")));
        $result = $client->send($message);
        if (!$result || $result->faultCode()) {
                return false;
        }
        return true;
}

add_filter('publish_post', 'pingWondergeeks');

?>

Per my convention, data in [brackets] should be replaced by the user.

URL to download wonderping.php. You will also need the wonderping-syndication.zip files to support Wonderpinging.

This code should be saved as wondergeeks.php and placed in /wp-content/plugins/. Before activating the plugin in the WP admin, you need to remove the pingWondergeeks() functionality from my-hacks.php.

Future work for this plugin:

  • Passing more data through the XML-RPC array, thereby eliminating the need for the post syndication file.
  • Adding a function to pass comment data on to wondergeeks.net when comments are made using the WP Plugin API‘s comment_post filter, thereby eliminating the need for periodic polling of the comment syndication files.

Thanks to Rick and to Jeff McClure for their help in developing the Wonderping functionality for WP, and to Amy for developing wonderPortal back in the day.

Popularity: 21% [?]

Posted in WordPress.


3 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Continuing the Discussion

  1. The Indiana Jones School of Management linked to this post on 5/28/2004

    If You See This on Wondergeeks
    Testing my pluginification of Rick’s pingWondergeeks() plugin.

  2. Blogging Pro - Blog News, Tools and Hacks linked to this post on 8/3/2004

    WordPress Plugin: Wonderping
    This plugin
    notifies wondergeeks.net when a new, public post is made.

  3. The Indiana Jones School of Management » Wonderpinging linked to this post on 3/11/2005

    [...] pting, John.] I’m betting that the plugin still works, too. Here’s a test of Wonderping 0.1…

    [...]



Some HTML is OK

or, reply to this post via trackback.