Paid Memberships Pro - Version 1.8.5

Version Description

  • BUG: Fixed bug where the subscription_transaction_id was not showing up in the orders CSV export.
  • BUG: Fixed bug where gateway subscriptions were not being cancelled when the "cancel at gateway" option was checked when changing a user's level on the edit user page.
  • BUG: Drag and drop for reordering levels has been disabled if there are < 2 levels or if the user is searching the levels list. (Thanks, Isaac Coleman.)
  • BUG: Fixed bug where sales and revenue charts would never show data for the 31st of the month. (Thanks, TYTNetwork)
  • ENHANCEMENT: Now showing the time in date column of on the orders page and in the timestamp column of the orders CSV export.
  • ENHANCEMENT: Added the pmpro_next_payment filter so you can alter how the next payment date is found. Also added a filter to the PayPal Express gateway class, but left it disabled for performance reasons.
  • ENHANCEMENT: Now zeroing out the initial payment and billing amount in pmpro_memberships_users when an order gets cancelled.
  • ENHANCEMENT: Modified how billing information shows up on the edit user page.
  • ENHANCEMENT: Added partial Finnish translations. (Thanks, Onni Hakala)
  • FEATURE: Overhauled the Add Ons page with one click installs and automatic updates of non-WordPress.org add ons for PMPro Plus members.
Download this release

Release Info

Developer strangerstudios
Plugin Icon 128x128 Paid Memberships Pro
Version 1.8.5
Comparing to
See all releases

Code changes from version 1.8.4.4 to 1.8.5

Files changed (100) hide show
  1. adminpages/addons.php +285 -142
  2. adminpages/addons/hide-admin-bar-from-non-admins.php +0 -32
  3. adminpages/addons/images/pmpro-aweber.gif +0 -0
  4. adminpages/addons/images/pmpro-bbpress.jpg +0 -0
  5. adminpages/addons/images/pmpro-constant-contact.gif +0 -0
  6. adminpages/addons/images/pmpro-email-templates.gif +0 -0
  7. adminpages/addons/images/pmpro-infusionsoft.jpg +0 -0
  8. adminpages/addons/images/pmpro-mailchimp.jpg +0 -0
  9. adminpages/addons/images/pmpro-network.gif +0 -0
  10. adminpages/addons/images/pmpro-post-affiliate-pro.jpg +0 -0
  11. adminpages/addons/images/pmpro-register-helper.gif +0 -0
  12. adminpages/addons/images/pmpro-series.gif +0 -0
  13. adminpages/addons/images/pmpro-woocommerce.gif +0 -0
  14. adminpages/addons/images/pmpro-wp-affiliate-platform.jpg +0 -0
  15. adminpages/addons/images/wp-bouncer.gif +0 -0
  16. adminpages/addons/pmpro-addon-packages.php +0 -30
  17. adminpages/addons/pmpro-affiliates.php +0 -30
  18. adminpages/addons/pmpro-aweber.php +0 -31
  19. adminpages/addons/pmpro-bbpress.php +0 -31
  20. adminpages/addons/pmpro-constant-contact.php +0 -31
  21. adminpages/addons/pmpro-disable-emails.php +0 -28
  22. adminpages/addons/pmpro-email-templates.php +0 -31
  23. adminpages/addons/pmpro-expiration.php +0 -30
  24. adminpages/addons/pmpro-freeaddress.php +0 -30
  25. adminpages/addons/pmpro-infusionsoft.php +0 -31
  26. adminpages/addons/pmpro-international-addresses.php +0 -31
  27. adminpages/addons/pmpro-level-cost-text.php +0 -30
  28. adminpages/addons/pmpro-mailchimp.php +0 -31
  29. adminpages/addons/pmpro-network-subsite.php +0 -31
  30. adminpages/addons/pmpro-network.php +0 -31
  31. adminpages/addons/pmpro-post-affiliate-pro.php +0 -31
  32. adminpages/addons/pmpro-register-helper.php +0 -31
  33. adminpages/addons/pmpro-require-code-to-register.php +0 -28
  34. adminpages/addons/pmpro-series.php +0 -31
  35. adminpages/addons/pmpro-shipping.php +0 -31
  36. adminpages/addons/pmpro-user-pages.php +0 -30
  37. adminpages/addons/pmpro-woocommerce.php +0 -31
  38. adminpages/addons/pmpro-wp-affiliate.php +0 -31
  39. adminpages/addons/tml.php +0 -32
  40. adminpages/addons/wp-bouncer.php +0 -31
  41. adminpages/admin_header.php +13 -13
  42. adminpages/discountcodes.php +1 -0
  43. adminpages/functions.php +1 -1
  44. adminpages/membershiplevels.php +682 -673
  45. adminpages/memberslist.php +11 -1
  46. adminpages/orders-csv.php +2 -2
  47. adminpages/orders.php +16 -3
  48. adminpages/reports/sales.php +1 -1
  49. classes/class.memberorder.php +7 -1
  50. classes/class.pmproemail.php +2 -2
  51. classes/gateways/class.pmprogateway_paypalexpress.php +50 -0
  52. classes/gateways/class.pmprogateway_stripe.php +1 -0
  53. css/frontend.css +23 -0
  54. includes/addons.php +213 -0
  55. includes/functions.php +85 -23
  56. includes/license.php +278 -0
  57. includes/profile.php +22 -9
  58. languages/email/fr_FR/admin_change.html +7 -0
  59. languages/email/fr_FR/admin_change_admin.html +5 -0
  60. languages/email/fr_FR/billing.html +16 -0
  61. languages/email/fr_FR/billing_admin.html +17 -0
  62. languages/email/fr_FR/billing_failure.html +11 -0
  63. languages/email/fr_FR/billing_failure_admin.html +11 -0
  64. languages/email/fr_FR/cancel.html +3 -0
  65. languages/email/fr_FR/cancel_admin.html +8 -0
  66. languages/email/fr_FR/checkout_check.html +17 -0
  67. languages/email/fr_FR/checkout_check_admin.html +17 -0
  68. languages/email/fr_FR/checkout_express.html +17 -0
  69. languages/email/fr_FR/checkout_express_admin.html +14 -0
  70. languages/email/fr_FR/checkout_free.html +8 -0
  71. languages/email/fr_FR/checkout_free_admin.html +9 -0
  72. languages/email/fr_FR/checkout_freetrial.html +19 -0
  73. languages/email/fr_FR/checkout_freetrial_admin.html +19 -0
  74. languages/email/fr_FR/checkout_paid.html +23 -0
  75. languages/email/fr_FR/checkout_paid_admin.html +24 -0
  76. languages/email/fr_FR/checkout_trial.html +23 -0
  77. languages/email/fr_FR/checkout_trial_admin.html +24 -0
  78. languages/email/fr_FR/credit_card_expiring.html +18 -0
  79. languages/email/fr_FR/default.html +1 -0
  80. languages/email/fr_FR/footer.html +4 -0
  81. languages/email/fr_FR/header.html +1 -0
  82. languages/email/fr_FR/invoice.html +19 -0
  83. languages/email/fr_FR/membership_expired.html +7 -0
  84. languages/email/fr_FR/membership_expiring.html +6 -0
  85. languages/email/fr_FR/trial_ending.html +8 -0
  86. languages/pmpro-fi.mo +0 -0
  87. languages/pmpro-fi.po +3200 -0
  88. languages/pmpro-fr_FR.mo +0 -0
  89. languages/pmpro-fr_FR.po +399 -351
  90. languages/pmpro.mo +0 -0
  91. languages/pmpro.po +987 -604
  92. languages/pmpro.pot +987 -604
  93. license.txt +9 -9
  94. pages/billing.php +11 -2
  95. pages/checkout.php +209 -200
  96. paid-memberships-pro.php +9 -2
  97. preheaders/cancel.php +5 -2
  98. preheaders/checkout.php +4 -2
  99. readme.txt +26 -2
  100. services/braintree-webhook.php +101 -18
adminpages/addons.php CHANGED
@@ -1,142 +1,285 @@
1
- <?php
2
- //only admins can get this
3
- if(!function_exists("current_user_can") || (!current_user_can("manage_options") && !current_user_can("pmpro_addons")))
4
- {
5
- die(__("You do not have permissions to perform this action.", "pmpro"));
6
- }
7
-
8
- global $wpdb, $msg, $msgt, $pmpro_addons;
9
-
10
- /*
11
- Addon lists
12
- */
13
- $pmpro_addon_lists = array(
14
- 'repo' => array('Plugins in the WordPress Repository', 'These official PMPro plugins are available in the WordPress repository and can be installed through Plugins --> Add New.'),
15
- 'thirdparty' => array('Third-party Integration', 'These official PMPro plugins integrate with specific third-party tools and software.'),
16
- 'recommended' => array('Recommended Plugins', 'These plugins are not developed by the PMPro team, but are recommended for sites running PMPro.'),
17
- 'github' => array('Plugins on GitHub', 'These official PMPro plugins must be downloaded from GitHub and installed through Plugins --> Add New --> Upload, then activated. These plugins cannot be automatically updated and may require more developer input.'),
18
- 'gists' => array('Code Gists', 'These are bits of code that generally must be added to your active theme\'s functions.php file or included in a custom plugin. Most gists require customization and are recommended for developers only.')
19
- );
20
-
21
- /*
22
- Function to add an addon
23
- */
24
- function pmpro_add_addon($list, $addon)
25
- {
26
- global $pmpro_addons;
27
-
28
- //make sure we have the base array
29
- if(empty($pmpro_addons))
30
- $pmpro_addons = array();
31
-
32
- //make sure we have an array for the list
33
- if(empty($pmpro_addons[$list]))
34
- $pmpro_addons[$list] = array();
35
-
36
- //add addon to list
37
- $pmpro_addons[$list][] = $addon;
38
- }
39
-
40
- /*
41
- Load All Addons
42
- */
43
- $pmpro_addons_dir = dirname(__FILE__) . "/../adminpages/addons/";
44
- $cwd = getcwd();
45
- chdir($pmpro_addons_dir);
46
- $count = 0;
47
- foreach (glob("*.php") as $filename)
48
- {
49
- $count++;
50
- require_once($filename);
51
- }
52
- chdir($cwd);
53
-
54
- require_once(dirname(__FILE__) . "/admin_header.php");
55
- ?>
56
-
57
- <h2>Add Ons</h2>
58
- <ul id="addon-filters" class="subsubsub">
59
- <li id="addon-filters-all"><a href="javascript:void(0);" class="current all tab">All</a> <span>(<?php echo $count;?>)</span></li>
60
- <?php foreach($pmpro_addon_lists as $list => $list_info) { ?>
61
- <li id="addon-filters-<?php echo $list;?>"> | <a href="javascript:void(0);>" class="tab"><?php echo $list_info[0];?></a> <span>(<?php echo count($pmpro_addons[$list]);?>)</span></li>
62
- <?php } ?>
63
- </ul>
64
-
65
- <?php foreach($pmpro_addon_lists as $list => $list_info) { ?>
66
- <div id="pmpro-<?php echo $list;?>" class="pmpro-addon-list widgets-holder-wrap">
67
-
68
- <h3 class="section-title"><?php echo $list_info[0];?></h3>
69
- <p class="description"><?php echo $list_info[1];?></p>
70
- <br class="clear" />
71
-
72
- <div id="addons-list-<?php echo $list;?>" class="addon-list">
73
-
74
- <?php foreach($pmpro_addons[$list] as $slug => $addon) { ?>
75
- <div id="addon-<?php echo $slug;?>" class="widget <?php if($addon['enabled']) echo "enabled"; else echo "disabled";?>">
76
- <div class="widget-top">
77
- <div class="widget-title">
78
- <h4>
79
- <span class="status-label"><?php if($addon['enabled']) echo __("Enabled", "pmpro"); else echo __("Disabled", "pmpro");?></span>
80
- <span class="title"><?php echo $addon['title'];?></span>
81
- <span class="version pmpro_tag-grey"><?php echo $addon['version'];?></span>
82
- <span class="in-widget-title"></span>
83
- </h4>
84
- </div> <!-- end widget-title -->
85
- </div> <!-- end widget-top -->
86
- <div class="widget-inside">
87
- <?php call_user_func($addon['widget'], $addon);?>
88
- </div> <!-- end addon-inside -->
89
- </div> <!-- end widget -->
90
- <?php } ?>
91
-
92
- <br class="clear" />
93
- </div> <!-- end addon-list -->
94
-
95
- </div> <!-- end pmpro-<?php echo $list;?> -->
96
- <?php } ?>
97
-
98
- <script>
99
- //tabs
100
- jQuery(document).ready(function() {
101
- jQuery('#addon-filters a.tab').click(function() {
102
- //which tab?
103
- var tab = jQuery(this).parent().attr('id').replace('addon-filters-', '');
104
-
105
- //un select tabs
106
- jQuery('#addon-filters a.tab').removeClass('current');
107
-
108
- //select this tab
109
- jQuery('#addon-filters-'+tab+' a').addClass('current');
110
-
111
- //show all?
112
- if(tab == 'all')
113
- jQuery('div.pmpro-addon-list').show();
114
- else
115
- {
116
- //hide all
117
- jQuery('div.pmpro-addon-list').hide();
118
-
119
- //show this one
120
- jQuery('#pmpro-'+tab).show();
121
- }
122
- });
123
- });
124
-
125
- //resize addon boxes
126
- jQuery(document).ready(function() {
127
- jQuery('.addon-list').each(function() {
128
- //what's the tallest p in the list?
129
- var tallest = 32;
130
- jQuery(this).find('div.info p').each(function() {
131
- tallest = Math.max(tallest, jQuery(this).height());
132
- });
133
-
134
- //set all p's to match
135
- jQuery(this).find('div.info p').css('height', tallest);
136
- });
137
- });
138
- </script>
139
-
140
- <?php
141
- require_once(dirname(__FILE__) . "/admin_footer.php");
142
- ?>
1
+ <?php
2
+ //only admins can get this
3
+ if(!function_exists("current_user_can") || (!current_user_can("manage_options") && !current_user_can("pmpro_addons")))
4
+ {
5
+ die(__("You do not have permissions to perform this action.", "pmpro"));
6
+ }
7
+
8
+ global $wpdb, $msg, $msgt, $pmpro_addons;
9
+
10
+ wp_enqueue_script( 'plugin-install' );
11
+ add_thickbox();
12
+ wp_enqueue_script( 'updates' );
13
+
14
+ require_once(dirname(__FILE__) . "/admin_header.php");
15
+
16
+ //force a check of plugin versions?
17
+ if(!empty($_REQUEST['force-check']))
18
+ {
19
+ wp_version_check(array(), true);
20
+ wp_update_plugins();
21
+ $pmpro_license_key = get_option("pmpro_license_key", "");
22
+ pmpro_license_isValid($pmpro_license_key, NULL, true);
23
+ }
24
+
25
+ //some vars
26
+ $addons = pmpro_getAddons();
27
+ $addons_timestamp = get_option("pmpro_addons_timestamp", false);
28
+ $plugin_info = get_site_transient( 'update_plugins' );
29
+ $pmpro_license_key = get_option("pmpro_license_key", "");
30
+
31
+ //get plugin status for filters
32
+ if(!empty($_REQUEST['plugin_status']))
33
+ $status = $_REQUEST['plugin_status'];
34
+ else
35
+ $status = "all";
36
+
37
+ //split addons into groups for filtering
38
+ $addons_all = $addons;
39
+ $addons_active = array();
40
+ $addons_inactive = array();
41
+ $addons_update = array();
42
+ $addons_uninstalled = array();
43
+
44
+ foreach($addons as $addon)
45
+ {
46
+ $plugin_file = $addon['Slug'] . '/' . $addon['Slug'] . '.php';
47
+ $plugin_file_abs = ABSPATH . 'wp-content/plugins/' . $plugin_file;
48
+
49
+ //active?
50
+ if(is_plugin_active($plugin_file))
51
+ $addons_active[] = $addon;
52
+ else
53
+ $addons_inactive[] = $addon;
54
+
55
+ //has update?
56
+ if(isset($plugin_info->response[$plugin_file]))
57
+ $addons_update[] = $addon;
58
+
59
+ //not installed?
60
+ if(!file_exists($plugin_file_abs))
61
+ $addons_uninstalled[] = $addon;
62
+ }
63
+ ?>
64
+ <h2><?php _e('Add Ons', 'pmpro'); ?></h2>
65
+
66
+ <?php
67
+ pmpro_showMessage();
68
+ ?>
69
+
70
+ <p>
71
+ <?php printf(__('Last checked on %s at %s.', 'pmpro'), date(get_option('date_format'), $addons_timestamp), date(get_option('time_format'), $addons_timestamp));?> &nbsp;
72
+ <a class="button" href="<?php echo admin_url("admin.php?page=pmpro-addons&force-check=1&plugin_status=" . $status);?>"><?php _e('Check Again', 'pmpro'); ?></a>
73
+ </p>
74
+
75
+ <ul class="subsubsub">
76
+ <li class="all"><a href="admin.php?page=pmpro-addons&plugin_status=all" <?php if(empty($status) || $status == "all") { ?>class="current"<?php } ?>><?php _e('All', 'pmpro'); ?> <span class="count">(<?php echo count($addons);?>)</span></a> |</li>
77
+ <li class="active"><a href="admin.php?page=pmpro-addons&plugin_status=active" <?php if($status == "active") { ?>class="current"<?php } ?>><?php _e('Active', 'pmpro'); ?> <span class="count">(<?php echo count($addons_active);?>)</span></a> |</li>
78
+ <li class="inactive"><a href="admin.php?page=pmpro-addons&plugin_status=inactive" <?php if($status == "inactive") { ?>class="current"<?php } ?>><?php _e('Inactive', 'pmpro'); ?> <span class="count">(<?php echo count($addons_inactive);?>)</span></a> |</li>
79
+ <li class="update"><a href="admin.php?page=pmpro-addons&plugin_status=update" <?php if($status == "update") { ?>class="current"<?php } ?>><?php _e('Update Available', 'pmpro'); ?><span class="count">(<?php echo count($addons_update);?>)</span></a> |</li>
80
+ <li class="uninstalled"><a href="admin.php?page=pmpro-addons&plugin_status=uninstalled" <?php if($status == "uninstalled") { ?>class="current"<?php } ?>><?php _e('Not Installed', 'pmpro'); ?> <span class="count">(<?php echo count($addons_uninstalled);?>)</span></a></li>
81
+ </ul>
82
+
83
+ <br /><br />
84
+
85
+ <table class="wp-list-table widefat plugins">
86
+ <thead>
87
+ <tr>
88
+ <th scope="col" id="cb" class="manage-column column-cb check-column" style="">
89
+ <?php /*
90
+ <label class="screen-reader-text" for="cb-select-all-1"><?php _e('Select All'); ?></label><input id="cb-select-all-1" type="checkbox">
91
+ */ ?>
92
+ </th>
93
+ <th scope="col" id="name" class="manage-column column-name" style=""><?php _e('Add On Name','pmpro'); ?></th>
94
+ <th scope="col" id="type" class="manage-column column-type" style=""><?php _e('Type', 'pmpro'); ?></th>
95
+ <th scope="col" id="description" class="manage-column column-description" style=""><?php _e('Description', 'pmpro'); ?></th>
96
+ </tr>
97
+ </thead>
98
+ <tbody id="the-list">
99
+ <?php
100
+ //which addons to show?
101
+ if($status == "active")
102
+ $addons = $addons_active;
103
+ elseif($status == "inactive")
104
+ $addons = $addons_inactive;
105
+ elseif($status == "update")
106
+ $addons = $addons_update;
107
+ elseif($status == "uninstalled")
108
+ $addons = $addons_uninstalled;
109
+ else
110
+ $addons = $addons_all;
111
+
112
+ //no addons for this filter?
113
+ if(count($addons) < 1)
114
+ {
115
+ ?>
116
+ <tr>
117
+ <td></td>
118
+ <td colspan="3"><p><?php _e('No Add Ons found.', 'pmpro'); ?></p></td>
119
+ </tr>
120
+ <?php
121
+ }
122
+
123
+ foreach($addons as $addon)
124
+ {
125
+ $plugin_file = $addon['Slug'] . '/' . $addon['Slug'] . '.php';
126
+ $plugin_file_abs = ABSPATH . 'wp-content/plugins/' . $plugin_file;
127
+
128
+ if(file_exists($plugin_file_abs))
129
+ $plugin_data = get_plugin_data( $plugin_file_abs, false, true);
130
+ else
131
+ $plugin_data = $addon;
132
+
133
+ //make sure plugin value is set
134
+ if(empty($plugin_data['plugin']))
135
+ $plugin_data['plugin'] = $plugin_file;
136
+
137
+ $plugin_name = $plugin_data['Name'];
138
+ $id = sanitize_title( $plugin_name );
139
+ $checkbox_id = "checkbox_" . md5($plugin_name);
140
+
141
+ if(!empty($plugin_data['License']))
142
+ {
143
+ $context = 'uninstalled inactive';
144
+ }
145
+ elseif(isset($plugin_info->response[$plugin_file]))
146
+ {
147
+ $context = 'active update';
148
+ }
149
+ elseif(is_plugin_active($plugin_file))
150
+ {
151
+ $context = 'active';
152
+ }
153
+ elseif(file_exists($plugin_file_abs))
154
+ {
155
+ $context = 'inactive';
156
+ }
157
+ else
158
+ {
159
+ $context = false;
160
+ }
161
+ ?>
162
+ <tr id="<?php echo $id; ?>" class="<?php echo $context;?>" data-slug="<?php echo $id; ?>">
163
+ <th scope="row" class="check-column">
164
+ <?php /*
165
+ <label class="screen-reader-text" for="<?php echo $checkbox_id; ?>"><?php sprintf( __( 'Select %s' ), $plugin_name ); ?></label>
166
+ <input type="checkbox" name="checked[]" value="<?php esc_attr( $plugin_file ); ?>" id="<?php echo $checkbox_id; ?>">
167
+ */ ?>
168
+ </th>
169
+ <td class="plugin-title">
170
+ <strong><?php echo $plugin_name; ?></strong>
171
+ <div class="row-actions visible">
172
+ <?php
173
+ $actions = array();
174
+ if($context === 'uninstalled inactive')
175
+ {
176
+ if($plugin_data['License'] == 'wordpress.org')
177
+ {
178
+ //wordpress.org
179
+ $actions['install'] = '<span class="install"><a href="' . wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=' . $plugin_data['Slug']), 'install-plugin_' . $plugin_data['Slug']) . '">' . __('Install Now', 'pmpro') . '</a></span>';
180
+ }
181
+ elseif($plugin_data['License'] == 'free')
182
+ {
183
+ //free
184
+ $actions['install'] = '<span class="install"><a href="' . wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=' . $plugin_data['Slug']), 'install-plugin_' . $plugin_data['Slug']) . '">' . __('Install Now', 'pmpro') . '</a></span>';
185
+ $actions['download'] = '<span class="download"><a target="_blank" href="' . $plugin_data['Download'] . '?key=' . $pmpro_license_key . '">' . __('Download', 'pmpro') . '</a></span>';
186
+ }
187
+ elseif(empty($pmpro_license_key))
188
+ {
189
+ //no key
190
+ $actions['settings'] = '<span class="settings"><a href="' . admin_url('options-general.php?page=pmpro_license_settings') . '">' . __('Update License', 'pmpro') . '</a></span>';
191
+ $actions['download'] = '<span class="download"><a target="_blank" href="' . $plugin_data['PluginURI'] . '">' . __('Download', 'pmpro') . '</a></span>';
192
+ }
193
+ elseif(pmpro_license_isValid($pmpro_license_key, $plugin_data['License']))
194
+ {
195
+ //valid key
196
+ $actions['install'] = '<span class="install"><a href="' . wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=' . $plugin_data['Slug']), 'install-plugin_' . $plugin_data['Slug']) . '">' . __('Install Now', 'pmpro') . '</a></span>';
197
+ $actions['download'] = '<span class="download"><a target="_blank" href="' . $plugin_data['Download'] . '?key=' . $pmpro_license_key . '">' . __('Download', 'pmpro') . '</a></span>';
198
+ }
199
+ else
200
+ {
201
+ //invalid key
202
+ $actions['settings'] = '<span class="settings"><a href="' . admin_url('options-general.php?page=pmpro_license_settings') . '">' . __('Update License', 'pmpro') . '</a></span>';
203
+ $actions['download'] = '<span class="download"><a target="_blank" href="' . $plugin_data['PluginURI'] . '">' . __('Download', 'pmpro') . '</a></span>';
204
+ }
205
+ }
206
+ elseif($context === 'active' || $context === 'active update')
207
+ {
208
+ $actions['deactivate'] = '<span class="deactivate"><a href="' . wp_nonce_url(self_admin_url('plugins.php?action=deactivate&plugin=' . $plugin_file), 'deactivate-plugin_' . $plugin_file ) . '" aria-label="' . esc_attr( sprintf( __( 'Deactivate %s' ), $plugin_data['Name'] ) ) . '">' . __('Deactivate') . '</a></span>';
209
+ }
210
+ elseif($context === 'inactive')
211
+ {
212
+ $actions['activate'] = '<span class="activate"><a href="' . wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=' . $plugin_file), 'activate-plugin_' . $plugin_file) . '" class="edit" aria-label="' . esc_attr( sprintf( __( 'Activate %s' ), $plugin_data['Name'] ) ) . '">' . __('Activate') . '</a></span>';
213
+ $actions['delete'] = '<span class="delete"><a href="' . wp_nonce_url(self_admin_url('plugins.php?action=delete-selected&checked[]=' . $plugin_file), 'bulk-plugins') . '" class="delete" aria-label="' . esc_attr( sprintf( __( 'Delete %s' ), $plugin_data['Name'] ) ) . '">' . __('Delete') . '</a></span>';
214
+ }
215
+ $actions = apply_filters( 'plugin_action_links_' . $plugin_file, $actions, $plugin_file, $plugin_data, $context );
216
+ echo implode(' | ',$actions);
217
+ ?>
218
+ </div>
219
+ </td>
220
+ <td class="column-type">
221
+ <?php
222
+ if($addon['License'] == 'free')
223
+ _e("PMPro Free", "pmpro");
224
+ elseif($addon['License'] == 'core')
225
+ _e("PMPro Core", "pmpro");
226
+ elseif($addon['License'] == 'plus')
227
+ _e("PMPro Plus", "pmpro");
228
+ elseif($addon['License'] == 'wordpress.org')
229
+ _e("WordPress.org", "pmpro");
230
+ else
231
+ _e("N/A", "pmpro");
232
+ ?>
233
+ </td>
234
+ <td class="column-description desc">
235
+ <div class="plugin-description"><p><?php echo $plugin_data['Description']; ?></p></div>
236
+ <div class="inactive second plugin-version-author-uri">
237
+ <?php
238
+ $plugin_meta = array();
239
+ if ( !empty( $plugin_data['Version'] ) )
240
+ $plugin_meta[] = sprintf( __( 'Version %s' ), $plugin_data['Version'] );
241
+ if ( !empty( $plugin_data['Author'] ) ) {
242
+ $author = $plugin_data['Author'];
243
+ if ( !empty( $plugin_data['AuthorURI'] ) )
244
+ $author = '<a href="' . $plugin_data['AuthorURI'] . '">' . $plugin_data['Author'] . '</a>';
245
+ $plugin_meta[] = sprintf( __( 'By %s' ), $author );
246
+ }
247
+ // Details link using API info, if available
248
+ if ( isset( $plugin_data['slug'] ) && current_user_can( 'install_plugins' ) ) {
249
+ $plugin_meta[] = sprintf( '<a href="%s" class="thickbox" aria-label="%s" data-title="%s">%s</a>',
250
+ esc_url( network_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $plugin_data['slug'] .
251
+ '&TB_iframe=true&width=600&height=550' ) ),
252
+ esc_attr( sprintf( __( 'More information about %s' ), $plugin_name ) ),
253
+ esc_attr( $plugin_name ),
254
+ __( 'View details' )
255
+ );
256
+ } elseif ( ! empty( $plugin_data['PluginURI'] ) ) {
257
+ $plugin_meta[] = sprintf( '<a href="%s">%s</a>',
258
+ esc_url( $plugin_data['PluginURI'] ),
259
+ __( 'Visit plugin site' )
260
+ );
261
+ }
262
+ $plugin_meta = apply_filters( 'plugin_row_meta', $plugin_meta, $plugin_file, $plugin_data );
263
+ echo implode( ' | ', $plugin_meta );
264
+ ?>
265
+ </div>
266
+ </td>
267
+ </tr>
268
+ <?php
269
+
270
+ ob_start();
271
+ wp_plugin_update_row( $plugin_file, $plugin_data );
272
+ $row = ob_get_contents();
273
+ ob_end_clean();
274
+
275
+ echo str_replace('colspan="0"', 'colspan="4"', $row);
276
+ }
277
+ ?>
278
+ </tbody>
279
+ </table>
280
+
281
+ <?php
282
+ require_once(dirname(__FILE__) . "/admin_footer.php");
283
+ wp_print_request_filesystem_credentials_modal();
284
+ echo '</div>';
285
+ ?>
adminpages/addons/hide-admin-bar-from-non-admins.php DELETED
@@ -1,32 +0,0 @@
1
- <?php
2
- /*
3
- Addon: Hide Admin Bar From Non-Admins
4
- Slug: hide-admin-bar-from-non-admins
5
- */
6
- pmpro_add_addon('repo', array(
7
- 'title' => 'Hide Admin Bar From Non-Admins',
8
- 'version' => '1.0',
9
- 'widget' => 'pmpro_addon_hide_admin_bar_from_non_admins_widget',
10
- 'enabled' => function_exists('habfna_disable_admin_bar')
11
- )
12
- );
13
-
14
- function pmpro_addon_hide_admin_bar_from_non_admins_widget($addon)
15
- {
16
- ?>
17
- <div class="info">
18
- <p>Perfect for sites where there is only one admin who needs access to the dashboard and the admin bar. When activated only administrators will see the admin bar.</p>
19
- <div class="actions">
20
- <form method="post" name="component-actions" action="">
21
- <?php if($addon['enabled']) { ?>
22
- <a href="<?php echo admin_url("plugins.php");?>" class="button">Enabled</a>
23
- <?php } elseif(file_exists(dirname(__FILE__) . "/../../../hide-admin-bar-from-non-admins/hide-admin-bar-from-non-admins.php")) { ?>
24
- <a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=hide-admin-bar-from-non-admins/hide-admin-bar-from-non-admins.php'), 'activate-plugin_hide-admin-bar-from-non-admins/hide-admin-bar-from-non-admins.php')?>" class="button button-primary">Activate</a>
25
- <?php } else { ?>
26
- <a href="<?php echo wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=hide-admin-bar-from-non-admins'), 'install-plugin_hide-admin-bar-from-non-admins'); ?>" class="button button-primary">Download</a>
27
- <?php } ?>
28
- </form>
29
- </div>
30
- </div> <!-- end info -->
31
- <?php
32
- }
adminpages/addons/images/pmpro-aweber.gif DELETED
Binary file
adminpages/addons/images/pmpro-bbpress.jpg DELETED
Binary file
adminpages/addons/images/pmpro-constant-contact.gif DELETED
Binary file
adminpages/addons/images/pmpro-email-templates.gif DELETED
Binary file
adminpages/addons/images/pmpro-infusionsoft.jpg DELETED
Binary file
adminpages/addons/images/pmpro-mailchimp.jpg DELETED
Binary file
adminpages/addons/images/pmpro-network.gif DELETED
Binary file
adminpages/addons/images/pmpro-post-affiliate-pro.jpg DELETED
Binary file
adminpages/addons/images/pmpro-register-helper.gif DELETED
Binary file
adminpages/addons/images/pmpro-series.gif DELETED
Binary file
adminpages/addons/images/pmpro-woocommerce.gif DELETED
Binary file
adminpages/addons/images/pmpro-wp-affiliate-platform.jpg DELETED
Binary file
adminpages/addons/images/wp-bouncer.gif DELETED
Binary file
adminpages/addons/pmpro-addon-packages.php DELETED
@@ -1,30 +0,0 @@
1
- <?php
2
- /*
3
- Addon: PMPro Addon Packages
4
- Slug: pmpro-addon-packages
5
- */
6
- pmpro_add_addon('github', array(
7
- 'title' => 'PMPro Addon Packages',
8
- 'version' => '.4.3',
9
- 'widget' => 'pmpro_addon_pmpro_addon_packages_widget',
10
- 'enabled' => function_exists('pmproap_post_meta')
11
- )
12
- );
13
-
14
- function pmpro_addon_pmpro_addon_packages_widget($addon)
15
- {
16
- ?>
17
- <div class="info">
18
- <p>Sell access to individual pages or posts for a flat fee. This is a workaround if you would like to allow multiple membership levels per user.</p>
19
- <div class="actions">
20
- <?php if($addon['enabled']) { ?>
21
- <a href="https://github.com/strangerstudios/pmpro-addon-packages/blob/master/readme.txt" class="button">Enabled</a>
22
- <?php } elseif(file_exists(dirname(__FILE__) . "/../../../pmpro-addon-packages/pmpro-addon-packages.php")) { ?>
23
- <a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-addon-packages/pmpro-addon-packages.php'), 'activate-plugin_pmpro-addon-packages/pmpro-addon-packages.php')?>" class="button button-primary">Activate</a>
24
- <?php } else { ?>
25
- <a href="https://www.paidmembershipspro.com/wp-content/uploads/plugins/pmpro-addon-packages.zip" class="button button-primary">Download</a>
26
- <?php } ?>
27
- </div>
28
- </div> <!-- end info -->
29
- <?php
30
- }
adminpages/addons/pmpro-affiliates.php DELETED
@@ -1,30 +0,0 @@
1
- <?php
2
- /*
3
- Addon: PMPro Affiliates
4
- Slug: pmpro-affiliates
5
- */
6
- pmpro_add_addon('github', array(
7
- 'title' => 'PMPro Affiliates',
8
- 'version' => '.2.4',
9
- 'widget' => 'pmpro_addon_pmpro_affiliates_widget',
10
- 'enabled' => function_exists('pmpro_affiliates_dependencies')
11
- )
12
- );
13
-
14
- function pmpro_addon_pmpro_affiliates_widget($addon)
15
- {
16
- ?>
17
- <div class="info">
18
- <p>Lightweight Affiliate system. Create affiliate accounts and codes; tracks checkouts by affiliate account.</p>
19
- <div class="actions">
20
- <?php if($addon['enabled']) { ?>
21
- <a href="https://github.com/strangerstudios/pmpro-affiliates/blob/master/readme.txt" class="button">Enabled</a>
22
- <?php } elseif(file_exists(dirname(__FILE__) . "/../../../pmpro-affiliates/pmpro-affiliates.php")) { ?>
23
- <a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-affiliates/pmpro-affiliates.php'), 'activate-plugin_pmpro-affiliates/pmpro-affiliates.php')?>" class="button button-primary">Activate</a>
24
- <?php } else { ?>
25
- <a href="http://www.paidmembershipspro.com/wp-content/uploads/plugins/pmpro-affiliates.zip" class="button button-primary">Download</a>
26
- <?php } ?>
27
- </div>
28
- </div> <!-- end info -->
29
- <?php
30
- }
adminpages/addons/pmpro-aweber.php DELETED
@@ -1,31 +0,0 @@
1
- <?php
2
- /*
3
- Addon: PMPro AWeber Integration
4
- Slug: pmpro-aweber
5
- */
6
- pmpro_add_addon('thirdparty', array(
7
- 'title' => 'PMPro AWeber Integration',
8
- 'version' => '1.0',
9
- 'widget' => 'pmpro_addon_pmpro_aweber_widget',
10
- 'enabled' => function_exists('pmproaw_init')
11
- )
12
- );
13
-
14
- function pmpro_addon_pmpro_aweber_widget($addon)
15
- {
16
- ?>
17
- <img class="addon-thumb" src="<?php echo PMPRO_URL?>/adminpages/addons/images/pmpro-aweber.gif" />
18
- <div class="info">
19
- <p>Integrate User Registrations with AWeber. Adds members to lists based on their membership level. (Note: works without PMPro as well.)</p>
20
- <div class="actions">
21
- <?php if($addon['enabled']) { ?>
22
- <a href="<?php echo admin_url("plugins.php");?>" class="button">Enabled</a>
23
- <?php } elseif(file_exists(dirname(__FILE__) . "/../../../pmpro-aweber/pmpro-aweber.php")) { ?>
24
- <a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-aweber/pmpro-aweber.php'), 'activate-plugin_pmpro-aweber/pmpro-aweber.php')?>" class="button button-primary">Activate</a>
25
- <?php } else { ?>
26
- <a href="<?php echo wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=pmpro-aweber'), 'install-plugin_pmpro-aweber'); ?>" class="button button-primary">Download</a>
27
- <?php } ?>
28
- </div>
29
- </div> <!-- end info -->
30
- <?php
31
- }
adminpages/addons/pmpro-bbpress.php DELETED
@@ -1,31 +0,0 @@
1
- <?php
2
- /*
3
- Addon: PMPro bbPress
4
- Slug: pmpro-bbpress
5
- */
6
- pmpro_add_addon('repo', array(
7
- 'title' => 'PMPro bbPress',
8
- 'version' => '1.0.1',
9
- 'widget' => 'pmpro_addon_pmpro_bbpress_widget',
10
- 'enabled' => function_exists('pmprobbp_add_meta_box')
11
- )
12
- );
13
-
14
- function pmpro_addon_pmpro_bbpress_widget($addon)
15
- {
16
- ?>
17
- <img class="addon-thumb" src="<?php echo PMPRO_URL?>/adminpages/addons/images/pmpro-bbpress.jpg" />
18
- <div class="info">
19
- <p>Locking down bbPress Forums by Membership Level and Forum ID.</p>
20
- <div class="actions">
21
- <?php if($addon['enabled']) { ?>
22
- <a href="<?php echo admin_url("plugins.php");?>" class="button">Enabled</a>
23
- <?php } elseif(file_exists(dirname(__FILE__) . "/../../../pmpro-bbpress/pmpro-bbpress.php")) { ?>
24
- <a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-bbpress/pmpro-bbpress.php'), 'activate-plugin_pmpro-bbpress/pmpro-bbpress.php')?>" class="button button-primary">Activate</a>
25
- <?php } else { ?>
26
- <a href="<?php echo wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=pmpro-bbpress'), 'install-plugin_pmpro-bbpress'); ?>" class="button button-primary">Download</a>
27
- <?php } ?>
28
- </div>
29
- </div> <!-- end info -->
30
- <?php
31
- }
adminpages/addons/pmpro-constant-contact.php DELETED
@@ -1,31 +0,0 @@
1
- <?php
2
- /*
3
- Addon: PMPro Constant Contact Integration
4
- Slug: pmpro-constant-contact
5
- */
6
- pmpro_add_addon('thirdparty', array(
7
- 'title' => 'PMPro Constant Contact Integration',
8
- 'version' => '1.0',
9
- 'widget' => 'pmpro_addon_pmpro_constant_contact_widget',
10
- 'enabled' => function_exists('pmprocc_init')
11
- )
12
- );
13
-
14
- function pmpro_addon_pmpro_constant_contact_widget($addon)
15
- {
16
- ?>
17
- <img class="addon-thumb" src="<?php echo PMPRO_URL?>/adminpages/addons/images/pmpro-constant-contact.gif" />
18
- <div class="info">
19
- <p>Integrate User Registrations with Constant Contact . Adds members to lists based on their membership level. (Note: works without PMPro as well.)</p>
20
- <div class="actions">
21
- <?php if($addon['enabled']) { ?>
22
- <a href="<?php echo admin_url("plugins.php");?>" class="button">Enabled</a>
23
- <?php } elseif(file_exists(dirname(__FILE__) . "/../../../pmpro-constant-contact/pmpro-constant-contact.php")) { ?>
24
- <a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-constant-contact/pmpro-constant-contact.php'), 'activate-plugin_pmpro-constant-contact/pmpro-constant-contact.php')?>" class="button button-primary">Activate</a>
25
- <?php } else { ?>
26
- <a href="<?php echo wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=pmpro-constant-contact'), 'install-plugin_pmpro-constant-contact'); ?>" class="button button-primary">Download</a>
27
- <?php } ?>
28
- </div>
29
- </div> <!-- end info -->
30
- <?php
31
- }
adminpages/addons/pmpro-disable-emails.php DELETED
@@ -1,28 +0,0 @@
1
- <?php
2
- /*
3
- Addon: PMPro Disable PMPro Emails
4
- Slug: pmpro-disable-emails
5
- */
6
- pmpro_add_addon('gists', array(
7
- 'title' => 'PMPro Disable Emails',
8
- 'version' => '.1',
9
- 'widget' => 'pmpro_addon_pmpro_disable_emails_widget',
10
- 'enabled' => function_exists('dae_pmpro_email_recipient')
11
- )
12
- );
13
-
14
- function pmpro_addon_pmpro_disable_emails_widget($addon)
15
- {
16
- ?>
17
- <div class="info">
18
- <p>Disable all or specific emails sent by the PMPro plugin.</p>
19
- <div class="actions">
20
- <?php if($addon['enabled']) { ?>
21
- <a target="_blank" href="https://gist.github.com/strangerstudios/3667545" class="button">Enabled</a>
22
- <?php } else { ?>
23
- <a target="_blank" href="https://gist.github.com/strangerstudios/3667545" class="button button-primary">View Gist</a>
24
- <?php } ?>
25
- </div>
26
- </div> <!-- end info -->
27
- <?php
28
- }
adminpages/addons/pmpro-email-templates.php DELETED
@@ -1,31 +0,0 @@
1
- <?php
2
- /*
3
- Addon: PMPro Email Templates Editor
4
- Slug: pmpro-email-templates-addon
5
- */
6
- pmpro_add_addon('repo', array(
7
- 'title' => 'PMPro Email Templates',
8
- 'version' => '.5.2',
9
- 'widget' => 'pmpro_addon_email_templates_widget',
10
- 'enabled' => function_exists('pmproet_scripts')
11
- )
12
- );
13
-
14
- function pmpro_addon_email_templates_widget($addon)
15
- {
16
- ?>
17
- <img class="addon-thumb" src="<?php echo PMPRO_URL?>/adminpages/addons/images/pmpro-email-templates.gif" />
18
- <div class="info">
19
- <p>Easily edit system-generated Email Templates from the WordPress admin.</p>
20
- <div class="actions">
21
- <?php if($addon['enabled']) { ?>
22
- <a href="http://wordpress.org/plugins/pmpro-email-templates-addon/" class="button">Enabled</a>
23
- <?php } elseif(file_exists(dirname(__FILE__) . "/../../../pmpro-email-templates-addon/pmpro-email-templates.php")) { ?>
24
- <a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-email-templates-addon/pmpro-email-templates.php'), 'activate-plugin_pmpro-email-templates-addon/pmpro-email-templates.php')?>" class="button button-primary">Activate</a>
25
- <?php } else { ?>
26
- <a href="<?php echo wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=pmpro-email-templates-addon'), 'install-plugin_pmpro-email-templates-addon'); ?>" class="button button-primary">Download</a>
27
- <?php } ?>
28
- </div>
29
- </div> <!-- end info -->
30
- <?php
31
- }
adminpages/addons/pmpro-expiration.php DELETED
@@ -1,30 +0,0 @@
1
- <?php
2
- /*
3
- Addon: PMPro Expiration Date
4
- Slug: pmpro-expiration
5
- */
6
- pmpro_add_addon('github', array(
7
- 'title' => 'PMPro Set Expiration Dates',
8
- 'version' => '.1.1',
9
- 'widget' => 'pmpro_addon_pmpro_expiration_widget',
10
- 'enabled' => function_exists('pmprosed_pmpro_checkout_level')
11
- )
12
- );
13
-
14
- function pmpro_addon_pmpro_expiration_widget($addon)
15
- {
16
- ?>
17
- <div class="info">
18
- <p>Set a specific expiration date (e.g. 2013-12-31) for a PMPro membership level or discount code.</p>
19
- <div class="actions">
20
- <?php if($addon['enabled']) { ?>
21
- <a href="https://github.com/strangerstudios/pmpro-set-expiration-dates/blob/master/readme.txt" class="button">Enabled</a>
22
- <?php } elseif(file_exists(dirname(__FILE__) . "/../../../pmpro-set-expiration-dates/pmpro-set-expiration-dates.php")) { ?>
23
- <a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-set-expiration-dates/pmpro-set-expiration-dates.php'), 'activate-plugin_pmpro-set-expiration-dates/pmpro-set-expiration-dates.php')?>" class="button button-primary">Activate</a>
24
- <?php } else { ?>
25
- <a href="http://www.paidmembershipspro.com/wp-content/uploads/plugins/pmpro-set-expiration-dates.zip" class="button button-primary">Download</a>
26
- <?php } ?>
27
- </div>
28
- </div> <!-- end info -->
29
- <?php
30
- }
adminpages/addons/pmpro-freeaddress.php DELETED
@@ -1,30 +0,0 @@
1
- <?php
2
- /*
3
- Addon: PMPro Require Name and Address for Free Level
4
- Slug: pmpro-freerequire
5
- */
6
- pmpro_add_addon('github', array(
7
- 'title' => 'PMPro Require Name/Address for Free Level',
8
- 'version' => '.2',
9
- 'widget' => 'pmpro_addon_pmpro_freerequire_widget',
10
- 'enabled' => function_exists('my_pmpro_checkout_boxes_require_address')
11
- )
12
- );
13
-
14
- function pmpro_addon_pmpro_freerequire_widget($addon)
15
- {
16
- ?>
17
- <div class="info">
18
- <p>Require name/address for free Membership Level checkout.</p>
19
- <div class="actions">
20
- <?php if($addon['enabled']) { ?>
21
- <a href="https://github.com/strangerstudios/pmpro-address-for-free-levels" class="button">Enabled</a>
22
- <?php } elseif(file_exists(dirname(__FILE__) . "/../../../pmpro-address-for-free-levels/pmpro-address-for-free-levels.php")) { ?>
23
- <a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-address-for-free-levels/pmpro-address-for-free-levels.php'), 'activate-plugin_pmpro-address-for-free-levels/pmpro-address-for-free-levels.php')?>" class="button button-primary">Activate</a>
24
- <?php } else { ?>
25
- <a href="http://www.paidmembershipspro.com/wp-content/uploads/plugins/pmpro-address-for-free-levels.zip" class="button button-primary">Download</a>
26
- <?php } ?>
27
- </div>
28
- </div> <!-- end info -->
29
- <?php
30
- }
adminpages/addons/pmpro-infusionsoft.php DELETED
@@ -1,31 +0,0 @@
1
- <?php
2
- /*
3
- Addon: PMPro Infusionsoft Integration
4
- Slug: pmpro-infusionsoft
5
- */
6
- pmpro_add_addon('thirdparty', array(
7
- 'title' => 'PMPro Infusionsoft Integration',
8
- 'version' => '1.2',
9
- 'widget' => 'pmpro_addon_pmpro_infusionsoft_widget',
10
- 'enabled' => function_exists('pmprois_init')
11
- )
12
- );
13
-
14
- function pmpro_addon_pmpro_infusionsoft_widget($addon)
15
- {
16
- ?>
17
- <img class="addon-thumb" src="<?php echo PMPRO_URL?>/adminpages/addons/images/pmpro-infusionsoft.jpg" />
18
- <div class="info">
19
- <p>Integrate with Infusionsoft. Add members to email lists (groups, tags) based on their membership level. (Note: works without PMPro as well.)</p>
20
- <div class="actions">
21
- <?php if($addon['enabled']) { ?>
22
- <a href="<?php echo admin_url("plugins.php");?>" class="button">Enabled</a>
23
- <?php } elseif(file_exists(dirname(__FILE__) . "/../../../pmpro-infusionsoft/pmpro-infusionsoft.php")) { ?>
24
- <a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-infusionsoft/pmpro-infusionsoft.php'), 'activate-plugin_pmpro-infusionsoft/pmpro-infusionsoft.php')?>" class="button button-primary">Activate</a>
25
- <?php } else { ?>
26
- <a href="<?php echo wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=pmpro-infusionsoft'), 'install-plugin_pmpro-infusionsoft'); ?>" class="button button-primary">Download</a>
27
- <?php } ?>
28
- </div>
29
- </div> <!-- end info -->
30
- <?php
31
- }
adminpages/addons/pmpro-international-addresses.php DELETED
@@ -1,31 +0,0 @@
1
- <?php
2
- /*
3
- Addon: PMPro International Addresses
4
- Slug: pmpro-international-addresses
5
- */
6
- pmpro_add_addon('github', array(
7
- 'title' => 'PMPro International Addresses',
8
- 'version' => '.2.2',
9
- 'widget' => 'pmpro_addon_pmpro_international_addresses_widget',
10
- 'enabled' => function_exists('pmproia_pmpro_international_addresses')
11
- )
12
- );
13
-
14
- function pmpro_addon_pmpro_international_addresses_widget($addon)
15
- {
16
- ?>
17
- <?php /* <img class="addon-thumb" src="<?php echo PMPRO_URL?>/adminpages/addons/images/pmpro-international-addresses.jpg" /> */ ?>
18
- <div class="info">
19
- <p>Adds long form addresses to the PMPro checkout.</p>
20
- <div class="actions">
21
- <?php if($addon['enabled']) { ?>
22
- <a href="https://github.com/strangerstudios/pmpro-international-addresses/" class="button">Enabled</a>
23
- <?php } elseif(file_exists(dirname(__FILE__) . "/../../../pmpro-international-addresses/pmpro-international-addresses.php")) { ?>
24
- <a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-international-addresses/pmpro-international-addresses.php'), 'activate-plugin_pmpro-international-addresses/pmpro-international-addresses.php')?>" class="button button-primary">Activate</a>
25
- <?php } else { ?>
26
- <a href="http://www.paidmembershipspro.com/wp-content/uploads/plugins/pmpro-international-addresses.zip" class="button button-primary">Download</a>
27
- <?php } ?>
28
- </div>
29
- </div> <!-- end info -->
30
- <?php
31
- }
adminpages/addons/pmpro-level-cost-text.php DELETED
@@ -1,30 +0,0 @@
1
- <?php
2
- /*
3
- Addon: PMPro Custom Level Cost Text
4
- Slug: pmpro-level-cost-text
5
- */
6
- pmpro_add_addon('github', array(
7
- 'title' => 'PMPro Level Cost Text',
8
- 'version' => '.2',
9
- 'widget' => 'pmpro_addon_pmpro_level_cost_text_widget',
10
- 'enabled' => function_exists('pclct_pmpro_discount_code_after_level_settings')
11
- )
12
- );
13
-
14
- function pmpro_addon_pmpro_level_cost_text_widget($addon)
15
- {
16
- ?>
17
- <div class="info">
18
- <p>Adds a "level cost text" field to PMPro Membership Levels and Discount Codes to allow you to override the automatically generated level cost text PMPro provides.</p>
19
- <div class="actions">
20
- <?php if($addon['enabled']) { ?>
21
- <a href="https://github.com/strangerstudios/pmpro-level-cost-text/blob/master/readme.txt" class="button">Enabled</a>
22
- <?php } elseif(file_exists(dirname(__FILE__) . "/../../../pmpro-level-cost-text/pmpro-level-cost-text.php")) { ?>
23
- <a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-level-cost-text/pmpro-level-cost-text.php'), 'activate-plugin_pmpro-level-cost-text/pmpro-level-cost-text.php')?>" class="button button-primary">Activate</a>
24
- <?php } else { ?>
25
- <a href="http://www.paidmembershipspro.com/wp-content/uploads/plugins/pmpro-level-cost-text.zip" class="button button-primary">Download</a>
26
- <?php } ?>
27
- </div>
28
- </div> <!-- end info -->
29
- <?php
30
- }
adminpages/addons/pmpro-mailchimp.php DELETED
@@ -1,31 +0,0 @@
1
- <?php
2
- /*
3
- Addon: PMPro MailChimp Integration
4
- Slug: pmpro-mailchimp
5
- */
6
- pmpro_add_addon('thirdparty', array(
7
- 'title' => 'PMPro MailChimp Integration',
8
- 'version' => '1.0',
9
- 'widget' => 'pmpro_addon_pmpro_mailchimp_widget',
10
- 'enabled' => function_exists('pmpromc_init')
11
- )
12
- );
13
-
14
- function pmpro_addon_pmpro_mailchimp_widget($addon)
15
- {
16
- ?>
17
- <img class="addon-thumb" src="<?php echo PMPRO_URL?>/adminpages/addons/images/pmpro-mailchimp.jpg" />
18
- <div class="info">
19
- <p>Integrate User Registrations with Mailchimp. Adds members to lists based on their membership level. (Note: works without PMPro as well.)</p>
20
- <div class="actions">
21
- <?php if($addon['enabled']) { ?>
22
- <a href="<?php echo admin_url("plugins.php");?>" class="button">Enabled</a>
23
- <?php } elseif(file_exists(dirname(__FILE__) . "/../../../pmpro-mailchimp/pmpro-mailchimp.php")) { ?>
24
- <a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-mailchimp/pmpro-mailchimp.php'), 'activate-plugin_pmpro-mailchimp/pmpro-mailchimp.php')?>" class="button button-primary">Activate</a>
25
- <?php } else { ?>
26
- <a href="<?php echo wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=pmpro-mailchimp'), 'install-plugin_pmpro-mailchimp'); ?>" class="button button-primary">Download</a>
27
- <?php } ?>
28
- </div>
29
- </div> <!-- end info -->
30
- <?php
31
- }
adminpages/addons/pmpro-network-subsite.php DELETED
@@ -1,31 +0,0 @@
1
- <?php
2
- /*
3
- Addon: PMPro Network
4
- Slug: pmpro-network-subsite
5
- */
6
- pmpro_add_addon('github', array(
7
- 'title' => 'PMPro Network Subsite Helper',
8
- 'version' => '.2',
9
- 'widget' => 'pmpro_addon_pmpro_network_subsite_widget',
10
- 'enabled' => function_exists('pmpron_subsite_activated_plugin')
11
- )
12
- );
13
-
14
- function pmpro_addon_pmpro_network_subsite_widget($addon)
15
- {
16
- ?>
17
- <img class="addon-thumb" src="<?php echo PMPRO_URL?>/adminpages/addons/images/pmpro-network.gif" />
18
- <div class="info">
19
- <p>Have network subsites use membership data from a "main" site to handle access restrictions.</p>
20
- <div class="actions">
21
- <?php if($addon['enabled']) { ?>
22
- <a href="https://github.com/strangerstudios/pmpro-network-subsite" class="button">Enabled</a>
23
- <?php } elseif(file_exists(dirname(__FILE__) . "/../../../pmpro-network-subsite/pmpro-network-subsite.php")) { ?>
24
- <a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-network-subsite/pmpro-network-subsite.php'), 'activate-plugin_pmpro-network-subsite/pmpro-network-subsite.php')?>" class="button button-primary">Activate</a>
25
- <?php } else { ?>
26
- <a href="http://www.paidmembershipspro.com/wp-content/uploads/plugins/pmpro-network-subsite.zip" class="button button-primary">Download</a>
27
- <?php } ?>
28
- </div>
29
- </div> <!-- end info -->
30
- <?php
31
- }
adminpages/addons/pmpro-network.php DELETED
@@ -1,31 +0,0 @@
1
- <?php
2
- /*
3
- Addon: PMPro Network
4
- Slug: pmpro-network
5
- */
6
- pmpro_add_addon('github', array(
7
- 'title' => 'PMPro Network',
8
- 'version' => '.3.1',
9
- 'widget' => 'pmpro_addon_pmpro_network_widget',
10
- 'enabled' => function_exists('pmpron_new_blogs_settings')
11
- )
12
- );
13
-
14
- function pmpro_addon_pmpro_network_widget($addon)
15
- {
16
- ?>
17
- <img class="addon-thumb" src="<?php echo PMPRO_URL?>/adminpages/addons/images/pmpro-network.gif" />
18
- <div class="info">
19
- <p>Allow users to checkout for a membership to create a site on your WordPress multisite network.</p>
20
- <div class="actions">
21
- <?php if($addon['enabled']) { ?>
22
- <a href="https://github.com/strangerstudios/pmpro-network/blob/master/readme.txt" class="button">Enabled</a>
23
- <?php } elseif(file_exists(dirname(__FILE__) . "/../../../pmpro-network/pmpro-network.php")) { ?>
24
- <a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-network/pmpro-network.php'), 'activate-plugin_pmpro-network/pmpro-network.php')?>" class="button button-primary">Activate</a>
25
- <?php } else { ?>
26
- <a href="http://www.paidmembershipspro.com/wp-content/uploads/plugins/pmpro-network.zip" class="button button-primary">Download</a>
27
- <?php } ?>
28
- </div>
29
- </div> <!-- end info -->
30
- <?php
31
- }
adminpages/addons/pmpro-post-affiliate-pro.php DELETED
@@ -1,31 +0,0 @@
1
- <?php
2
- /*
3
- Addon: PMPro Post Affiliate Pro Integration
4
- Slug: pmpro-post-affiliate-pro
5
- */
6
- pmpro_add_addon('thirdparty', array(
7
- 'title' => 'PMPro Post Affiliate Pro Integration',
8
- 'version' => '.2.1.1',
9
- 'widget' => 'pmpro_addon_pmpro_post_affiliate_pro_widget',
10
- 'enabled' => function_exists('pap_pmpro_track_sale')
11
- )
12
- );
13
-
14
- function pmpro_addon_pmpro_post_affiliate_pro_widget($addon)
15
- {
16
- ?>
17
- <img class="addon-thumb" src="<?php echo PMPRO_URL?>/adminpages/addons/images/pmpro-post-affiliate-pro.jpg" />
18
- <div class="info">
19
- <p>Integrate Paid Memberships Pro with the Post Affiliate Pro platform.</p>
20
- <div class="actions">
21
- <?php if($addon['enabled']) { ?>
22
- <a href="https://github.com/strangerstudios/pmpro-post-affiliate-pro/blob/master/readme.txt" class="button">Enabled</a>
23
- <?php } elseif(file_exists(dirname(__FILE__) . "/../../../pmpro-post-affiliate-pro/pmpro-post-affiliate-pro.php")) { ?>
24
- <a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-post-affiliate-pro/pmpro-post-affiliate-pro.php'), 'activate-plugin_pmpro-post-affiliate-pro/pmpro-post-affiliate-pro.php')?>" class="button button-primary">Activate</a>
25
- <?php } else { ?>
26
- <a href="http://www.paidmembershipspro.com/wp-content/uploads/plugins/pmpro-post-affiliate-pro.zip" class="button button-primary">Download</a>
27
- <?php } ?>
28
- </div>
29
- </div> <!-- end info -->
30
- <?php
31
- }
adminpages/addons/pmpro-register-helper.php DELETED
@@ -1,31 +0,0 @@
1
- <?php
2
- /*
3
- Addon: PMPro Register Helper
4
- Slug: pmpro-register-helper
5
- */
6
- pmpro_add_addon('github', array(
7
- 'title' => 'PMPro Register Helper',
8
- 'version' => '.5.16.1',
9
- 'widget' => 'pmpro_addon_pmpro_register_helper_widget',
10
- 'enabled' => class_exists('PMProRH_Field')
11
- )
12
- );
13
-
14
- function pmpro_addon_pmpro_register_helper_widget($addon)
15
- {
16
- ?>
17
- <img class="addon-thumb" src="<?php echo PMPRO_URL?>/adminpages/addons/images/pmpro-register-helper.gif" />
18
- <div class="info">
19
- <p>Add additional meta fields to your PMPro checkout page and/or "Your Profile" pages. Support for text, select, multi-select, textarea, hidden, and custom HTML. Loop into existing checkout/profile field sections or add new ones.</p>
20
- <div class="actions">
21
- <?php if($addon['enabled']) { ?>
22
- <a href="https://github.com/strangerstudios/pmpro-register-helper/blob/master/readme.txt" class="button">Enabled</a>
23
- <?php } elseif(file_exists(dirname(__FILE__) . "/../../../pmpro-register-helper/pmpro-register-helper.php")) { ?>
24
- <a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-register-helper/pmpro-register-helper.php'), 'activate-plugin_pmpro-register-helper/pmpro-register-helper.php')?>" class="button button-primary">Activate</a>
25
- <?php } else { ?>
26
- <a href="http://www.paidmembershipspro.com/wp-content/uploads/plugins/pmpro-register-helper.zip" class="button button-primary">Download</a>
27
- <?php } ?>
28
- </div>
29
- </div> <!-- end info -->
30
- <?php
31
- }
adminpages/addons/pmpro-require-code-to-register.php DELETED
@@ -1,28 +0,0 @@
1
- <?php
2
- /*
3
- Addon: PMPro Require Code to Register
4
- Slug: pmpro-require-code-to-register
5
- */
6
- pmpro_add_addon('gists', array(
7
- 'title' => 'PMPro Require a Code to Register',
8
- 'version' => '.1',
9
- 'widget' => 'pmpro_addon_pmpro_require_code_to_register_widget',
10
- 'enabled' => function_exists('my_pmpro_registration_checks_require_code_to_register')
11
- )
12
- );
13
-
14
- function pmpro_addon_pmpro_require_code_to_register_widget($addon)
15
- {
16
- ?>
17
- <div class="info">
18
- <p>Require a discount code to checkout for a specific level.</p>
19
- <div class="actions">
20
- <?php if($addon['enabled']) { ?>
21
- <a target="_blank" href="https://gist.github.com/strangerstudios/5573829" class="button">Enabled</a>
22
- <?php } else { ?>
23
- <a target="_blank" href="https://gist.github.com/strangerstudios/5573829" class="button button-primary">View Gist</a>
24
- <?php } ?>
25
- </div>
26
- </div> <!-- end info -->
27
- <?php
28
- }
adminpages/addons/pmpro-series.php DELETED
@@ -1,31 +0,0 @@
1
- <?php
2
- /*
3
- Addon: PMPro Series
4
- Slug: pmpro-series
5
- */
6
- pmpro_add_addon('github', array(
7
- 'title' => 'PMPro Series',
8
- 'version' => '.3',
9
- 'widget' => 'pmpro_addon_pmpro_series_widget',
10
- 'enabled' => class_exists("PMProSeries")
11
- )
12
- );
13
-
14
- function pmpro_addon_pmpro_series_widget($addon)
15
- {
16
- ?>
17
- <img class="addon-thumb" src="<?php echo PMPRO_URL?>/adminpages/addons/images/pmpro-series.gif" />
18
- <div class="info">
19
- <p>"Drip feed" content to your members over the course of their membership. Serializes content by # of days post-registration.</p>
20
- <div class="actions">
21
- <?php if($addon['enabled']) { ?>
22
- <a href="<?php echo admin_url("edit.php?post_type=pmpro_series");?>" class="button">Enabled</a>
23
- <?php } elseif(file_exists(dirname(__FILE__) . "/../../../pmpro-series/pmpro-series.php")) { ?>
24
- <a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-series/pmpro-series.php'), 'activate-plugin_pmpro-series/pmpro-series.php')?>" class="button button-primary">Activate</a>
25
- <?php } else { ?>
26
- <a href="http://www.paidmembershipspro.com/wp-content/uploads/plugins/pmpro-series.zip" class="button button-primary">Download</a>
27
- <?php } ?>
28
- </div>
29
- </div> <!-- end info -->
30
- <?php
31
- }
adminpages/addons/pmpro-shipping.php DELETED
@@ -1,31 +0,0 @@
1
- <?php
2
- /*
3
- Addon: PMPro Shipping Add On
4
- Slug: pmpro-shipping
5
- */
6
- pmpro_add_addon('github', array(
7
- 'title' => 'PMPro Shipping Add On',
8
- 'version' => '.2.6',
9
- 'widget' => 'pmpro_addon_pmpro_shipping_widget',
10
- 'enabled' => function_exists('pmproship_pmpro_checkout_boxes')
11
- )
12
- );
13
-
14
- function pmpro_addon_pmpro_shipping_widget($addon)
15
- {
16
- ?>
17
- <?php /* <img class="addon-thumb" src="<?php echo PMPRO_URL?>/adminpages/addons/images/pmpro-shipping.jpg" /> */ ?>
18
- <div class="info">
19
- <p>Adds shipping fields to the checkout page, confirmation page, confirmation emails, member's list and edit user profile pages.</p>
20
- <div class="actions">
21
- <?php if($addon['enabled']) { ?>
22
- <a href="https://github.com/strangerstudios/pmpro-shipping/" class="button">Enabled</a>
23
- <?php } elseif(file_exists(dirname(__FILE__) . "/../../../pmpro-shipping/pmpro-shipping.php")) { ?>
24
- <a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-shipping/pmpro-shipping.php'), 'activate-plugin_pmpro-shipping/pmpro-shipping.php')?>" class="button button-primary">Activate</a>
25
- <?php } else { ?>
26
- <a href="http://www.paidmembershipspro.com/wp-content/uploads/plugins/pmpro-shipping.zip" class="button button-primary">Download</a>
27
- <?php } ?>
28
- </div>
29
- </div> <!-- end info -->
30
- <?php
31
- }
adminpages/addons/pmpro-user-pages.php DELETED
@@ -1,30 +0,0 @@
1
- <?php
2
- /*
3
- Addon: PMPro User Pages
4
- Slug: pmpro-user-pages
5
- */
6
- pmpro_add_addon('github', array(
7
- 'title' => 'PMPro User Pages',
8
- 'version' => '.3',
9
- 'widget' => 'pmpro_addon_pmpro_user_pages_widget',
10
- 'enabled' => function_exists('pmproup_pmpro_after_checkout')
11
- )
12
- );
13
-
14
- function pmpro_addon_pmpro_user_pages_widget($addon)
15
- {
16
- ?>
17
- <div class="info">
18
- <p>Creates a unique page for each Member after checkout, giving the Admin access to write customized content for each specific member.</p>
19
- <div class="actions">
20
- <?php if($addon['enabled']) { ?>
21
- <a href="https://github.com/strangerstudios/pmpro-user-pages/blob/master/readme.txt" class="button">Enabled</a>
22
- <?php } elseif(file_exists(dirname(__FILE__) . "/../../../pmpro-user-pages/pmpro-user-pages.php")) { ?>
23
- <a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-user-pages/pmpro-user-pages.php'), 'activate-plugin_pmpro-user-pages/pmpro-user-pages.php')?>" class="button button-primary">Activate</a>
24
- <?php } else { ?>
25
- <a href="http://www.paidmembershipspro.com/wp-content/uploads/plugins/pmpro-user-pages.zip" class="button button-primary">Download</a>
26
- <?php } ?>
27
- </div>
28
- </div> <!-- end info -->
29
- <?php
30
- }
adminpages/addons/pmpro-woocommerce.php DELETED
@@ -1,31 +0,0 @@
1
- <?php
2
- /*
3
- Addon: PMPro WooCommerce
4
- Slug: pmpro-woocommerce
5
- */
6
- pmpro_add_addon('thirdparty', array(
7
- 'title' => 'PMPro WooCommerce',
8
- 'version' => '1.2.2',
9
- 'widget' => 'pmpro_addon_pmpro_woocommerce_widget',
10
- 'enabled' => function_exists('pmprowoo_add_membership_from_order')
11
- )
12
- );
13
-
14
- function pmpro_addon_pmpro_woocommerce_widget($addon)
15
- {
16
- ?>
17
- <img class="addon-thumb" src="<?php echo PMPRO_URL?>/adminpages/addons/images/pmpro-woocommerce.gif" />
18
- <div class="info">
19
- <p>Use <a href="http://www.woothemes.com/woocommerce/">WooCommerce</a> to purchase membership levels or set members-only product pricing.</p>
20
- <div class="actions">
21
- <?php if($addon['enabled']) { ?>
22
- <a href="<?php echo admin_url("plugins.php");?>" class="button">Enabled</a>
23
- <?php } elseif(file_exists(dirname(__FILE__) . "/../../../pmpro-woocommerce/pmpro-woocommerce.php")) { ?>
24
- <a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-woocommerce/pmpro-woocommerce.php'), 'activate-plugin_pmpro-woocommerce/pmpro-woocommerce.php')?>" class="button button-primary">Activate</a>
25
- <?php } else { ?>
26
- <a href="<?php echo wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=pmpro-woocommerce'), 'install-plugin_pmpro-woocommerce'); ?>" class="button button-primary">Download</a>
27
- <?php } ?>
28
- </div>
29
- </div> <!-- end info -->
30
- <?php
31
- }
adminpages/addons/pmpro-wp-affiliate.php DELETED
@@ -1,31 +0,0 @@
1
- <?php
2
- /*
3
- Addon: PMPro WP Affiliate Platform Integration
4
- Slug: pmpro-wp-affiliate
5
- */
6
- pmpro_add_addon('thirdparty', array(
7
- 'title' => 'PMPro WP Affiliate Platform Integration',
8
- 'version' => '.3',
9
- 'widget' => 'pmpro_addon_pmpro_wp_affiliate_widget',
10
- 'enabled' => function_exists('wpa_pmpro_after_checkout')
11
- )
12
- );
13
-
14
- function pmpro_addon_pmpro_wp_affiliate_widget($addon)
15
- {
16
- ?>
17
- <img class="addon-thumb" src="<?php echo PMPRO_URL?>/adminpages/addons/images/pmpro-wp-affiliate-platform.jpg" />
18
- <div class="info">
19
- <p>Process an affiliate via WP Affiliate Platform after a PMPro checkout.</p>
20
- <div class="actions">
21
- <?php if($addon['enabled']) { ?>
22
- <a href="https://github.com/strangerstudios/pmpro-wp-affiliate-platform/" class="button">Enabled</a>
23
- <?php } elseif(file_exists(dirname(__FILE__) . "/../../../pmpro-wp-affiliate-platform/pmpro-wp-affiliate-platform.php")) { ?>
24
- <a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-wp-affiliate-platform/pmpro-wp-affiliate-platform.php'), 'activate-plugin_pmpro-wp-affiliate-platform/pmpro-wp-affiliate-platform.php')?>" class="button button-primary">Activate</a>
25
- <?php } else { ?>
26
- <a href="http://www.paidmembershipspro.com/wp-content/uploads/plugins/pmpro-wp-affiliate-platform.zip" class="button button-primary">Download</a>
27
- <?php } ?>
28
- </div>
29
- </div> <!-- end info -->
30
- <?php
31
- }
adminpages/addons/tml.php DELETED
@@ -1,32 +0,0 @@
1
- <?php
2
- /*
3
- Addon: Theme My Login
4
- Slug: pmpro-tml
5
- */
6
- pmpro_add_addon('recommended', array(
7
- 'title' => 'Theme My Login',
8
- 'widget' => 'pmpro_addon_tml_widget',
9
- 'enabled' => class_exists('Theme_My_Login'),
10
- 'version' => '6.3.10'
11
- )
12
- );
13
-
14
- function pmpro_addon_tml_widget($addon)
15
- {
16
- ?>
17
- <div class="info">
18
- <p>This plugin themes the WordPress login, registration and forgot password pages according to your current theme. By <a href="http://www.jfarthing.com/" target="_blank">Jeff Farthing</a></p>
19
- <div class="actions">
20
- <form method="post" name="component-actions" action="">
21
- <?php if($addon['enabled']) { ?>
22
- <a href="<?php echo admin_url("plugins.php");?>" class="button">Enabled</a>
23
- <?php } elseif(file_exists(dirname(__FILE__) . "/../../../theme-my-login/theme-my-login.php")) { ?>
24
- <a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=theme-my-login/theme-my-login.php'), 'activate-plugin_theme-my-login/theme-my-login.php')?>" class="button button-primary">Activate</a>
25
- <?php } else { ?>
26
- <a href="<?php echo wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=theme-my-login'), 'install-plugin_theme-my-login'); ?>" class="button button-primary">Download</a>
27
- <?php } ?>
28
- </form>
29
- </div>
30
- </div> <!-- end info -->
31
- <?php
32
- }
adminpages/addons/wp-bouncer.php DELETED
@@ -1,31 +0,0 @@
1
- <?php
2
- /*
3
- Addon: WP Bouncer
4
- Slug: wp-bouncer
5
- */
6
- pmpro_add_addon('repo', array(
7
- 'title' => 'WP Bouncer',
8
- 'version' => '1.1',
9
- 'widget' => 'pmpro_addon_wp_bouncer_widget',
10
- 'enabled' => class_exists('WP_Bouncer')
11
- )
12
- );
13
-
14
- function pmpro_addon_wp_bouncer_widget($addon)
15
- {
16
- ?>
17
- <img class="addon-thumb" src="<?php echo PMPRO_URL?>/adminpages/addons/images/wp-bouncer.gif" />
18
- <div class="info">
19
- <p>Make sure users are only logged in from one computer or device at a time.</p>
20
- <div class="actions">
21
- <?php if($addon['enabled']) { ?>
22
- <a href="http://wordpress.org/plugins/wp-bouncer/" class="button">Enabled</a>
23
- <?php } elseif(file_exists(dirname(__FILE__) . "/../../../wp-bouncer/wp-bouncer.php")) { ?>
24
- <a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=wp-bouncer/wp-bouncer.php'), 'activate-plugin_wp-bouncer/wp-bouncer.php')?>" class="button button-primary">Activate</a>
25
- <?php } else { ?>
26
- <a href="<?php echo wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=wp-bouncer'), 'install-plugin_wp-bouncer'); ?>" class="button button-primary">Download</a>
27
- <?php } ?>
28
- </div>
29
- </div> <!-- end info -->
30
- <?php
31
- }
adminpages/admin_header.php CHANGED
@@ -22,11 +22,11 @@
22
if(empty($msg))
23
$msg = -1;
24
if(empty($pmpro_level_ready) && empty($edit))
25
- $msgt .= " <a href=\"?page=pmpro-membershiplevels&edit=-1\">" . __("Add a membership level to get started.", "pmpro") . "</a>";
26
elseif($pmpro_level_ready && !$pmpro_pages_ready && $view != "pmpro-pagesettings")
27
- $msgt .= " <a href=\"?page=pmpro-pagesettings\">" . __("Set up the membership pages", "pmpro") . "</a>.";
28
elseif($pmpro_level_ready && $pmpro_pages_ready && !$pmpro_gateway_ready && $view != "pmpro-paymentsettings")
29
- $msgt .= " <a href=\"?page=pmpro-paymentsettings\">" . __("Set up your SSL certificate and payment gateway", "pmpro") . "</a>.";
30
31
if(empty($msgt))
32
$msg = false;
@@ -49,7 +49,7 @@
49
elseif($view == "pmpro-membershiplevels")
50
$msgt .= " " . __("The levels with issues are highlighted below.", "pmpro");
51
else
52
- $msgt .= " <a href=\"?page=pmpro-membershiplevels\">" . __("Please edit your levels", "pmpro") . "</a>.";
53
}
54
55
if(!pmpro_checkLevelForPayflowCompatibility())
@@ -69,7 +69,7 @@
69
elseif($view == "pmpro-membershiplevels")
70
$msgt .= " " . __("The levels with issues are highlighted below.", "pmpro");
71
else
72
- $msgt .= " <a href=\"?page=pmpro-membershiplevels\">" . __("Please edit your levels", "pmpro") . "</a>.";
73
}
74
75
if(!pmpro_checkLevelForBraintreeCompatibility())
@@ -89,7 +89,7 @@
89
elseif($view == "pmpro-membershiplevels")
90
$msgt .= " " . __("The levels with issues are highlighted below.", "pmpro");
91
else
92
- $msgt .= " <a href=\"?page=pmpro-membershiplevels\">" . __("Please edit your levels", "pmpro") . "</a>.";
93
}
94
95
if(!pmpro_checkLevelForTwoCheckoutCompatibility())
@@ -110,7 +110,7 @@
110
elseif($view == "pmpro-membershiplevels")
111
$msgt .= " " . __("The levels with issues are highlighted below.", "pmpro");
112
else
113
- $msgt .= " <a href=\"?page=pmpro-membershiplevels\">" . __("Please edit your levels", "pmpro") . "</a>.";
114
}
115
116
if(!empty($msg))
@@ -147,27 +147,27 @@
147
?>
148
<h2 class="nav-tab-wrapper">
149
<?php if(current_user_can('pmpro_membershiplevels')) { ?>
150
- <a href="admin.php?page=pmpro-membershiplevels" class="nav-tab<?php if($view == 'pmpro-membershiplevels') { ?> nav-tab-active<?php } ?>"><?php _e('Membership Levels', 'pmpro');?></a>
151
<?php } ?>
152
153
<?php if(current_user_can('pmpro_pagesettings')) { ?>
154
- <a href="admin.php?page=pmpro-pagesettings" class="nav-tab<?php if($view == 'pmpro-pagesettings') { ?> nav-tab-active<?php } ?>"><?php _e('Pages', 'pmpro');?></a>
155
<?php } ?>
156
157
<?php if(current_user_can('pmpro_paymentsettings')) { ?>
158
- <a href="admin.php?page=pmpro-paymentsettings" class="nav-tab<?php if($view == 'pmpro-paymentsettings') { ?> nav-tab-active<?php } ?>"><?php _e('Payment Gateway &amp; SSL', 'pmpro');?></a>
159
<?php } ?>
160
161
<?php if(current_user_can('pmpro_emailsettings')) { ?>
162
- <a href="admin.php?page=pmpro-emailsettings" class="nav-tab<?php if($view == 'pmpro-emailsettings') { ?> nav-tab-active<?php } ?>"><?php _e('Email', 'pmpro');?></a>
163
<?php } ?>
164
165
<?php if(current_user_can('pmpro_advancedsettings')) { ?>
166
- <a href="admin.php?page=pmpro-advancedsettings" class="nav-tab<?php if($view == 'pmpro-advancedsettings') { ?> nav-tab-active<?php } ?>"><?php _e('Advanced', 'pmpro');?></a>
167
<?php } ?>
168
169
<?php if(current_user_can('pmpro_addons')) { ?>
170
- <a href="admin.php?page=pmpro-addons" class="nav-tab<?php if($view == 'pmpro-addons') { ?> nav-tab-active<?php } ?>"><?php _e('Add Ons', 'pmpro');?></a>
171
<?php } ?>
172
</h2>
173
<?php } ?>
22
if(empty($msg))
23
$msg = -1;
24
if(empty($pmpro_level_ready) && empty($edit))
25
+ $msgt .= " <a href=\"" . admin_url('admin.php?page=pmpro-membershiplevels&edit=-1') . "\">" . __("Add a membership level to get started.", "pmpro") . "</a>";
26
elseif($pmpro_level_ready && !$pmpro_pages_ready && $view != "pmpro-pagesettings")
27
+ $msgt .= " <a href=\"" . admin_url('admin.php?page=pmpro-pagesettings') . "\">" . __("Set up the membership pages", "pmpro") . "</a>.";
28
elseif($pmpro_level_ready && $pmpro_pages_ready && !$pmpro_gateway_ready && $view != "pmpro-paymentsettings")
29
+ $msgt .= " <a href=\"" . admin_url('admin.php?page=pmpro-paymentsettings') . "\">" . __("Set up your SSL certificate and payment gateway", "pmpro") . "</a>.";
30
31
if(empty($msgt))
32
$msg = false;
49
elseif($view == "pmpro-membershiplevels")
50
$msgt .= " " . __("The levels with issues are highlighted below.", "pmpro");
51
else
52
+ $msgt .= " <a href=\"" . admin_url('admin.php?page=pmpro-membershiplevels') . "\">" . __("Please edit your levels", "pmpro") . "</a>.";
53
}
54
55
if(!pmpro_checkLevelForPayflowCompatibility())
69
elseif($view == "pmpro-membershiplevels")
70
$msgt .= " " . __("The levels with issues are highlighted below.", "pmpro");
71
else
72
+ $msgt .= " <a href=\"" . admin_url('admin.php?page=pmpro-membershiplevels') . "\">" . __("Please edit your levels", "pmpro") . "</a>.";
73
}
74
75
if(!pmpro_checkLevelForBraintreeCompatibility())
89
elseif($view == "pmpro-membershiplevels")
90
$msgt .= " " . __("The levels with issues are highlighted below.", "pmpro");
91
else
92
+ $msgt .= " <a href=\"" . admin_url('admin.php?page=pmpro-membershiplevels') . "\">" . __("Please edit your levels", "pmpro") . "</a>.";
93
}
94
95
if(!pmpro_checkLevelForTwoCheckoutCompatibility())
110
elseif($view == "pmpro-membershiplevels")
111
$msgt .= " " . __("The levels with issues are highlighted below.", "pmpro");
112
else
113
+ $msgt .= " <a href=\"" . admin_url('admin.php?page=pmpro-membershiplevels') . "\">" . __("Please edit your levels", "pmpro") . "</a>.";
114
}
115
116
if(!empty($msg))
147
?>
148
<h2 class="nav-tab-wrapper">
149
<?php if(current_user_can('pmpro_membershiplevels')) { ?>
150
+ <a href="<?php echo admin_url('admin.php?page=pmpro-membershiplevels');?>" class="nav-tab<?php if($view == 'pmpro-membershiplevels') { ?> nav-tab-active<?php } ?>"><?php _e('Membership Levels', 'pmpro');?></a>
151
<?php } ?>
152
153
<?php if(current_user_can('pmpro_pagesettings')) { ?>
154
+ <a href="<?php echo admin_url('admin.php?page=pmpro-pagesettings');?>" class="nav-tab<?php if($view == 'pmpro-pagesettings') { ?> nav-tab-active<?php } ?>"><?php _e('Pages', 'pmpro');?></a>
155
<?php } ?>
156
157
<?php if(current_user_can('pmpro_paymentsettings')) { ?>
158
+ <a href="<?php echo admin_url('admin.php?page=pmpro-paymentsettings');?>" class="nav-tab<?php if($view == 'pmpro-paymentsettings') { ?> nav-tab-active<?php } ?>"><?php _e('Payment Gateway &amp; SSL', 'pmpro');?></a>
159
<?php } ?>
160
161
<?php if(current_user_can('pmpro_emailsettings')) { ?>
162
+ <a href="<?php echo admin_url('admin.php?page=pmpro-emailsettings');?>" class="nav-tab<?php if($view == 'pmpro-emailsettings') { ?> nav-tab-active<?php } ?>"><?php _e('Email', 'pmpro');?></a>
163
<?php } ?>
164
165
<?php if(current_user_can('pmpro_advancedsettings')) { ?>
166
+ <a href="<?php echo admin_url('admin.php?page=pmpro-advancedsettings');?>" class="nav-tab<?php if($view == 'pmpro-advancedsettings') { ?> nav-tab-active<?php } ?>"><?php _e('Advanced', 'pmpro');?></a>
167
<?php } ?>
168
169
<?php if(current_user_can('pmpro_addons')) { ?>
170
+ <a href="<?php echo admin_url('admin.php?page=pmpro-addons');?>" class="nav-tab<?php if($view == 'pmpro-addons') { ?> nav-tab-active<?php } ?>"><?php _e('Add Ons', 'pmpro');?></a>
171
<?php } ?>
172
</h2>
173
<?php } ?>
adminpages/discountcodes.php CHANGED
@@ -606,6 +606,7 @@
606
}
607
else
608
{
609
foreach($codes as $code)
610
{
611
?>
606
}
607
else
608
{
609
+ $count = 0;
610
foreach($codes as $code)
611
{
612
?>
adminpages/functions.php CHANGED
@@ -221,7 +221,7 @@ function pmpro_checkLevelForTwoCheckoutCompatibility($level = NULL)
221
* @param string $field The name of the field to check.
222
* @param bool $force If true, it will rebuild the cached results.
223
*
224
- * @since 2.0
225
*/
226
function pmpro_getClassesForPaymentSettingsField($field, $force = false)
227
{
221
* @param string $field The name of the field to check.
222
* @param bool $force If true, it will rebuild the cached results.
223
*
224
+ * @since 1.8
225
*/
226
function pmpro_getClassesForPaymentSettingsField($field, $force = false)
227
{
adminpages/membershiplevels.php CHANGED
@@ -1,673 +1,682 @@
1
- <?php
2
- //only admins can get this
3
- if(!function_exists("current_user_can") || (!current_user_can("manage_options") && !current_user_can("pmpro_membershiplevels")))
4
- {
5
- die(__("You do not have permissions to perform this action.", "pmpro"));
6
- }
7
-
8
- global $wpdb, $msg, $msgt, $pmpro_currency_symbol;
9
-
10
- //some vars
11
- $gateway = pmpro_getOption("gateway");
12
- $pmpro_level_order = pmpro_getOption('level_order');
13
-
14
- global $pmpro_stripe_error, $pmpro_braintree_error, $pmpro_payflow_error, $pmpro_twocheckout_error, $wp_version;
15
-
16
- if(isset($_REQUEST['edit']))
17
- $edit = intval($_REQUEST['edit']);
18
- else
19
- $edit = false;
20
- if(isset($_REQUEST['copy']))
21
- $copy = intval($_REQUEST['copy']);
22
- if(isset($_REQUEST['s']))
23
- $s = sanitize_text_field($_REQUEST['s']);
24
- else
25
- $s = "";
26
-
27
- if(isset($_REQUEST['action']))
28
- $action = sanitize_text_field($_REQUEST['action']);
29
- else
30
- $action = false;
31
-
32
- if(isset($_REQUEST['saveandnext']))
33
- $saveandnext = intval($_REQUEST['saveandnext']);
34
-
35
- if(isset($_REQUEST['saveid']))
36
- $saveid = intval($_REQUEST['saveid']);
37
- if(isset($_REQUEST['deleteid']))
38
- $deleteid = intval($_REQUEST['deleteid']);
39
-
40
- if($action == "save_membershiplevel")
41
- {
42
- $ml_name = stripslashes($_REQUEST['name']);
43
- $ml_description = stripslashes($_REQUEST['description']);
44
- $ml_confirmation = stripslashes($_REQUEST['confirmation']);
45
- $ml_initial_payment = stripslashes($_REQUEST['initial_payment']);
46
- if(!empty($_REQUEST['recurring']))
47
- $ml_recurring = 1;
48
- else
49
- $ml_recurring = 0;
50
- $ml_billing_amount = stripslashes($_REQUEST['billing_amount']);
51
- $ml_cycle_number = stripslashes($_REQUEST['cycle_number']);
52
- $ml_cycle_period = stripslashes($_REQUEST['cycle_period']);
53
- $ml_billing_limit = stripslashes($_REQUEST['billing_limit']);
54
- if(!empty($_REQUEST['custom_trial']))
55
- $ml_custom_trial = 1;
56
- else
57
- $ml_custom_trial = 0;
58
- $ml_trial_amount = stripslashes($_REQUEST['trial_amount']);
59
- $ml_trial_limit = stripslashes($_REQUEST['trial_limit']);
60
- if(!empty($_REQUEST['expiration']))
61
- $ml_expiration = 1;
62
- else
63
- $ml_expiration = 0;
64
- $ml_expiration_number = stripslashes($_REQUEST['expiration_number']);
65
- $ml_expiration_period = stripslashes($_REQUEST['expiration_period']);
66
- $ml_categories = array();
67
-
68
- //reversing disable to allow here
69
- if(empty($_REQUEST['disable_signups']))
70
- $ml_allow_signups = 1;
71
- else
72
- $ml_allow_signups = 0;
73
-
74
- foreach ( $_REQUEST as $key => $value )
75
- {
76
- if ( $value == 'yes' && preg_match( '/^membershipcategory_(\d+)#x2F;i', $key, $matches ) )
77
- {
78
- $ml_categories[] = $matches[1];
79
- }
80
- }
81
-
82
- //clearing out values if checkboxes aren't checked
83
- if(empty($ml_recurring))
84
- {
85
- $ml_billing_amount = $ml_cycle_number = $ml_cycle_period = $ml_billing_limit = $ml_trial_amount = $ml_trial_limit = 0;
86
- }
87
- elseif(empty($ml_custom_trial))
88
- {
89
- $ml_trial_amount = $ml_trial_limit = 0;
90
- }
91
- if(empty($ml_expiration))
92
- {
93
- $ml_expiration_number = $ml_expiration_period = 0;
94
- }
95
-
96
- if($saveid > 0)
97
- {
98
- $sqlQuery = " UPDATE {$wpdb->pmpro_membership_levels}
99
- SET name = '" . esc_sql($ml_name) . "',
100
- description = '" . esc_sql($ml_description) . "',
101
- confirmation = '" . esc_sql($ml_confirmation) . "',
102
- initial_payment = '" . esc_sql($ml_initial_payment) . "',
103
- billing_amount = '" . esc_sql($ml_billing_amount) . "',
104
- cycle_number = '" . esc_sql($ml_cycle_number) . "',
105
- cycle_period = '" . esc_sql($ml_cycle_period) . "',
106
- billing_limit = '" . esc_sql($ml_billing_limit) . "',
107
- trial_amount = '" . esc_sql($ml_trial_amount) . "',
108
- trial_limit = '" . esc_sql($ml_trial_limit) . "',
109
- expiration_number = '" . esc_sql($ml_expiration_number) . "',
110
- expiration_period = '" . esc_sql($ml_expiration_period) . "',
111
- allow_signups = '" . esc_sql($ml_allow_signups) . "'
112
- WHERE id = '$saveid' LIMIT 1;";
113
- $wpdb->query($sqlQuery);
114
-
115
- pmpro_updateMembershipCategories( $saveid, $ml_categories );
116
- if(!mysql_errno())
117
- {
118
- $edit = false;
119
- $msg = 2;
120
- $msgt = __("Membership level updated successfully.", "pmpro");
121
- }
122
- else
123
- {
124
- $msg = -2;
125
- $msg = true;
126
- $msgt = __("Error updating membership level.", "pmpro");
127
- }
128
- }
129
- else
130
- {
131
- $sqlQuery = " INSERT INTO {$wpdb->pmpro_membership_levels}
132
- ( name, description, confirmation, initial_payment, billing_amount, cycle_number, cycle_period, billing_limit, trial_amount, trial_limit, expiration_number, expiration_period, allow_signups)
133
- VALUES
134
- ( '" . esc_sql($ml_name) . "', '" . esc_sql($ml_description) . "', '" . esc_sql($ml_confirmation) . "', '" . esc_sql($ml_initial_payment) . "', '" . esc_sql($ml_billing_amount) . "', '" . esc_sql($ml_cycle_number) . "', '" . esc_sql($ml_cycle_period) . "', '" . esc_sql($ml_billing_limit) . "', '" . esc_sql($ml_trial_amount) . "', '" . esc_sql($ml_trial_limit) . "', '" . esc_sql($ml_expiration_number) . "', '" . esc_sql($ml_expiration_period) . "', '" . esc_sql($ml_allow_signups) . "' )";
135
- $wpdb->query($sqlQuery);
136
- if(!mysql_errno())
137
- {
138
- $saveid = $wpdb->insert_id;
139
- pmpro_updateMembershipCategories( $saveid, $ml_categories );
140
-
141
- $edit = false;
142
- $msg = 1;
143
- $msgt = __("Membership level added successfully.", "pmpro");
144
- }
145
- else
146
- {
147
- $msg = -1;
148
- $msgt = __("Error adding membership level.", "pmpro");
149
- }
150
- }
151
-
152
- do_action("pmpro_save_membership_level", $saveid);
153
- }
154
- elseif($action == "delete_membership_level")
155
- {
156
- global $wpdb;
157
-
158
- $ml_id = intval($_REQUEST['deleteid']);
159
-
160
- if($ml_id > 0)
161
- {
162
- do_action("pmpro_delete_membership_level", $ml_id);
163
-
164
- //remove any categories from the ml
165
- $sqlQuery = "DELETE FROM $wpdb->pmpro_memberships_categories WHERE membership_id = '$ml_id'";
166
- $r1 = $wpdb->query($sqlQuery);
167
-
168
- //cancel any subscriptions to the ml
169
- $r2 = true;
170
- $user_ids = $wpdb->get_col("SELECT user_id FROM $wpdb->pmpro_memberships_users WHERE membership_id = '$ml_id' AND status = 'active'");
171
- foreach($user_ids as $user_id)
172
- {
173
- //change there membership level to none. that will handle the cancel
174
- if(pmpro_changeMembershipLevel(0, $user_id))
175
- {
176
- //okay
177
- }
178
- else
179
- {
180
- //couldn't delete the subscription
181
- //we should probably notify the admin
182
- $pmproemail = new PMProEmail();
183
- $pmproemail->data = array("body"=>"<p>" . sprintf(__("There was an error canceling the subscription for user with ID=%d. You will want to check your payment gateway to see if their subscription is still active.", "pmpro"), $user_id) . "</p>");
184
- $last_order = $wpdb->get_row("SELECT * FROM $wpdb->pmpro_membership_orders WHERE user_id = '" . $user_id . "' ORDER BY timestamp DESC LIMIT 1");
185
- if($last_order)
186
- $pmproemail->data["body"] .= "<p>" . __("Last Invoice", "pmpro") . ":<br />" . nl2br(var_export($last_order, true)) . "</p>";
187
- $pmproemail->sendEmail(get_bloginfo("admin_email"));
188
-
189
- $r2 = false;
190
- }
191
- }
192
-
193
- //delete the ml
194
- $sqlQuery = "DELETE FROM $wpdb->pmpro_membership_levels WHERE id = '$ml_id' LIMIT 1";
195
- $r3 = $wpdb->query($sqlQuery);
196
-
197
- if($r1 !== FALSE && $r2 !== FALSE && $r3 !== FALSE)
198
- {
199
- $msg = 3;
200
- $msgt = __("Membership level deleted successfully.", "pmpro");
201
- }
202
- else
203
- {
204
- $msg = -3;
205
- $msgt = __("Error deleting membership level.", "pmpro");
206
- }
207
- }
208
- else
209
- {
210
- $msg = -3;
211
- $msgt = __("Error deleting membership level.", "pmpro");
212
- }
213
- }
214
-
215
- require_once(dirname(__FILE__) . "/admin_header.php");
216
- ?>
217
-
218
- <?php
219
- if($edit)
220
- {
221
- ?>
222
-
223
- <h2>
224
- <?php
225
- if($edit > 0)
226
- echo __("Edit Membership Level", "pmpro");
227
- else
228
- echo __("Add New Membership Level", "pmpro");
229
- ?>
230
- </h2>
231
-
232
- <div>
233
- <?php
234
- // get the level...
235
- if(!empty($edit) && $edit > 0)
236
- {
237
- $level = $wpdb->get_row("SELECT * FROM $wpdb->pmpro_membership_levels WHERE id = '$edit' LIMIT 1", OBJECT);
238
- $temp_id = $level->id;
239
- }
240
- elseif(!empty($copy) && $copy > 0)
241
- {
242
- $level = $wpdb->get_row("SELECT * FROM $wpdb->pmpro_membership_levels WHERE id = '$copy' LIMIT 1", OBJECT);
243
- $temp_id = $level->id;
244
- $level->id = NULL;
245
- }
246
- else
247
-
248
- // didn't find a membership level, let's add a new one...
249
- if(empty($level))
250
- {
251
- $level = new stdClass();
252
- $level->id = NULL;
253
- $level->name = NULL;
254
- $level->description = NULL;
255
- $level->confirmation = NULL;
256
- $level->billing_amount = NULL;
257
- $level->trial_amount = NULL;
258
- $level->initial_payment = NULL;
259
- $level->billing_limit = NULL;
260
- $level->trial_limit = NULL;
261
- $level->expiration_number = NULL;
262
- $level->expiration_period = NULL;
263
- $edit = -1;
264
- }
265
-
266
- //defaults for new levels
267
- if(empty($copy) && $edit == -1)
268
- {
269
- $level->cycle_number = 1;
270
- $level->cycle_period = "Month";
271
- }
272
-
273
- // grab the categories for the given level...
274
- if(!empty($temp_id))
275
- $level->categories = $wpdb->get_col("SELECT c.category_id
276
- FROM $wpdb->pmpro_memberships_categories c
277
- WHERE c.membership_id = '" . $temp_id . "'");
278
- if(empty($level->categories))
279
- $level->categories = array();
280
-
281
- ?>
282
- <form action="" method="post" enctype="multipart/form-data">
283
- <input name="saveid" type="hidden" value="<?php echo esc_attr($edit); ?>" />
284
- <input type="hidden" name="action" value="save_membershiplevel" />
285
- <table class="form-table">
286
- <tbody>
287
- <tr>
288
- <th scope="row" valign="top"><label><?php _e('ID', 'pmpro');?>:</label></th>
289
- <td>
290
- <?php echo $level->id?>
291
- </td>
292
- </tr>
293
-
294
- <tr>
295
- <th scope="row" valign="top"><label for="name"><?php _e('Name', 'pmpro');?>:</label></th>
296
- <td><input name="name" type="text" size="50" value="<?php echo esc_attr($level->name);?>" /></td>
297
- </tr>
298
-
299
- <tr>
300
- <th scope="row" valign="top"><label for="description"><?php _e('Description', 'pmpro');?>:</label></th>
301
- <td>
302
- <div id="poststuff" class="pmpro_description">
303
- <?php
304
- if(version_compare($wp_version, "3.3") >= 0)
305
- wp_editor($level->description, "description", array("textarea_rows"=>5));
306
- else
307
- {
308
- ?>
309
- <textarea rows="10" cols="80" name="description" id="description"><?php echo esc_textarea($level->description);?></textarea>
310
- <?php
311
- }
312
- ?>
313
- </div>
314
- </td>
315
- </tr>
316
-
317
- <tr>
318
- <th scope="row" valign="top"><label for="confirmation"><?php _e('Confirmation Message', 'pmpro');?>:</label></th>
319
- <td>
320
- <div class="pmpro_confirmation">
321
- <?php
322
- if(version_compare($wp_version, "3.3") >= 0)
323
- wp_editor($level->confirmation, "confirmation", array("textarea_rows"=>5));
324
- else
325
- {
326
- ?>
327
- <textarea rows="10" cols="80" name="confirmation" id="confirmation"><?php echo esc_textarea($level->confirmation);?></textarea>
328
- <?php
329
- }
330
- ?>
331
- </div>
332
- </td>
333
- </tr>
334
- </tbody>
335
- </table>
336
-
337
- <h3 class="topborder"><?php _e('Billing Details', 'pmpro');?></h3>
338
- <table class="form-table">
339
- <tbody>
340
- <tr>
341
- <th scope="row" valign="top"><label for="initial_payment"><?php _e('Initial Payment', 'pmpro');?>:</label></th>
342
- <td>
343
- <?php
344
- if(pmpro_getCurrencyPosition() == "left")
345
- echo $pmpro_currency_symbol;
346
- ?>
347
- <input name="initial_payment" type="text" size="20" value="<?php echo esc_attr($level->initial_payment);?>" />
348
- <?php
349
- if(pmpro_getCurrencyPosition() == "right")
350
- echo $pmpro_currency_symbol;
351
- ?>
352
- <small><?php _e('The initial amount collected at registration.', 'pmpro');?></small></td>
353
- </tr>
354
-
355
- <tr>
356
- <th scope="row" valign="top"><label><?php _e('Recurring Subscription', 'pmpro');?>:</label></th>
357
- <td><input id="recurring" name="recurring" type="checkbox" value="yes" <?php if(pmpro_isLevelRecurring($level)) { echo "checked='checked'"; } ?> onclick="if(jQuery('#recurring').is(':checked')) { jQuery('.recurring_info').show(); if(jQuery('#custom_trial').is(':checked')) {jQuery('.trial_info').show();} else {jQuery('.trial_info').hide();} } else { jQuery('.recurring_info').hide();}" /> <label for="recurring"><?php _e('Check if this level has a recurring subscription payment.', 'pmpro');?></label></td>
358
- </tr>
359
-
360
- <tr class="recurring_info" <?php if(!pmpro_isLevelRecurring($level)) {?>style="display: none;"<?php } ?>>
361
- <th scope="row" valign="top"><label for="billing_amount"><?php _e('Billing Amount', 'pmpro');?>:</label></th>
362
- <td>
363
- <?php
364
- if(pmpro_getCurrencyPosition() == "left")
365
- echo $pmpro_currency_symbol;
366
- ?>
367
- <input name="billing_amount" type="text" size="20" value="<?php echo esc_attr($level->billing_amount);?>" />
368
- <?php
369
- if(pmpro_getCurrencyPosition() == "right")
370
- echo $pmpro_currency_symbol;
371
- ?>
372
- <small><?php _e('per', 'pmpro');?></small>
373
- <input id="cycle_number" name="cycle_number" type="text" size="10" value="<?php echo esc_attr($level->cycle_number);?>" />
374
- <select id="cycle_period" name="cycle_period">
375
- <?php
376
- $cycles = array( __('Day(s)', 'pmpro') => 'Day', __('Week(s)', 'pmpro') => 'Week', __('Month(s)', 'pmpro') => 'Month', __('Year(s)', 'pmpro') => 'Year' );
377
- foreach ( $cycles as $name => $value ) {
378
- echo "<option value='$value'";
379
- if ( $level->cycle_period == $value ) echo " selected='selected'";
380
- echo ">$name</option>";
381
- }
382
- ?>
383
- </select>
384
- <br /><small>
385
- <?php _e('The amount to be billed one cycle after the initial payment.', 'pmpro');?>
386
- <?php if($gateway == "stripe") { ?>
387
- <br /><strong <?php if(!empty($pmpro_stripe_error)) { ?>class="pmpro_red"<?php } ?>><?php _e('Stripe integration currently only supports billing periods of "Week", "Month" or "Year".', 'pmpro');?>
388
- <?php } elseif($gateway == "braintree") { ?>
389
- <br /><strong <?php if(!empty($pmpro_braintree_error)) { ?>class="pmpro_red"<?php } ?>><?php _e('Braintree integration currently only supports billing periods of "Month" or "Year".', 'pmpro');?>
390
- <?php } elseif($gateway == "payflowpro") { ?>
391
- <br /><strong <?php if(!empty($pmpro_payflow_error)) { ?>class="pmpro_red"<?php } ?>><?php _e('Payflow integration currently only supports billing frequencies of 1 and billing periods of "Week", "Month" or "Year".', 'pmpro');?>
392
- <?php } ?>
393
- </small>
394
- <?php if($gateway == "braintree" && $edit < 0) { ?>
395
- <p class="pmpro_message"><strong><?php _e('Note', 'pmpro');?>:</strong> <?php _e('After saving this level, make note of the ID and create a "Plan" in your Braintree dashboard with the same settings and the "Plan ID" set to <em>pmpro_#</em>, where # is the level ID.', 'pmpro');?></p>
396
- <?php } elseif($gateway == "braintree") { ?>
397
- <p class="pmpro_message"><strong><?php _e('Note', 'pmpro');?>:</strong> <?php _e('You will need to create a "Plan" in your Braintree dashboard with the same settings and the "Plan ID" set to', 'pmpro');?> <em>pmpro_<?php echo $level->id;?></em>.</p>
398
- <?php } ?>
399
- </td>
400
- </tr>
401
-
402
- <tr class="recurring_info" <?php if(!pmpro_isLevelRecurring($level)) {?>style="display: none;"<?php } ?>>
403
- <th scope="row" valign="top"><label for="billing_limit"><?php _e('Billing Cycle Limit', 'pmpro');?>:</label></th>
404
- <td>
405
- <input name="billing_limit" type="text" size="20" value="<?php echo $level->billing_limit?>" />
406
- <br /><small>
407
- <?php _e('The <strong>total</strong> number of recurring billing cycles for this level, including the trial period (if applicable) but not including the initial payment. Set to zero if membership is indefinite.', 'pmpro');?>
408
- <?php if($gateway == "stripe") { ?>
409
- <br /><strong <?php if(!empty($pmpro_stripe_error)) { ?>class="pmpro_red"<?php } ?>><?php _e('Stripe integration currently does not support billing limits. You can still set an expiration date below.', 'pmpro');?></strong>
410
- <?php } ?>
411
- </small>
412
- </td>
413
- </tr>
414
-
415
- <tr class="recurring_info" <?php if (!pmpro_isLevelRecurring($level)) echo "style='display:none;'";?>>
416
- <th scope="row" valign="top"><label><?php _e('Custom Trial', 'pmpro');?>:</label></th>
417
- <td>
418
- <input id="custom_trial" name="custom_trial" type="checkbox" value="yes" <?php if ( pmpro_isLevelTrial($level) ) { echo "checked='checked'"; } ?> onclick="jQuery('.trial_info').toggle();" /> <label for="custom_trial"><?php _e('Check to add a custom trial period.', 'pmpro');?></label>
419
-
420
- <?php if($gateway == "twocheckout") { ?>
421
- <br /><small><strong <?php if(!empty($pmpro_twocheckout_error)) { ?>class="pmpro_red"<?php } ?>><?php _e('2Checkout integration does not support custom trials. You can do one period trials by setting an initial payment different from the billing amount.', 'pmpro');?></strong></small>
422
- <?php } ?>
423
- </td>
424
- </tr>
425
-
426
- <tr class="trial_info recurring_info" <?php if (!pmpro_isLevelTrial($level)) echo "style='display:none;'";?>>
427
- <th scope="row" valign="top"><label for="trial_amount"><?php _e('Trial Billing Amount', 'pmpro');?>:</label></th>
428
- <td>
429
- <?php
430
- if(pmpro_getCurrencyPosition() == "left")
431
- echo $pmpro_currency_symbol;
432
- ?>
433
- <input name="trial_amount" type="text" size="20" value="<?php echo esc_attr($level->trial_amount);?>" />
434
- <?php
435
- if(pmpro_getCurrencyPosition() == "right")
436
- echo $pmpro_currency_symbol;
437
- ?>
438
- <small><?php _e('for the first', 'pmpro');?></small>
439
- <input name="trial_limit" type="text" size="10" value="<?php echo esc_attr($level->trial_limit);?>" />
440
- <small><?php _e('subscription payments', 'pmpro');?>.</small>
441
- <?php if($gateway == "stripe") { ?>
442
- <br /><small>
443
- <strong <?php if(!empty($pmpro_stripe_error)) { ?>class="pmpro_red"<?php } ?>><?php _e('Stripe integration currently does not support trial amounts greater than $0.', 'pmpro');?></strong>
444
- </small>
445
- <?php } elseif($gateway == "braintree") { ?>
446
- <br /><small>
447
- <strong <?php if(!empty($pmpro_braintree_error)) { ?>class="pmpro_red"<?php } ?>><?php _e('Braintree integration currently does not support trial amounts greater than $0.', 'pmpro');?></strong>
448
- </small>
449
- <?php } elseif($gateway == "payflowpro") { ?>
450
- <br /><small>
451
- <strong <?php if(!empty($pmpro_payflow_error)) { ?>class="pmpro_red"<?php } ?>><?php _e('Payflow integration currently does not support trial amounts greater than $0.', 'pmpro');?></strong>
452
- </small>
453
- <?php } ?>
454
- </td>
455
- </tr>
456
-
457
- </tbody>
458
- </table>
459
-
460
- <h3 class="topborder"><?php _e('Other Settings', 'pmpro');?></h3>
461
- <table class="form-table">
462
- <tbody>
463
- <tr>
464
- <th scope="row" valign="top"><label><?php _e('Disable New Signups', 'pmpro');?>:</label></th>
465
- <td><input id="disable_signups" name="disable_signups" type="checkbox" value="yes" <?php if($level->id && !$level->allow_signups) { ?>checked="checked"<?php } ?> /> <label for="disable_signups"><?php _e('Check to hide this level from the membership levels page and disable registration.', 'pmpro');?></label></td>
466
- </tr>
467
-
468
- <tr>
469
- <th scope="row" valign="top"><label><?php _e('Membership Expiration', 'pmpro');?>:</label></th>
470
- <td><input id="expiration" name="expiration" type="checkbox" value="yes" <?php if(pmpro_isLevelExpiring($level)) { echo "checked='checked'"; } ?> onclick="if(jQuery('#expiration').is(':checked')) { jQuery('.expiration_info').show(); } else { jQuery('.expiration_info').hide();}" /> <label for="expiration"><?php _e('Check this to set when membership access expires.', 'pmpro');?></a></td>
471
- </tr>
472
-
473
- <tr class="expiration_info" <?php if(!pmpro_isLevelExpiring($level)) {?>style="display: none;"<?php } ?>>
474
- <th scope="row" valign="top"><label for="billing_amount"><?php _e('Expires In', 'pmpro');?>:</label></th>
475
- <td>
476
- <input id="expiration_number" name="expiration_number" type="text" size="10" value="<?php echo esc_attr($level->expiration_number);?>" />
477
- <select id="expiration_period" name="expiration_period">
478
- <?php
479
- $cycles = array( __('Day(s)', 'pmpro') => 'Day', __('Week(s)', 'pmpro') => 'Week', __('Month(s)', 'pmpro') => 'Month', __('Year(s)', 'pmpro') => 'Year' );
480
- foreach ( $cycles as $name => $value ) {
481
- echo "<option value='$value'";
482
- if ( $level->expiration_period == $value ) echo " selected='selected'";
483
- echo ">$name</option>";
484
- }
485
- ?>
486
- </select>
487
- <br /><small><?php _e('Set the duration of membership access. Note that the any future payments (recurring subscription, if any) will be cancelled when the membership expires.', 'pmpro');?></small>
488
- </td>
489
- </tr>
490
- </tbody>
491
- </table>
492
-
493
- <?php do_action("pmpro_membership_level_after_other_settings"); ?>
494
-
495
- <h3 class="topborder"><?php _e('Content Settings', 'pmpro');?></h3>
496
- <table class="form-table">
497
- <tbody>
498
- <tr>
499
- <th scope="row" valign="top"><label><?php _e('Categories', 'pmpro');?>:</label></th>
500
- <td>
501
- <?php
502
- $categories = get_categories( array( 'hide_empty' => 0 ) );
503
- echo "<ul>";
504
- foreach ( $categories as $cat )
505
- {
506
- $checked = in_array( $cat->term_id, $level->categories ) ? "checked='checked'" : '';
507
- echo "<li><input id='membershipcategory_{$cat->term_id}' name='membershipcategory_{$cat->term_id}' type='checkbox' value='yes' $checked /> <label for='membershipcategory_{$cat->term_id}'>{$cat->name}</label></li>\n";
508
- }
509
- echo "</ul>";
510
- ?>
511
- </td>
512
- </tr>
513
- </tbody>
514
- </table>
515
- <p class="submit topborder">
516
- <input name="save" type="submit" class="button-primary" value="<?php _e('Save Level', 'pmpro'); ?>" />
517
- <input name="cancel" type="button" value="<?php _e('Cancel', 'pmpro'); ?>" onclick="location.href='<?php echo get_admin_url(NULL, '/admin.php?page=pmpro-membershiplevels')?>';" />
518
- </p>
519
- </form>
520
- </div>
521
-
522
- <?php
523
- }
524
- else
525
- {
526
- ?>
527
- <script>
528
- jQuery(document).ready(function($) {
529
-
530
- // Return a helper with preserved width of cells
531
- // from http://www.foliotek.com/devblog/make-table-rows-sortable-using-jquery-ui-sortable/
532
- var fixHelper = function(e, ui) {
533
- ui.children().each(function() {
534
- $(this).width($(this).width());
535
- });
536
- return ui;
537
- };
538
-
539
- $("table.membership-levels tbody").sortable({
540
- helper: fixHelper,
541
- placeholder: 'testclass',
542
- forcePlaceholderSize: true,
543
- update: update_level_order
544
- });
545
-
546
- function update_level_order(event, ui) {
547
- level_order = [];
548
- $("table.membership-levels tbody tr").each(function() {
549
- $(this).removeClass('alternate');
550
- level_order.push(parseInt( $("td:first", this).text()));
551
- });
552
-
553
- //update styles
554
- $("table.membership-levels tbody tr:odd").each(function() {
555
- $(this).addClass('alternate');
556
- });
557
-
558
- data = {
559
- action: 'pmpro_update_level_order',
560
- level_order: level_order
561
- };
562
-
563
- $.post(ajaxurl, data, function(response) {
564
- });
565
- }
566
- });
567
- </script>
568
-
569
- <h2 class="alignleft"><?php _e('Membership Levels', 'pmpro');?> <a href="admin.php?page=pmpro-membershiplevels&edit=-1" class="add-new-h2"><?php _e('Add New Level', 'pmpro');?></a></h2>
570
- <form id="posts-filter" method="get" action="">
571
- <p class="search-box">
572
- <label class="screen-reader-text" for="post-search-input"><?php _e('Search Levels', 'pmpro');?>:</label>
573
- <input type="hidden" name="page" value="pmpro-membershiplevels" />
574
- <input id="post-search-input" type="text" value="<?php echo esc_attr($s); ?>" name="s" size="30" />
575
- <input class="button" type="submit" value="<?php _e('Search Levels', 'pmpro');?>" id="search-submit" />
576
- </p>
577
- </form>
578
- <br class="clear" />
579
- <p><?php _e('Drag and drop membership levels to reorder them on the Levels page.', 'pmpro'); ?></p>
580
- <table class="widefat membership-levels">
581
- <thead>
582
- <tr>
583
- <th><?php _e('ID', 'pmpro');?></th>
584
- <th><?php _e('Name', 'pmpro');?></th>
585
- <th><?php _e('Billing Details', 'pmpro');?></th>
586
- <th><?php _e('Expiration', 'pmpro');?></th>
587
- <th><?php _e('Allow Signups', 'pmpro');?></th>
588
- <th></th>
589
- </tr>
590
- </thead>
591
- <tbody>
592
- <?php
593
- $sqlQuery = "SELECT * FROM $wpdb->pmpro_membership_levels ";
594
- if($s)
595
- $sqlQuery .= "WHERE name LIKE '%$s%' ";
596
- $sqlQuery .= "ORDER BY id ASC";
597
-
598
- $levels = $wpdb->get_results($sqlQuery, OBJECT);
599
-
600
- if(!empty($pmpro_level_order)) {
601
- //reorder levels
602
- $order = explode(',', $pmpro_level_order);
603
-
604
- //put level ids in their own array
605
- $level_ids = array();
606
- foreach($levels as $level)
607
- $level_ids[] = $level->id;
608