/
payswarm.php
68 lines (57 loc) · 2.65 KB
/
payswarm.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?php
/*
Plugin Name: PaySwarm
Plugin URI: http://payswarm.com/
Description: PaySwarm allows you to charge micropayments for access to your website. PaySwarm is an open, royalty-free, Internet standard that enables micropayments across many different websites. You can learn more at the <a href='http://payswarm.com/'>PaySwarm standards website</a>.
Version: 1.0
Author: Digital Bazaar, Inc.
Author URI: http://digitalbazaar.com/
License: GPLv2
*/
/*
Copyright 2010-2012 Digital Bazaar, Inc. (email : support@digitalbazaar.com)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
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
*/
/**
* The current URL to the PaySwarm plugin base directory.
*
* @package payswarm
* @since 1.0
* @global string PAYSWARM_PLUGIN_URL
*/
require_once('payswarm-config.inc');
require_once('payswarm-admin.inc');
require_once('payswarm-article.inc');
require_once('payswarm-widgets.inc');
// handle install/uninstall PaySwarm database
register_activation_hook(__FILE__, 'payswarm_install_database');
register_deactivation_hook(__FILE__, 'payswarm_uninstall_database');
// install widgets on activation
register_activation_hook(__FILE__, 'payswarm_install_widgets');
// add actions associated with the WordPress processing
add_action('admin_init', 'payswarm_admin_init');
add_action('admin_menu', 'payswarm_admin_menu');
add_action('add_meta_boxes', 'payswarm_add_meta_boxes');
add_action('save_post', 'payswarm_save_post_data');
add_action('added_postmeta', 'payswarm_added_postmeta');
add_action('updated_postmeta', 'payswarm_updated_postmeta');
add_action('wp_enqueue_scripts', 'payswarm_enqueue_scripts');
add_action('admin_enqueue_scripts', 'payswarm_enqueue_scripts');
// add filters for text that the PaySwarm plugin will modify
add_filter('the_content', 'payswarm_filter_paid_content');
// remove filters that alter wordpress capitalization
// (this can interfere with digital signatures)
// See: http://justintadlock.com/archives/2010/07/08/lowercase-p-dangit
remove_filter('the_title', 'capital_P_dangit', 11);
remove_filter('the_content', 'capital_P_dangit', 11);
remove_filter('comment_text', 'capital_P_dangit', 31);
/* end of file, omit ?> */