Version Description
- BUG: Fixed broken links when adminpages/admin_header.php is loaded outside of the PMPro settings tabs.
- BUG: Fixed issue with PMPro page templates being loaded from child themes. (Thanks, SeventhQueen)
- BUG: Fixed bug where gateway subscriptions would sometimes be cancelled even if an admin unchecked the "cancel at gateway" option when changing a users level on the edit user page. (Thanks, Scott Noelle)
- ENHANCEMENT: Added debugging to the Braintree webhook. Use define('PMPRO_BRAINTREE_WEBHOOK_DEBUG', true); in your wp-config.php to have debug emails sent to the admin when the Braintree webhook is hit.
- ENHANCEMENT: Updated email fields on checkout and billing update form to use the "email" field type instead of "text". If you need to revert this back to "text" type, use the pmpro_email_field_type filter like this: apply_filters('pmpro_email_field_type', '__return_false'); (Thanks, Yann Kozon)
- ENHANCEMENT: French translation updated and now includes email templates. (Thanks, Jean-Christophe Michel)
- ENHANCEMENT: Added the pmpro_is_ready filter. This should be used by gateway plugins to set the $pmpro_gateway_ready global variable.
- ENHANCEMENT: Added pmpro_memberslist_per_page and pmpro_orders_per_page filters to change the default number of items to show on those admin pages.
- ENHANCEMENT: Added pmpro_new_user and pmpro_new_user_setup hooks to allow for alterring the user creation code at checkout. For an example of how to use these see (https://github.com/strangerstudios/paid-memberships-pro/pull/224). (Thanks, David Crabill)
- ENHANCEMENT: Now setting the Stripe API version in the Stripe class. (Set to version "2015-07-13" right now.) This ensures that Stripe processes PMPro API calls correctly. We will update this to the latest versions as they come out and we test PMPro against them. You will still need to update the API version in the Account Settings of your Stripe dashboard to versio 2015-07-13 (or later as we update the version we work against) so webhook events originating from Stripe are sent out in the correct format.
Download this release
Release Info
Developer | strangerstudios |
Plugin | ![]() |
Version | 1.8.4.5 |
Comparing to | |
See all releases |
Code changes from version 1.8.5.5 to 1.8.4.5
- adminpages/addons.php +142 -284
- adminpages/addons/hide-admin-bar-from-non-admins.php +32 -0
- adminpages/addons/images/pmpro-aweber.gif +0 -0
- adminpages/addons/images/pmpro-bbpress.jpg +0 -0
- adminpages/addons/images/pmpro-constant-contact.gif +0 -0
- adminpages/addons/images/pmpro-email-templates.gif +0 -0
- adminpages/addons/images/pmpro-infusionsoft.jpg +0 -0
- adminpages/addons/images/pmpro-mailchimp.jpg +0 -0
- adminpages/addons/images/pmpro-network.gif +0 -0
- adminpages/addons/images/pmpro-post-affiliate-pro.jpg +0 -0
- adminpages/addons/images/pmpro-register-helper.gif +0 -0
- adminpages/addons/images/pmpro-series.gif +0 -0
- adminpages/addons/images/pmpro-woocommerce.gif +0 -0
- adminpages/addons/images/pmpro-wp-affiliate-platform.jpg +0 -0
- adminpages/addons/images/wp-bouncer.gif +0 -0
- adminpages/addons/pmpro-addon-packages.php +30 -0
- adminpages/addons/pmpro-affiliates.php +30 -0
- adminpages/addons/pmpro-aweber.php +31 -0
- adminpages/addons/pmpro-bbpress.php +31 -0
- adminpages/addons/pmpro-constant-contact.php +31 -0
- adminpages/addons/pmpro-disable-emails.php +28 -0
- adminpages/addons/pmpro-email-templates.php +31 -0
- adminpages/addons/pmpro-expiration.php +30 -0
- adminpages/addons/pmpro-freeaddress.php +30 -0
- adminpages/addons/pmpro-infusionsoft.php +31 -0
- adminpages/addons/pmpro-international-addresses.php +31 -0
- adminpages/addons/pmpro-level-cost-text.php +30 -0
- adminpages/addons/pmpro-mailchimp.php +31 -0
- adminpages/addons/pmpro-network-subsite.php +31 -0
- adminpages/addons/pmpro-network.php +31 -0
- adminpages/addons/pmpro-post-affiliate-pro.php +31 -0
- adminpages/addons/pmpro-register-helper.php +31 -0
- adminpages/addons/pmpro-require-code-to-register.php +28 -0
- adminpages/addons/pmpro-series.php +31 -0
- adminpages/addons/pmpro-shipping.php +31 -0
- adminpages/addons/pmpro-user-pages.php +30 -0
- adminpages/addons/pmpro-woocommerce.php +31 -0
- adminpages/addons/pmpro-wp-affiliate.php +31 -0
- adminpages/addons/tml.php +32 -0
- adminpages/addons/wp-bouncer.php +31 -0
- adminpages/discountcodes.php +2 -3
- adminpages/functions.php +1 -1
- adminpages/membershiplevels.php +672 -681
- adminpages/orders-csv.php +2 -2
- adminpages/orders.php +3 -6
- adminpages/pagesettings.php +251 -294
- adminpages/reports/memberships.php +1 -1
- adminpages/reports/sales.php +9 -9
- classes/class.memberorder.php +1 -7
- classes/class.pmproemail.php +2 -2
- classes/gateways/class.pmprogateway_paypalexpress.php +0 -48
- classes/gateways/class.pmprogateway_stripe.php +0 -40
- css/frontend.css +177 -198
- includes/addons.php +0 -238
- includes/content.php +1 -32
- includes/functions.php +23 -131
- includes/https.php +1 -1
- includes/init.php +4 -20
- includes/license.php +0 -293
- includes/metaboxes.php +108 -136
- includes/profile.php +9 -27
- includes/upgradecheck.php +2 -2
- languages/pmpro-fi.mo +0 -0
- languages/pmpro-fi.po +0 -3200
- languages/pmpro.mo +0 -0
- languages/pmpro.po +476 -856
- languages/pmpro.pot +476 -856
- license.txt +9 -9
- pages/billing.php +354 -357
- pages/checkout.php +795 -800
- paid-memberships-pro.php +2 -9
- readme.txt +24 -79
- screenshot-1.jpg +0 -0
- screenshot-2.jpg +0 -0
- screenshot-4.jpg +0 -0
- screenshot-5.jpg +0 -0
- screenshot-6.jpg +0 -0
- screenshot-7.jpg +0 -0
- screenshot-8.jpg +0 -0
- services/braintree-webhook.php +1 -1
- services/ipnhandler.php +2 -7
adminpages/addons.php
CHANGED
@@ -1,284 +1,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 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
$
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
$
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
<
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
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 |
-
?>
|
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 |
+
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
adminpages/addons/hide-admin-bar-from-non-admins.php
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
Binary file
|
adminpages/addons/images/pmpro-bbpress.jpg
ADDED
Binary file
|
adminpages/addons/images/pmpro-constant-contact.gif
ADDED
Binary file
|
adminpages/addons/images/pmpro-email-templates.gif
ADDED
Binary file
|
adminpages/addons/images/pmpro-infusionsoft.jpg
ADDED
Binary file
|
adminpages/addons/images/pmpro-mailchimp.jpg
ADDED
Binary file
|
adminpages/addons/images/pmpro-network.gif
ADDED
Binary file
|
adminpages/addons/images/pmpro-post-affiliate-pro.jpg
ADDED
Binary file
|
adminpages/addons/images/pmpro-register-helper.gif
ADDED
Binary file
|
adminpages/addons/images/pmpro-series.gif
ADDED
Binary file
|
adminpages/addons/images/pmpro-woocommerce.gif
ADDED
Binary file
|
adminpages/addons/images/pmpro-wp-affiliate-platform.jpg
ADDED
Binary file
|
adminpages/addons/images/wp-bouncer.gif
ADDED
Binary file
|
adminpages/addons/pmpro-addon-packages.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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/discountcodes.php
CHANGED
@@ -396,7 +396,7 @@
|
|
396 |
</tbody>
|
397 |
</table>
|
398 |
|
399 |
-
<?php do_action("pmpro_discount_code_after_settings"
|
400 |
|
401 |
<h3><?php _e('Which Levels Will This Code Apply To?', 'pmpro'); ?></h3>
|
402 |
|
@@ -606,7 +606,6 @@
|
|
606 |
}
|
607 |
else
|
608 |
{
|
609 |
-
$count = 0;
|
610 |
foreach($codes as $code)
|
611 |
{
|
612 |
?>
|
@@ -649,7 +648,7 @@
|
|
649 |
<a href="?page=pmpro-discountcodes&edit=<?php echo $code->id?>"><?php _e('edit', 'pmpro');?></a>
|
650 |
</td>
|
651 |
<td>
|
652 |
-
<a href="javascript:askfirst('<?php
|
653 |
</td>
|
654 |
</tr>
|
655 |
<?php
|
396 |
</tbody>
|
397 |
</table>
|
398 |
|
399 |
+
<?php do_action("pmpro_discount_code_after_settings"); ?>
|
400 |
|
401 |
<h3><?php _e('Which Levels Will This Code Apply To?', 'pmpro'); ?></h3>
|
402 |
|
606 |
}
|
607 |
else
|
608 |
{
|
|
|
609 |
foreach($codes as $code)
|
610 |
{
|
611 |
?>
|
648 |
<a href="?page=pmpro-discountcodes&edit=<?php echo $code->id?>"><?php _e('edit', 'pmpro');?></a>
|
649 |
</td>
|
650 |
<td>
|
651 |
+
<a href="javascript:askfirst('<?php printf(__('Are you sure you want to delete the %s discount code? The subscriptions for existing users will not change, but new users will not be able to use this code anymore.', 'pmpro'), $code->code);?>', '?page=pmpro-discountcodes&delete=<?php echo $code->id?>'); void(0);"><?php _e('delete', 'pmpro');?></a>
|
652 |
</td>
|
653 |
</tr>
|
654 |
<?php
|
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
|
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 2.0
|
225 |
*/
|
226 |
function pmpro_getClassesForPaymentSettingsField($field, $force = false)
|
227 |
{
|
adminpages/membershiplevels.php
CHANGED
@@ -1,682 +1,673 @@
|
|
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+)$/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")
|