plugin-wonderful/plugin-wonderful.php

48 lines
1.9 KiB
PHP
Raw Normal View History

2009-02-07 00:10:58 +00:00
<?php
/*
Plugin Name: Plugin Wonderful
Plugin URI: http://www.coswellproductions.com/wordpress/wordpress-plugins/
2009-02-07 00:10:58 +00:00
Description: Easily embed a Project Wonderful publisher's advertisements.
Version: 0.5
2009-02-07 00:10:58 +00:00
Author: John Bintz
Author URI: http://www.coswellproductions.org/wordpress/
2009-03-25 11:08:14 +00:00
Copyright 2009 John Bintz (email : john@coswellproductions.com)
2009-02-07 00:10:58 +00:00
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
foreach (glob(dirname(__FILE__) . '/classes/*.php') as $file) { require_once($file); }
2009-02-21 06:27:37 +00:00
// require_once('FirePHPCore/fb.php');
2009-02-07 00:10:58 +00:00
define('PLUGIN_WONDERFUL_XML_URL', 'http://www.projectwonderful.com/xmlpublisherdata.php?publisher=%d');
define('PLUGIN_WONDERFUL_UPDATE_TIME', 60 * 60 * 12); // every 12 hours
2009-02-07 00:10:58 +00:00
$plugin_wonderful = new PluginWonderful();
function __plugin_wonderful_load_widgets() {
register_widget('PluginWonderfulWidget');
}
2009-02-07 00:10:58 +00:00
add_action('admin_menu', array($plugin_wonderful, 'set_up_menu'));
add_action('init', array($plugin_wonderful, 'init'));
2009-02-13 01:07:23 +00:00
add_filter('the_excerpt_rss', array($plugin_wonderful, 'insert_rss_feed_ads'));
2009-03-25 11:38:03 +00:00
add_filter('the_content', array($plugin_wonderful, 'inject_ads_into_body_copy'));
add_action('widgets_init', '__plugin_wonderful_load_widgets');
2009-02-13 01:07:23 +00:00
2009-02-07 00:10:58 +00:00
register_activation_hook(__FILE__, array($plugin_wonderful, 'handle_activation'));
?>