/* Plugin Name: Smart Update Pinger Plugin URI: http://www.daven.se/usefulstuff/wordpress-plugins.html Description: Replaces the built-in ping/notify functionality. Pings only when publishing new posts, not when editing. Author: Christian Davén Version: 2.0 Author URI: http://www.daven.se/usefulstuff/ */ # adds an options page to the options menu function SUP_add_options_page() { if(function_exists("add_options_page")) add_options_page("Smart Update Pinger", "Smart Update Pinger", 5, basename(__FILE__), "SUP_show_options_page"); } # shows the options page function SUP_show_options_page() { $ping = get_option("SUP_ping"); $uris = get_option("ping_sites"); $pingservicesnow = "Ping Services Now!"; if(isset($_POST["ping"]) && $_POST["ping"] == $pingservicesnow) { SUP_log("Forcing pings ..."); SUP_ping_services(); } elseif(isset($_POST["submit"])) { $uris = $_POST["uris"]; $ping = 0; if($_POST["ping"] == 1) $ping = 1; update_option("SUP_ping", $ping); update_option("ping_sites", $uris); echo '
Options saved.
The following services will automatically be pinged/notified when you publish posts. Not when you edit previously published posts, as WordPress does by default.
NB: this list is synchronized with the original update services list.
These are the lastest actions performed by the plugin.
'.SUP_get_last_log_entries(20).'