Version Description
- Fixed all open bugs with 2Checkout gateway. You can now use this gateway for one time and recurring levels. We're still keeping the beta message though until we have further live testing.
- The shortcodes for the PMPro pages (e.g. pmpro_levels/etc) will now work on multiple pages. Things may still act funny if you put the shortcodes on pages other than those set in the page settings, but you can do so if you know what you are doing. One limitation still in place is that you can only have one PMPro page shortcode per page. Whichever comes first will be used.
- Added support for WPML. Simply make a copy of each PMPro page for each language. Set the PMPro page settings to the default language pages.
- Updated pmpro.pot template along with a script gettext.sh that will allow us to easily update the pmpro.pot file when we need to.
- Updated the pmpro_url function, should work the same but if you use addons or customizations and notice bugs around URLs, let me know.
- Fixed bug where old membership data was being included in the members list export instead of the latest active membership data.
- Filtering $morder->membership_level at checkout as well as $pmpro_level global.
- When loading bemail and bconfirm email from user meta for existing users, just setting them both to $bemail so different emails don't show up.
- Now sending a member's email address to Stripe when customers are created/updated.
- No longer running wpautop on email via pmpro_send_email filter.
- If first_name and/or last_name are passed at checkout, these are used to create a new user instead of bfirstname and blastname.
- Added "view" links to the page settings page.
- Fixed some potential warnings in adminpages/reports/login.php.
Download this release
Release Info
Developer | strangerstudios |
Plugin | ![]() |
Version | 1.7.5 |
Comparing to | |
See all releases |
Code changes from version 1.7.14 to 1.7.5
- adminpages/addons.php +1 -1
- 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-woocommerce.gif +0 -0
- adminpages/addons/pmpro-addon-packages.php +2 -2
- adminpages/addons/pmpro-affiliates.php +2 -2
- adminpages/addons/pmpro-aweber.php +2 -2
- adminpages/addons/pmpro-bbpress.php +6 -9
- adminpages/addons/pmpro-constant-contact.php +0 -31
- adminpages/addons/pmpro-email-templates.php +0 -31
- adminpages/addons/pmpro-expiration.php +8 -10
- adminpages/addons/pmpro-freeaddress.php +5 -7
- adminpages/addons/pmpro-infusionsoft.php +4 -4
- adminpages/addons/pmpro-mailchimp.php +3 -3
- adminpages/addons/pmpro-network-subsite.php +0 -31
- adminpages/addons/pmpro-post-affiliate-pro.php +1 -1
- adminpages/addons/pmpro-register-helper.php +1 -1
- adminpages/addons/pmpro-series.php +1 -1
- adminpages/addons/pmpro-shipping.php +1 -1
- adminpages/addons/pmpro-user-pages.php +1 -1
- adminpages/addons/pmpro-woocommerce.php +0 -31
- adminpages/addons/pmpro-wp-affiliate.php +3 -5
- adminpages/addons/tml.php +1 -1
- adminpages/addons/wp-bouncer.php +1 -1
- adminpages/admin_header.php +1 -1
- adminpages/advancedsettings.php +12 -96
- adminpages/dashboard.php +2 -2
- adminpages/discountcodes.php +24 -29
- adminpages/emailsettings.php +152 -181
- adminpages/functions.php +3 -3
- adminpages/membershiplevels.php +7 -9
- adminpages/memberslist-csv.php +22 -75
- adminpages/memberslist.php +30 -58
- adminpages/orders-csv.php +14 -116
- adminpages/orders.php +9 -314
- adminpages/pagesettings.php +16 -44
- adminpages/paymentsettings.php +10 -16
- adminpages/reports.php +0 -3
- adminpages/reports/login.php +2 -2
- adminpages/reports/memberships.php +18 -18
- adminpages/reports/sales.php +42 -40
- classes/class.memberorder.php +16 -75
- classes/class.pmproemail.php +17 -85
- classes/gateways/class.pmprogateway.php +3 -19
- classes/gateways/class.pmprogateway_authorizenet.php +2 -2
- classes/gateways/class.pmprogateway_braintree.php +12 -12
- classes/gateways/class.pmprogateway_check.php +2 -2
- classes/gateways/class.pmprogateway_cybersource.php +5 -5
- classes/gateways/class.pmprogateway_payflowpro.php +11 -14
- classes/gateways/class.pmprogateway_paypal.php +10 -12
- classes/gateways/class.pmprogateway_paypalexpress.php +14 -52
- classes/gateways/class.pmprogateway_paypalstandard.php +16 -33
- classes/gateways/class.pmprogateway_stripe.php +31 -79
- css/admin-rtl.css +0 -63
- css/admin.css +5 -5
- css/frontend-rtl.css +0 -111
- css/frontend.css +86 -48
- email/billing.html +4 -1
- email/billing_failure.html +5 -1
- email/billing_failure_admin.html +5 -1
- email/checkout_check.html +1 -1
- email/checkout_freetrial.html +4 -1
- email/checkout_freetrial_admin.html +4 -1
- email/checkout_paid.html +4 -1
- email/checkout_paid_admin.html +4 -1
- email/checkout_trial.html +4 -1
- email/checkout_trial_admin.html +4 -1
- email/credit_card_expiring.html +3 -1
- email/invoice.html +6 -2
- includes/adminpages.php +66 -147
- includes/cleanup.php +12 -1
- includes/content.php +35 -70
- includes/email.php +17 -48
- includes/filters.php +2 -2
- includes/functions.php +121 -219
- includes/init.php +8 -65
- includes/lib/Stripe/Stripe.php +0 -10
- includes/lib/Stripe/Stripe/Account.php +6 -5
- includes/lib/Stripe/Stripe/ApiRequestor.php +51 -153
- includes/lib/Stripe/Stripe/ApiResource.php +17 -51
- includes/lib/Stripe/Stripe/ApplicationFee.php +0 -53
- includes/lib/Stripe/Stripe/AttachedObject.php +0 -23
- includes/lib/Stripe/Stripe/Balance.php +0 -15
- includes/lib/Stripe/Stripe/BalanceTransaction.php +0 -39
- includes/lib/Stripe/Stripe/Card.php +0 -54
- includes/lib/Stripe/Stripe/CardError.php +2 -4
- includes/lib/Stripe/Stripe/Charge.php +7 -55
- includes/lib/Stripe/Stripe/Coupon.php +7 -24
- includes/lib/Stripe/Stripe/Customer.php +6 -61
- includes/lib/Stripe/Stripe/Error.php +7 -9
- includes/lib/Stripe/Stripe/Event.php +6 -12
- includes/lib/Stripe/Stripe/InvalidRequestError.php +2 -4
- includes/lib/Stripe/Stripe/Invoice.php +6 -30
- includes/lib/Stripe/Stripe/InvoiceItem.php +6 -24
- includes/lib/Stripe/Stripe/List.php +5 -25
- includes/lib/Stripe/Stripe/Object.php +12 -123
- includes/lib/Stripe/Stripe/Plan.php +6 -26
- includes/lib/Stripe/Stripe/Recipient.php +0 -75
- includes/lib/Stripe/Stripe/SingletonApiResource.php +0 -7
- includes/lib/Stripe/Stripe/Stripe.php +3 -49
- includes/lib/Stripe/Stripe/Subscription.php +0 -58
- includes/lib/Stripe/Stripe/Token.php +6 -12
- includes/lib/Stripe/Stripe/Transfer.php +6 -34
- includes/lib/Stripe/Stripe/Util.php +14 -42
- includes/login.php +4 -20
- includes/metaboxes.php +2 -2
- includes/profile.php +4 -4
- includes/services.php +1 -1
- includes/upgradecheck.php +4 -25
- includes/xmlrpc.php +0 -80
- languages/email/da_DK/admin_change.html +0 -7
- languages/email/da_DK/admin_change_admin.html +0 -5
- languages/email/da_DK/billing.html +0 -16
- languages/email/da_DK/billing_admin.html +0 -17
- languages/email/da_DK/billing_failure.html +0 -11
- languages/email/da_DK/billing_failure_admin.html +0 -11
- languages/email/da_DK/cancel.html +0 -3
- languages/email/da_DK/cancel_admin.html +0 -8
- languages/email/da_DK/checkout_check.html +0 -17
- languages/email/da_DK/checkout_check_admin.html +0 -17
- languages/email/da_DK/checkout_express.html +0 -14
- languages/email/da_DK/checkout_express_admin.html +0 -14
- languages/email/da_DK/checkout_free.html +0 -8
- languages/email/da_DK/checkout_free_admin.html +0 -8
- languages/email/da_DK/checkout_freetrial.html +0 -19
- languages/email/da_DK/checkout_freetrial_admin.html +0 -19
- languages/email/da_DK/checkout_paid.html +0 -23
- languages/email/da_DK/checkout_paid_admin.html +0 -23
- languages/email/da_DK/checkout_trial.html +0 -23
- languages/email/da_DK/checkout_trial_admin.html +0 -23
- languages/email/da_DK/credit_card_expiring.html +0 -13
- languages/email/da_DK/default.html +0 -1
- languages/email/da_DK/footer.html +0 -4
- languages/email/da_DK/header.html +0 -1
- languages/email/da_DK/invoice.html +0 -19
- languages/email/da_DK/membership_expired.html +0 -7
- languages/email/da_DK/membership_expiring.html +0 -6
- languages/email/da_DK/trial_ending.html +0 -8
- languages/gettext.sh +0 -3
- languages/pmpro-cs_CZ.mo +0 -0
- languages/pmpro-cs_CZ.po +0 -2889
- languages/pmpro-da_DK.mo +0 -0
- languages/pmpro-da_DK.po +0 -3502
- languages/pmpro-en_GB.mo +0 -0
- languages/pmpro-en_GB.po +0 -2661
- languages/pmpro-fr_FR.mo +0 -0
- languages/pmpro-fr_FR.po +327 -444
- languages/pmpro-it_IT.mo +0 -0
- languages/pmpro-it_IT.po +1367 -2483
- languages/pmpro-nb_NO.mo +0 -0
- languages/pmpro-nb_NO.po +0 -3279
- languages/pmpro-pt_BR.mo +0 -0
- languages/pmpro-pt_BR.po +0 -2661
- languages/pmpro-sk_SK.mo +0 -0
- languages/pmpro-sk_SK.po +0 -107
adminpages/addons.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
//only admins can get this
|
3 |
-
if(!function_exists("current_user_can") ||
|
4 |
{
|
5 |
die(__("You do not have permissions to perform this action.", "pmpro"));
|
6 |
}
|
1 |
<?php
|
2 |
//only admins can get this
|
3 |
+
if(!function_exists("current_user_can") || !current_user_can("manage_options"))
|
4 |
{
|
5 |
die(__("You do not have permissions to perform this action.", "pmpro"));
|
6 |
}
|
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-woocommerce.gif
DELETED
Binary file
|
adminpages/addons/pmpro-addon-packages.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
*/
|
6 |
pmpro_add_addon('github', array(
|
7 |
'title' => 'PMPro Addon Packages',
|
8 |
-
'version' => '.
|
9 |
'widget' => 'pmpro_addon_pmpro_addon_packages_widget',
|
10 |
'enabled' => function_exists('pmproap_post_meta')
|
11 |
)
|
@@ -22,7 +22,7 @@ function pmpro_addon_pmpro_addon_packages_widget($addon)
|
|
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://
|
26 |
<?php } ?>
|
27 |
</div>
|
28 |
</div> <!-- end info -->
|
5 |
*/
|
6 |
pmpro_add_addon('github', array(
|
7 |
'title' => 'PMPro Addon Packages',
|
8 |
+
'version' => '.1.3',
|
9 |
'widget' => 'pmpro_addon_pmpro_addon_packages_widget',
|
10 |
'enabled' => function_exists('pmproap_post_meta')
|
11 |
)
|
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://github.com/strangerstudios/pmpro-addon-packages/archive/master.zip" class="button button-primary">Download</a>
|
26 |
<?php } ?>
|
27 |
</div>
|
28 |
</div> <!-- end info -->
|
adminpages/addons/pmpro-affiliates.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
*/
|
6 |
pmpro_add_addon('github', array(
|
7 |
'title' => 'PMPro Affiliates',
|
8 |
-
'version' => '.2.
|
9 |
'widget' => 'pmpro_addon_pmpro_affiliates_widget',
|
10 |
'enabled' => function_exists('pmpro_affiliates_dependencies')
|
11 |
)
|
@@ -22,7 +22,7 @@ function pmpro_addon_pmpro_affiliates_widget($addon)
|
|
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="
|
26 |
<?php } ?>
|
27 |
</div>
|
28 |
</div> <!-- end info -->
|
5 |
*/
|
6 |
pmpro_add_addon('github', array(
|
7 |
'title' => 'PMPro Affiliates',
|
8 |
+
'version' => '.2.3',
|
9 |
'widget' => 'pmpro_addon_pmpro_affiliates_widget',
|
10 |
'enabled' => function_exists('pmpro_affiliates_dependencies')
|
11 |
)
|
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="https://github.com/strangerstudios/pmpro-affiliates/archive/master.zip" class="button button-primary">Download</a>
|
26 |
<?php } ?>
|
27 |
</div>
|
28 |
</div> <!-- end info -->
|
adminpages/addons/pmpro-aweber.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
*/
|
6 |
pmpro_add_addon('thirdparty', array(
|
7 |
'title' => 'PMPro AWeber Integration',
|
8 |
-
'version' => '
|
9 |
'widget' => 'pmpro_addon_pmpro_aweber_widget',
|
10 |
'enabled' => function_exists('pmproaw_init')
|
11 |
)
|
@@ -19,7 +19,7 @@ function pmpro_addon_pmpro_aweber_widget($addon)
|
|
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="
|
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 { ?>
|
5 |
*/
|
6 |
pmpro_add_addon('thirdparty', array(
|
7 |
'title' => 'PMPro AWeber Integration',
|
8 |
+
'version' => '.2',
|
9 |
'widget' => 'pmpro_addon_pmpro_aweber_widget',
|
10 |
'enabled' => function_exists('pmproaw_init')
|
11 |
)
|
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="https://github.com/strangerstudios/pmpro-aweber/" 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 { ?>
|
adminpages/addons/pmpro-bbpress.php
CHANGED
@@ -3,28 +3,25 @@
|
|
3 |
Addon: PMPro bbPress
|
4 |
Slug: pmpro-bbpress
|
5 |
*/
|
6 |
-
pmpro_add_addon('
|
7 |
'title' => 'PMPro bbPress',
|
8 |
-
'version' => '
|
9 |
'widget' => 'pmpro_addon_pmpro_bbpress_widget',
|
10 |
-
'enabled' => function_exists('
|
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
|
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
|
27 |
-
<?php } ?>
|
28 |
</div>
|
29 |
</div> <!-- end info -->
|
30 |
<?php
|
3 |
Addon: PMPro bbPress
|
4 |
Slug: pmpro-bbpress
|
5 |
*/
|
6 |
+
pmpro_add_addon('gists', array(
|
7 |
'title' => 'PMPro bbPress',
|
8 |
+
'version' => '.1',
|
9 |
'widget' => 'pmpro_addon_pmpro_bbpress_widget',
|
10 |
+
'enabled' => function_exists('pmpro_check_forum')
|
11 |
)
|
12 |
);
|
13 |
|
14 |
function pmpro_addon_pmpro_bbpress_widget($addon)
|
15 |
{
|
16 |
?>
|
|
|
17 |
<div class="info">
|
18 |
<p>Locking down bbPress Forums by Membership Level and Forum ID.</p>
|
19 |
<div class="actions">
|
20 |
<?php if($addon['enabled']) { ?>
|
21 |
+
<a target="_blank" href="https://gist.github.com/strangerstudios/1633637" class="button">Enabled</a>
|
|
|
|
|
22 |
<?php } else { ?>
|
23 |
+
<a target="_blank" href="https://gist.github.com/strangerstudios/1633637" class="button button-primary">View Gist</a>
|
24 |
+
<?php } ?>
|
25 |
</div>
|
26 |
</div> <!-- end info -->
|
27 |
<?php
|
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-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
CHANGED
@@ -3,11 +3,11 @@
|
|
3 |
Addon: PMPro Expiration Date
|
4 |
Slug: pmpro-expiration
|
5 |
*/
|
6 |
-
pmpro_add_addon('
|
7 |
-
'title' => 'PMPro
|
8 |
-
'version' => '.1
|
9 |
'widget' => 'pmpro_addon_pmpro_expiration_widget',
|
10 |
-
'enabled' => function_exists('
|
11 |
)
|
12 |
);
|
13 |
|
@@ -15,15 +15,13 @@ function pmpro_addon_pmpro_expiration_widget($addon)
|
|
15 |
{
|
16 |
?>
|
17 |
<div class="info">
|
18 |
-
<p>Set a specific expiration date
|
19 |
<div class="actions">
|
20 |
<?php if($addon['enabled']) { ?>
|
21 |
-
<a href="https://github.com/strangerstudios/
|
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="
|
26 |
-
<?php } ?>
|
27 |
</div>
|
28 |
</div> <!-- end info -->
|
29 |
<?php
|
3 |
Addon: PMPro Expiration Date
|
4 |
Slug: pmpro-expiration
|
5 |
*/
|
6 |
+
pmpro_add_addon('gists', array(
|
7 |
+
'title' => 'PMPro Expiration Date',
|
8 |
+
'version' => '.1',
|
9 |
'widget' => 'pmpro_addon_pmpro_expiration_widget',
|
10 |
+
'enabled' => function_exists('my_pmpro_checkout_level_specific_expiration')
|
11 |
)
|
12 |
);
|
13 |
|
15 |
{
|
16 |
?>
|
17 |
<div class="info">
|
18 |
+
<p>Set a specific expiration date for a Membership Level.</p>
|
19 |
<div class="actions">
|
20 |
<?php if($addon['enabled']) { ?>
|
21 |
+
<a target="_blank" href="https://gist.github.com/strangerstudios/5709300" class="button">Enabled</a>
|
|
|
|
|
22 |
<?php } else { ?>
|
23 |
+
<a target="_blank" href="https://gist.github.com/strangerstudios/5709300" class="button button-primary">View Gist</a>
|
24 |
+
<?php } ?>
|
25 |
</div>
|
26 |
</div> <!-- end info -->
|
27 |
<?php
|
adminpages/addons/pmpro-freeaddress.php
CHANGED
@@ -3,9 +3,9 @@
|
|
3 |
Addon: PMPro Require Name and Address for Free Level
|
4 |
Slug: pmpro-freerequire
|
5 |
*/
|
6 |
-
pmpro_add_addon('
|
7 |
'title' => 'PMPro Require Name/Address for Free Level',
|
8 |
-
'version' => '.
|
9 |
'widget' => 'pmpro_addon_pmpro_freerequire_widget',
|
10 |
'enabled' => function_exists('my_pmpro_checkout_boxes_require_address')
|
11 |
)
|
@@ -18,12 +18,10 @@ function pmpro_addon_pmpro_freerequire_widget($addon)
|
|
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/
|
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="
|
26 |
-
<?php } ?>
|
27 |
</div>
|
28 |
</div> <!-- end info -->
|
29 |
<?php
|
3 |
Addon: PMPro Require Name and Address for Free Level
|
4 |
Slug: pmpro-freerequire
|
5 |
*/
|
6 |
+
pmpro_add_addon('gists', array(
|
7 |
'title' => 'PMPro Require Name/Address for Free Level',
|
8 |
+
'version' => '.1',
|
9 |
'widget' => 'pmpro_addon_pmpro_freerequire_widget',
|
10 |
'enabled' => function_exists('my_pmpro_checkout_boxes_require_address')
|
11 |
)
|
18 |
<p>Require name/address for free Membership Level checkout.</p>
|
19 |
<div class="actions">
|
20 |
<?php if($addon['enabled']) { ?>
|
21 |
+
<a target="_blank" href="https://gist.github.com/strangerstudios/5716249" class="button">Enabled</a>
|
|
|
|
|
22 |
<?php } else { ?>
|
23 |
+
<a target="_blank" href="https://gist.github.com/strangerstudios/5716249" class="button button-primary">View Gist</a>
|
24 |
+
<?php } ?>
|
25 |
</div>
|
26 |
</div> <!-- end info -->
|
27 |
<?php
|
adminpages/addons/pmpro-infusionsoft.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
*/
|
6 |
pmpro_add_addon('thirdparty', array(
|
7 |
'title' => 'PMPro Infusionsoft Integration',
|
8 |
-
'version' => '
|
9 |
'widget' => 'pmpro_addon_pmpro_infusionsoft_widget',
|
10 |
'enabled' => function_exists('pmprois_init')
|
11 |
)
|
@@ -19,12 +19,12 @@ function pmpro_addon_pmpro_infusionsoft_widget($addon)
|
|
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="
|
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="
|
27 |
-
<?php } ?>
|
28 |
</div>
|
29 |
</div> <!-- end info -->
|
30 |
<?php
|
5 |
*/
|
6 |
pmpro_add_addon('thirdparty', array(
|
7 |
'title' => 'PMPro Infusionsoft Integration',
|
8 |
+
'version' => '.5',
|
9 |
'widget' => 'pmpro_addon_pmpro_infusionsoft_widget',
|
10 |
'enabled' => function_exists('pmprois_init')
|
11 |
)
|
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="https://github.com/strangerstudios/pmpro-infusionsoft/" 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="http://www.paidmembershipspro.com/wp-content/uploads/plugins/pmpro-infusionsoft.zip" class="button button-primary">Download</a>
|
27 |
+
<?php } ?>
|
28 |
</div>
|
29 |
</div> <!-- end info -->
|
30 |
<?php
|
adminpages/addons/pmpro-mailchimp.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
*/
|
6 |
pmpro_add_addon('thirdparty', array(
|
7 |
'title' => 'PMPro MailChimp Integration',
|
8 |
-
'version' => '
|
9 |
'widget' => 'pmpro_addon_pmpro_mailchimp_widget',
|
10 |
'enabled' => function_exists('pmpromc_init')
|
11 |
)
|
@@ -19,12 +19,12 @@ function pmpro_addon_pmpro_mailchimp_widget($addon)
|
|
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="
|
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
|
5 |
*/
|
6 |
pmpro_add_addon('thirdparty', array(
|
7 |
'title' => 'PMPro MailChimp Integration',
|
8 |
+
'version' => '.3.3',
|
9 |
'widget' => 'pmpro_addon_pmpro_mailchimp_widget',
|
10 |
'enabled' => function_exists('pmpromc_init')
|
11 |
)
|
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="https://github.com/strangerstudios/pmpro-mailchimp/" 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
|
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-post-affiliate-pro.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
*/
|
6 |
pmpro_add_addon('thirdparty', array(
|
7 |
'title' => 'PMPro Post Affiliate Pro Integration',
|
8 |
-
'version' => '.
|
9 |
'widget' => 'pmpro_addon_pmpro_post_affiliate_pro_widget',
|
10 |
'enabled' => function_exists('pap_pmpro_track_sale')
|
11 |
)
|
5 |
*/
|
6 |
pmpro_add_addon('thirdparty', array(
|
7 |
'title' => 'PMPro Post Affiliate Pro Integration',
|
8 |
+
'version' => '.1',
|
9 |
'widget' => 'pmpro_addon_pmpro_post_affiliate_pro_widget',
|
10 |
'enabled' => function_exists('pap_pmpro_track_sale')
|
11 |
)
|
adminpages/addons/pmpro-register-helper.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
*/
|
6 |
pmpro_add_addon('github', array(
|
7 |
'title' => 'PMPro Register Helper',
|
8 |
-
'version' => '.5.
|
9 |
'widget' => 'pmpro_addon_pmpro_register_helper_widget',
|
10 |
'enabled' => class_exists('PMProRH_Field')
|
11 |
)
|
5 |
*/
|
6 |
pmpro_add_addon('github', array(
|
7 |
'title' => 'PMPro Register Helper',
|
8 |
+
'version' => '.5.3',
|
9 |
'widget' => 'pmpro_addon_pmpro_register_helper_widget',
|
10 |
'enabled' => class_exists('PMProRH_Field')
|
11 |
)
|
adminpages/addons/pmpro-series.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
*/
|
6 |
pmpro_add_addon('github', array(
|
7 |
'title' => 'PMPro Series',
|
8 |
-
'version' => '.
|
9 |
'widget' => 'pmpro_addon_pmpro_series_widget',
|
10 |
'enabled' => class_exists("PMProSeries")
|
11 |
)
|
5 |
*/
|
6 |
pmpro_add_addon('github', array(
|
7 |
'title' => 'PMPro Series',
|
8 |
+
'version' => '.2.1',
|
9 |
'widget' => 'pmpro_addon_pmpro_series_widget',
|
10 |
'enabled' => class_exists("PMProSeries")
|
11 |
)
|
adminpages/addons/pmpro-shipping.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
*/
|
6 |
pmpro_add_addon('github', array(
|
7 |
'title' => 'PMPro Shipping Add On',
|
8 |
-
'version' => '.2.
|
9 |
'widget' => 'pmpro_addon_pmpro_shipping_widget',
|
10 |
'enabled' => function_exists('pmproship_pmpro_checkout_boxes')
|
11 |
)
|
5 |
*/
|
6 |
pmpro_add_addon('github', array(
|
7 |
'title' => 'PMPro Shipping Add On',
|
8 |
+
'version' => '.2.3',
|
9 |
'widget' => 'pmpro_addon_pmpro_shipping_widget',
|
10 |
'enabled' => function_exists('pmproship_pmpro_checkout_boxes')
|
11 |
)
|
adminpages/addons/pmpro-user-pages.php
CHANGED
@@ -14,7 +14,7 @@ pmpro_add_addon('github', array(
|
|
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']) { ?>
|
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']) { ?>
|
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 WooCommerce to purchase membership 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
CHANGED
@@ -19,12 +19,10 @@ function pmpro_addon_pmpro_wp_affiliate_widget($addon)
|
|
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/
|
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="
|
27 |
-
<?php } ?>
|
28 |
</div>
|
29 |
</div> <!-- end info -->
|
30 |
<?php
|
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 target="_blank" href="https://gist.github.com/strangerstudios/3137539" class="button">Enabled</a>
|
|
|
|
|
23 |
<?php } else { ?>
|
24 |
+
<a target="_blank" href="https://gist.github.com/strangerstudios/3137539" class="button button-primary">View Gist</a>
|
25 |
+
<?php } ?>
|
26 |
</div>
|
27 |
</div> <!-- end info -->
|
28 |
<?php
|
adminpages/addons/tml.php
CHANGED
@@ -7,7 +7,7 @@ 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.
|
11 |
)
|
12 |
);
|
13 |
|
7 |
'title' => 'Theme My Login',
|
8 |
'widget' => 'pmpro_addon_tml_widget',
|
9 |
'enabled' => class_exists('Theme_My_Login'),
|
10 |
+
'version' => '6.3.8'
|
11 |
)
|
12 |
);
|
13 |
|
adminpages/addons/wp-bouncer.php
CHANGED
@@ -19,7 +19,7 @@ function pmpro_addon_wp_bouncer_widget($addon)
|
|
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="
|
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 { ?>
|
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="https://github.com/strangerstudios/wp-bouncer/blob/master/readme.txt" 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 { ?>
|
adminpages/admin_header.php
CHANGED
@@ -124,7 +124,7 @@
|
|
124 |
<div class="wrap pmpro_admin">
|
125 |
<div class="pmpro_banner">
|
126 |
<a class="pmpro_logo" title="Paid Memberships Pro - Membership Plugin for WordPress" target="_blank" href="<?php echo pmpro_https_filter("http://www.paidmembershipspro.com")?>"><img src="<?php echo PMPRO_URL?>/images/Paid-Memberships-Pro.png" width="350" height="75" border="0" alt="Paid Memberships Pro(c) - All Rights Reserved" /></a>
|
127 |
-
<div class="pmpro_meta"><span class="pmpro_tag-grey">v<?php echo PMPRO_VERSION?></span><a
|
128 |
|
129 |
<br style="clear:both;" />
|
130 |
</div>
|
124 |
<div class="wrap pmpro_admin">
|
125 |
<div class="pmpro_banner">
|
126 |
<a class="pmpro_logo" title="Paid Memberships Pro - Membership Plugin for WordPress" target="_blank" href="<?php echo pmpro_https_filter("http://www.paidmembershipspro.com")?>"><img src="<?php echo PMPRO_URL?>/images/Paid-Memberships-Pro.png" width="350" height="75" border="0" alt="Paid Memberships Pro(c) - All Rights Reserved" /></a>
|
127 |
+
<div class="pmpro_meta"><span class="pmpro_tag-grey">v<?php echo PMPRO_VERSION?></span><a class="pmpro_tag-blue" href="<?php echo pmpro_https_filter("http://www.paidmembershipspro.com")?>"><?php _e('Plugin Support', 'pmpro');?></a><a class="pmpro_tag-blue" href="http://www.paidmembershipspro.com/forums/"><?php _e('User Forum', 'pmpro');?></a></div>
|
128 |
|
129 |
<br style="clear:both;" />
|
130 |
</div>
|
adminpages/advancedsettings.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
//only admins can get this
|
3 |
-
if(!function_exists("current_user_can") ||
|
4 |
{
|
5 |
die(__("You do not have permissions to perform this action.", "pmpro"));
|
6 |
}
|
@@ -14,7 +14,6 @@
|
|
14 |
pmpro_setOption("nonmembertext");
|
15 |
pmpro_setOption("notloggedintext");
|
16 |
pmpro_setOption("rsstext");
|
17 |
-
pmpro_setOption("filterqueries");
|
18 |
pmpro_setOption("showexcerpts");
|
19 |
pmpro_setOption("hideads");
|
20 |
pmpro_setOption("hideadslevels");
|
@@ -30,13 +29,6 @@
|
|
30 |
|
31 |
//footer link
|
32 |
pmpro_setOption("hide_footer_link");
|
33 |
-
|
34 |
-
// custom settings (added with pmpro_custom_advanced_settings hook)
|
35 |
-
foreach($_REQUEST as $key => $value ) {
|
36 |
-
if (strpos($key, 'custom_') === 0) {
|
37 |
-
pmpro_setOption($key);
|
38 |
-
}
|
39 |
-
}
|
40 |
|
41 |
//assume success
|
42 |
$msg = true;
|
@@ -47,7 +39,6 @@
|
|
47 |
$notloggedintext = pmpro_getOption("notloggedintext");
|
48 |
$rsstext = pmpro_getOption("rsstext");
|
49 |
$hideads = pmpro_getOption("hideads");
|
50 |
-
$filterqueries = pmpro_getOption('filterqueries');
|
51 |
$showexcerpts = pmpro_getOption("showexcerpts");
|
52 |
$hideadslevels = pmpro_getOption("hideadslevels");
|
53 |
|
@@ -65,17 +56,17 @@
|
|
65 |
//default settings
|
66 |
if(!$nonmembertext)
|
67 |
{
|
68 |
-
$nonmembertext =
|
69 |
pmpro_setOption("nonmembertext", $nonmembertext);
|
70 |
}
|
71 |
if(!$notloggedintext)
|
72 |
{
|
73 |
-
$notloggedintext =
|
74 |
pmpro_setOption("notloggedintext", $notloggedintext);
|
75 |
}
|
76 |
if(!$rsstext)
|
77 |
{
|
78 |
-
$rsstext =
|
79 |
pmpro_setOption("rsstext", $rsstext);
|
80 |
}
|
81 |
|
@@ -119,27 +110,16 @@
|
|
119 |
|
120 |
<tr>
|
121 |
<th scope="row" valign="top">
|
122 |
-
<label for="
|
123 |
</th>
|
124 |
<td>
|
125 |
-
<select id="
|
126 |
-
<option value="0" <?php if(!$
|
127 |
-
<option value="1" <?php if($
|
128 |
</select>
|
129 |
</td>
|
130 |
</tr>
|
131 |
<tr>
|
132 |
-
<th scope="row" valign="top">
|
133 |
-
<label for="showexcerpts"><?php _e('Show Excerpts to Non-Members?', 'pmpro');?></label>
|
134 |
-
</th>
|
135 |
-
<td>
|
136 |
-
<select id="showexcerpts" name="showexcerpts">
|
137 |
-
<option value="0" <?php if(!$showexcerpts) { ?>selected="selected"<?php } ?>><?php _e('No - Hide excerpts.', 'pmpro');?></option>
|
138 |
-
<option value="1" <?php if($showexcerpts == 1) { ?>selected="selected"<?php } ?>><?php _e('Yes - Show excerpts.', 'pmpro');?></option>
|
139 |
-
</select>
|
140 |
-
</td>
|
141 |
-
</tr>
|
142 |
-
<tr>
|
143 |
<th scope="row" valign="top">
|
144 |
<label for="hideads">Hide Ads From Members?</label>
|
145 |
</th>
|
@@ -257,73 +237,9 @@ if(pmpro_displayAds())
|
|
257 |
<option value="1" <?php if($hide_footer_link == 1) { ?>selected="selected"<?php } ?>>Yes - Hide the link.</option>
|
258 |
</select>
|
259 |
</td>
|
260 |
-
</tr>
|
261 |
-
*/
|
262 |
-
|
263 |
-
// Filter to Add More Advanced Settings for Misc Plugin Options, etc.
|
264 |
-
if (has_action('pmpro_custom_advanced_settings')) {
|
265 |
-
$custom_fields = apply_filters('pmpro_custom_advanced_settings', $custom_fields);
|
266 |
-
foreach ($custom_fields as $field) {
|
267 |
-
?>
|
268 |
-
<tr>
|
269 |
-
<th valign="top" scope="row">
|
270 |
-
<label
|
271 |
-
for="<?php _e($field['field_name'], 'pmpro'); ?>"><?php _e($field['label'], 'pmpro'); ?></label>
|
272 |
-
</th>
|
273 |
-
<td>
|
274 |
-
<?php
|
275 |
-
switch ($field['field_type']) {
|
276 |
-
case 'select':
|
277 |
-
?>
|
278 |
-
<select id="<?php _e($field['field_name'], 'pmpro'); ?>"
|
279 |
-
name="<?php _e($field['field_name'], 'pmpro'); ?>">
|
280 |
-
<?php foreach ($field['options'] as $option) {
|
281 |
-
?>
|
282 |
-
<option value="<?php _e($option, 'pmpro'); ?>"
|
283 |
-
<?php
|
284 |
-
if ($option == pmpro_getOption($field['field_name'])) {
|
285 |
-
_e('selected', 'pmpro');
|
286 |
-
}
|
287 |
-
?>
|
288 |
-
><?php _e($option, 'pmpro'); ?></option>
|
289 |
-
<?php
|
290 |
-
} ?>
|
291 |
-
</select>
|
292 |
-
<?php
|
293 |
-
break;
|
294 |
-
case 'text':
|
295 |
-
?>
|
296 |
-
<input id="<?php _e($field['field_name'], 'pmpro'); ?>"
|
297 |
-
name="<?php _e($field['field_name'], 'pmpro'); ?>"
|
298 |
-
type="<?php _e($field['field_type'], 'pmpro'); ?>"
|
299 |
-
value="<?php echo pmpro_getOption($field['field_name']); ?> ">
|
300 |
-
<?php
|
301 |
-
break;
|
302 |
-
case 'textarea':
|
303 |
-
?>
|
304 |
-
<textarea id="<?php _e($field['field_name'], 'pmpro'); ?>"
|
305 |
-
name="<?php _e($field['field_name'], 'pmpro'); ?>">
|
306 |
-
<?php echo pmpro_getOption($field['field_name']); ?>
|
307 |
-
</textarea>
|
308 |
-
<?php
|
309 |
-
break;
|
310 |
-
default:
|
311 |
-
break;
|
312 |
-
}
|
313 |
-
if (!empty($field['description'])) {
|
314 |
-
?>
|
315 |
-
<br>
|
316 |
-
<small><?php _e($field['description'], 'pmpro'); ?></small>
|
317 |
-
<?php
|
318 |
-
}
|
319 |
-
?>
|
320 |
-
</td>
|
321 |
-
<?php
|
322 |
-
}
|
323 |
-
}
|
324 |
-
?>
|
325 |
-
</tr>
|
326 |
-
</tbody>
|
327 |
</table>
|
328 |
<script>
|
329 |
function pmpro_updateHideAdsTRs()
|
@@ -365,7 +281,7 @@ if(pmpro_displayAds())
|
|
365 |
</script>
|
366 |
|
367 |
<p class="submit">
|
368 |
-
<input name="savesettings" type="submit" class="button
|
369 |
</p>
|
370 |
</form>
|
371 |
|
1 |
<?php
|
2 |
//only admins can get this
|
3 |
+
if(!function_exists("current_user_can") || !current_user_can("manage_options"))
|
4 |
{
|
5 |
die(__("You do not have permissions to perform this action.", "pmpro"));
|
6 |
}
|
14 |
pmpro_setOption("nonmembertext");
|
15 |
pmpro_setOption("notloggedintext");
|
16 |
pmpro_setOption("rsstext");
|
|
|
17 |
pmpro_setOption("showexcerpts");
|
18 |
pmpro_setOption("hideads");
|
19 |
pmpro_setOption("hideadslevels");
|
29 |
|
30 |
//footer link
|
31 |
pmpro_setOption("hide_footer_link");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
|
33 |
//assume success
|
34 |
$msg = true;
|
39 |
$notloggedintext = pmpro_getOption("notloggedintext");
|
40 |
$rsstext = pmpro_getOption("rsstext");
|
41 |
$hideads = pmpro_getOption("hideads");
|
|
|
42 |
$showexcerpts = pmpro_getOption("showexcerpts");
|
43 |
$hideadslevels = pmpro_getOption("hideadslevels");
|
44 |
|
56 |
//default settings
|
57 |
if(!$nonmembertext)
|
58 |
{
|
59 |
+
$nonmembertext = "This content is for !!levels!! members only. <a href=\"" . wp_login_url() . "?action=register\">Register here</a>.";
|
60 |
pmpro_setOption("nonmembertext", $nonmembertext);
|
61 |
}
|
62 |
if(!$notloggedintext)
|
63 |
{
|
64 |
+
$notloggedintext = "Please <a href=\"" . wp_login_url( get_permalink() ) . "\">login</a> to view this content. (<a href=\"" . wp_login_url() . "?action=register\">Register here</a>.)";
|
65 |
pmpro_setOption("notloggedintext", $notloggedintext);
|
66 |
}
|
67 |
if(!$rsstext)
|
68 |
{
|
69 |
+
$rsstext = "This content is for members only. Visit the site and log in/register to read.";
|
70 |
pmpro_setOption("rsstext", $rsstext);
|
71 |
}
|
72 |
|
110 |
|
111 |
<tr>
|
112 |
<th scope="row" valign="top">
|
113 |
+
<label for="showexcerpts"><?php _e('Show Excerpts to Non-Members?', 'pmpro');?></label>
|
114 |
</th>
|
115 |
<td>
|
116 |
+
<select id="showexcerpts" name="showexcerpts">
|
117 |
+
<option value="0" <?php if(!$showexcerpts) { ?>selected="selected"<?php } ?>><?php _e('No - Hide excerpts.', 'pmpro');?></option>
|
118 |
+
<option value="1" <?php if($showexcerpts == 1) { ?>selected="selected"<?php } ?>><?php _e('Yes - Show excerpts.', 'pmpro');?></option>
|
119 |
</select>
|
120 |
</td>
|
121 |
</tr>
|
122 |
<tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
<th scope="row" valign="top">
|
124 |
<label for="hideads">Hide Ads From Members?</label>
|
125 |
</th>
|
237 |
<option value="1" <?php if($hide_footer_link == 1) { ?>selected="selected"<?php } ?>>Yes - Hide the link.</option>
|
238 |
</select>
|
239 |
</td>
|
240 |
+
</tr>
|
241 |
+
*/ ?>
|
242 |
+
</tbody>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
243 |
</table>
|
244 |
<script>
|
245 |
function pmpro_updateHideAdsTRs()
|
281 |
</script>
|
282 |
|
283 |
<p class="submit">
|
284 |
+
<input name="savesettings" type="submit" class="button-primary" value="<?php _e('Save Settings', 'pmpro');?>" />
|
285 |
</p>
|
286 |
</form>
|
287 |
|
adminpages/dashboard.php
CHANGED
@@ -105,9 +105,9 @@
|
|
105 |
|
106 |
echo '</ul>';
|
107 |
echo '<br class="clear"/><div style="margin-top:10px;border-top: 1px solid #ddd; padding-top: 10px; text-align:center;">';
|
108 |
-
echo '<a
|
109 |
echo ' ';
|
110 |
-
echo '<a
|
111 |
echo '<form class="alignright" method="post"><input type="hidden" name="pmpro_removedbwidget" value="true"/><input title="Remove this widget from all users dashboards" class="button" type="submit" value="X"/></form>';
|
112 |
echo '</div>';
|
113 |
}
|
105 |
|
106 |
echo '</ul>';
|
107 |
echo '<br class="clear"/><div style="margin-top:10px;border-top: 1px solid #ddd; padding-top: 10px; text-align:center;">';
|
108 |
+
echo '<a href="'.$pmpro_feed.'"><img src="'.get_bloginfo('wpurl').'/wp-includes/images/rss.png" alt=""/> Subscribe with RSS</a>';
|
109 |
echo ' ';
|
110 |
+
echo '<a href="http://www.paidmembershipspro.com/"><img src="'.get_bloginfo('wpurl').'/wp-includes/images/wpmini-blue.png" alt=""/> View Online</a>';
|
111 |
echo '<form class="alignright" method="post"><input type="hidden" name="pmpro_removedbwidget" value="true"/><input title="Remove this widget from all users dashboards" class="button" type="submit" value="X"/></form>';
|
112 |
echo '</div>';
|
113 |
}
|
adminpages/discountcodes.php
CHANGED
@@ -36,8 +36,8 @@
|
|
36 |
$uses = $_POST['uses'];
|
37 |
|
38 |
//fix up dates
|
39 |
-
$starts = date("Y-m-d", strtotime($starts_month . "/" . $starts_day . "/" . $starts_year
|
40 |
-
$expires = date("Y-m-d", strtotime($expires_month . "/" . $expires_day . "/" . $expires_year
|
41 |
|
42 |
//updating or new?
|
43 |
if($saveid > 0)
|
@@ -189,7 +189,7 @@
|
|
189 |
if($wpdb->query($sqlQuery) !== false)
|
190 |
{
|
191 |
//okay
|
192 |
-
do_action("pmpro_save_discount_code_level", $
|
193 |
}
|
194 |
else
|
195 |
{
|
@@ -221,9 +221,6 @@
|
|
221 |
$code = $wpdb->get_var("SELECT code FROM $wpdb->pmpro_discount_codes WHERE id = '" . $delete . "' LIMIT 1");
|
222 |
if(!empty($code))
|
223 |
{
|
224 |
-
//action
|
225 |
-
do_action("pmpro_delete_discount_code", $delete);
|
226 |
-
|
227 |
//delete the code levels
|
228 |
$r1 = $wpdb->query("DELETE FROM $wpdb->pmpro_discount_codes_levels WHERE code_id = '" . $delete . "'");
|
229 |
|
@@ -356,7 +353,7 @@
|
|
356 |
for($i = 1; $i < 13; $i++)
|
357 |
{
|
358 |
?>
|
359 |
-
<option value="<?php echo $i?>" <?php if($i == $selected_starts_month) { ?>selected="selected"<?php } ?>><?php echo date("M", strtotime($i . "/1/" . $current_year
|
360 |
<?php
|
361 |
}
|
362 |
?>
|
@@ -374,7 +371,7 @@
|
|
374 |
for($i = 1; $i < 13; $i++)
|
375 |
{
|
376 |
?>
|
377 |
-
<option value="<?php echo $i?>" <?php if($i == $selected_expires_month) { ?>selected="selected"<?php } ?>><?php echo date("M", strtotime($i . "/1/" . $current_year
|
378 |
<?php
|
379 |
}
|
380 |
?>
|
@@ -385,7 +382,7 @@
|
|
385 |
</tr>
|
386 |
|
387 |
<tr>
|
388 |
-
<th scope="row" valign="top"><label for="uses"><?php
|
389 |
<td>
|
390 |
<input name="uses" type="text" size="10" value="<?php if(!empty($code->uses)) echo str_replace("\"", """, stripslashes($code->uses));?>" />
|
391 |
<small class="pmpro_lite"><?php _e('Leave blank for unlimited uses.', 'pmpro');?></small>
|
@@ -397,7 +394,7 @@
|
|
397 |
|
398 |
<?php do_action("pmpro_discount_code_after_settings"); ?>
|
399 |
|
400 |
-
<h3
|
401 |
|
402 |
<div class="pmpro_discount_levels">
|
403 |
<?php
|
@@ -437,13 +434,13 @@
|
|
437 |
</tr>
|
438 |
|
439 |
<tr class="recurring_info" <?php if(!pmpro_isLevelRecurring($level)) {?>style="display: none;"<?php } ?>>
|
440 |
-
<th scope="row" valign="top"><label for="billing_amount"><?php _e('Billing
|
441 |
<td>
|
442 |
<?php echo $pmpro_currency_symbol?><input name="billing_amount[]" type="text" size="20" value="<?php echo str_replace("\"", """, stripslashes($level->billing_amount))?>" /> <small>per</small>
|
443 |
<input name="cycle_number[]" type="text" size="10" value="<?php echo str_replace("\"", """, stripslashes($level->cycle_number))?>" />
|
444 |
<select name="cycle_period[]" onchange="updateCyclePeriod();">
|
445 |
<?php
|
446 |
-
$cycles = array(
|
447 |
foreach ( $cycles as $name => $value ) {
|
448 |
echo "<option value='$value'";
|
449 |
if ( $level->cycle_period == $value ) echo " selected='selected'";
|
@@ -480,7 +477,7 @@
|
|
480 |
|
481 |
<tr>
|
482 |
<th scope="row" valign="top"><label><?php _e('Membership Expiration', 'pmpro');?>:</label></th>
|
483 |
-
<td><input id="expiration" name="expiration[]" type="checkbox" value="<?php echo $level->id?>" <?php if(pmpro_isLevelExpiring($level)) { echo "checked='checked'"; } ?> onclick="if(jQuery(this).is(':checked')) { jQuery(this).parent().parent().siblings('.expiration_info').show(); } else { jQuery(this).parent().parent().siblings('.expiration_info').hide();}" />
|
484 |
</tr>
|
485 |
|
486 |
<tr class="expiration_info" <?php if(!pmpro_isLevelExpiring($level)) {?>style="display: none;"<?php } ?>>
|
@@ -489,7 +486,7 @@
|
|
489 |
<input id="expiration_number" name="expiration_number[]" type="text" size="10" value="<?php echo str_replace("\"", """, stripslashes($level->expiration_number))?>" />
|
490 |
<select id="expiration_period" name="expiration_period[]">
|
491 |
<?php
|
492 |
-
$cycles = array(
|
493 |
foreach ( $cycles as $name => $value ) {
|
494 |
echo "<option value='$value'";
|
495 |
if ( $level->expiration_period == $value ) echo " selected='selected'";
|
@@ -497,7 +494,7 @@
|
|
497 |
}
|
498 |
?>
|
499 |
</select>
|
500 |
-
<br /><small><?php _e('
|
501 |
</td>
|
502 |
</tr>
|
503 |
</tbody>
|
@@ -516,8 +513,8 @@
|
|
516 |
</div>
|
517 |
|
518 |
<p class="submit topborder">
|
519 |
-
<input name="save" type="submit" class="button
|
520 |
-
<input name="cancel" type="button"
|
521 |
</p>
|
522 |
</form>
|
523 |
</div>
|
@@ -526,7 +523,7 @@
|
|
526 |
|
527 |
<h2>
|
528 |
<?php _e('Memberships Discount Codes', 'pmpro');?>
|
529 |
-
<a href="admin.php?page=pmpro-discountcodes&edit=-1" class="add-new-h2"><?php _e('Add New Discount Code', 'pmpro');?></a>
|
530 |
</h2>
|
531 |
|
532 |
<?php if(!empty($pmpro_msg)) { ?>
|
@@ -543,14 +540,7 @@
|
|
543 |
</form>
|
544 |
|
545 |
<br class="clear" />
|
546 |
-
|
547 |
-
$sqlQuery = "SELECT *, UNIX_TIMESTAMP(starts) as starts, UNIX_TIMESTAMP(expires) as expires FROM $wpdb->pmpro_discount_codes ";
|
548 |
-
if(!empty($s))
|
549 |
-
$sqlQuery .= "WHERE code LIKE '%$s%' ";
|
550 |
-
$sqlQuery .= "ORDER BY id ASC";
|
551 |
-
|
552 |
-
$codes = $wpdb->get_results($sqlQuery, OBJECT);
|
553 |
-
?>
|
554 |
<table class="widefat">
|
555 |
<thead>
|
556 |
<tr>
|
@@ -560,13 +550,19 @@
|
|
560 |
<th><?php _e('Expires', 'pmpro');?></th>
|
561 |
<th><?php _e('Uses', 'pmpro');?></th>
|
562 |
<th><?php _e('Levels', 'pmpro');?></th>
|
563 |
-
<?php do_action("pmpro_discountcodes_extra_cols_header", $codes);?>
|
564 |
<th></th>
|
565 |
<th></th>
|
566 |
</tr>
|
567 |
</thead>
|
568 |
<tbody>
|
569 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
570 |
if(!$codes)
|
571 |
{
|
572 |
?>
|
@@ -614,7 +610,6 @@
|
|
614 |
echo "None";
|
615 |
?>
|
616 |
</td>
|
617 |
-
<?php do_action("pmpro_discountcodes_extra_cols_body", $code);?>
|
618 |
<td>
|
619 |
<a href="?page=pmpro-discountcodes&edit=<?php echo $code->id?>"><?php _e('edit', 'pmpro');?></a>
|
620 |
</td>
|
@@ -633,4 +628,4 @@
|
|
633 |
|
634 |
<?php
|
635 |
require_once(dirname(__FILE__) . "/admin_footer.php");
|
636 |
-
?>
|
36 |
$uses = $_POST['uses'];
|
37 |
|
38 |
//fix up dates
|
39 |
+
$starts = date("Y-m-d", strtotime($starts_month . "/" . $starts_day . "/" . $starts_year));
|
40 |
+
$expires = date("Y-m-d", strtotime($expires_month . "/" . $expires_day . "/" . $expires_year));
|
41 |
|
42 |
//updating or new?
|
43 |
if($saveid > 0)
|
189 |
if($wpdb->query($sqlQuery) !== false)
|
190 |
{
|
191 |
//okay
|
192 |
+
do_action("pmpro_save_discount_code_level", $saveid, $level_id);
|
193 |
}
|
194 |
else
|
195 |
{
|
221 |
$code = $wpdb->get_var("SELECT code FROM $wpdb->pmpro_discount_codes WHERE id = '" . $delete . "' LIMIT 1");
|
222 |
if(!empty($code))
|
223 |
{
|
|
|
|
|
|
|
224 |
//delete the code levels
|
225 |
$r1 = $wpdb->query("DELETE FROM $wpdb->pmpro_discount_codes_levels WHERE code_id = '" . $delete . "'");
|
226 |
|
353 |
for($i = 1; $i < 13; $i++)
|
354 |
{
|
355 |
?>
|
356 |
+
<option value="<?php echo $i?>" <?php if($i == $selected_starts_month) { ?>selected="selected"<?php } ?>><?php echo date("M", strtotime($i . "/1/" . $current_year))?></option>
|
357 |
<?php
|
358 |
}
|
359 |
?>
|
371 |
for($i = 1; $i < 13; $i++)
|
372 |
{
|
373 |
?>
|
374 |
+
<option value="<?php echo $i?>" <?php if($i == $selected_expires_month) { ?>selected="selected"<?php } ?>><?php echo date("M", strtotime($i . "/1/" . $current_year))?></option>
|
375 |
<?php
|
376 |
}
|
377 |
?>
|
382 |
</tr>
|
383 |
|
384 |
<tr>
|
385 |
+
<th scope="row" valign="top"><label for="uses"><?php _ex('Uses', 'Number of uses for a discount code', 'pmpro');?>:</label></th>
|
386 |
<td>
|
387 |
<input name="uses" type="text" size="10" value="<?php if(!empty($code->uses)) echo str_replace("\"", """, stripslashes($code->uses));?>" />
|
388 |
<small class="pmpro_lite"><?php _e('Leave blank for unlimited uses.', 'pmpro');?></small>
|
394 |
|
395 |
<?php do_action("pmpro_discount_code_after_settings"); ?>
|
396 |
|
397 |
+
<h3>Which Levels Will This Code Apply To?</h3>
|
398 |
|
399 |
<div class="pmpro_discount_levels">
|
400 |
<?php
|
434 |
</tr>
|
435 |
|
436 |
<tr class="recurring_info" <?php if(!pmpro_isLevelRecurring($level)) {?>style="display: none;"<?php } ?>>
|
437 |
+
<th scope="row" valign="top"><label for="billing_amount"><?php _e('Billing Ammount', 'pmpro');?>:</label></th>
|
438 |
<td>
|
439 |
<?php echo $pmpro_currency_symbol?><input name="billing_amount[]" type="text" size="20" value="<?php echo str_replace("\"", """, stripslashes($level->billing_amount))?>" /> <small>per</small>
|
440 |
<input name="cycle_number[]" type="text" size="10" value="<?php echo str_replace("\"", """, stripslashes($level->cycle_number))?>" />
|
441 |
<select name="cycle_period[]" onchange="updateCyclePeriod();">
|
442 |
<?php
|
443 |
+
$cycles = array( 'Day(s)' => 'Day', 'Week(s)' => 'Week', 'Month(s)' => 'Month', 'Year(s)' => 'Year' );
|
444 |
foreach ( $cycles as $name => $value ) {
|
445 |
echo "<option value='$value'";
|
446 |
if ( $level->cycle_period == $value ) echo " selected='selected'";
|
477 |
|
478 |
<tr>
|
479 |
<th scope="row" valign="top"><label><?php _e('Membership Expiration', 'pmpro');?>:</label></th>
|
480 |
+
<td><input id="expiration" name="expiration[]" type="checkbox" value="<?php echo $level->id?>" <?php if(pmpro_isLevelExpiring($level)) { echo "checked='checked'"; } ?> onclick="if(jQuery(this).is(':checked')) { jQuery(this).parent().parent().siblings('.expiration_info').show(); } else { jQuery(this).parent().parent().siblings('.expiration_info').hide();}" /> <small><?php _e('Check this to set an expiration date for new sign ups.', 'pmpro');?></small></td>
|
481 |
</tr>
|
482 |
|
483 |
<tr class="expiration_info" <?php if(!pmpro_isLevelExpiring($level)) {?>style="display: none;"<?php } ?>>
|
486 |
<input id="expiration_number" name="expiration_number[]" type="text" size="10" value="<?php echo str_replace("\"", """, stripslashes($level->expiration_number))?>" />
|
487 |
<select id="expiration_period" name="expiration_period[]">
|
488 |
<?php
|
489 |
+
$cycles = array( 'Day(s)' => 'Day', 'Week(s)' => 'Week', 'Month(s)' => 'Month', 'Year(s)' => 'Year' );
|
490 |
foreach ( $cycles as $name => $value ) {
|
491 |
echo "<option value='$value'";
|
492 |
if ( $level->expiration_period == $value ) echo " selected='selected'";
|
494 |
}
|
495 |
?>
|
496 |
</select>
|
497 |
+
<br /><small><?php _e('How long before the expiration expires. Note that any future payments will be cancelled when the membership expires.', 'pmpro');?></small>
|
498 |
</td>
|
499 |
</tr>
|
500 |
</tbody>
|
513 |
</div>
|
514 |
|
515 |
<p class="submit topborder">
|
516 |
+
<input name="save" type="submit" class="button-primary" value="Save Code" />
|
517 |
+
<input name="cancel" type="button" value="Cancel" onclick="location.href='<?php echo get_admin_url(NULL, '/admin.php?page=pmpro-discountcodes')?>';" />
|
518 |
</p>
|
519 |
</form>
|
520 |
</div>
|
523 |
|
524 |
<h2>
|
525 |
<?php _e('Memberships Discount Codes', 'pmpro');?>
|
526 |
+
<a href="admin.php?page=pmpro-discountcodes&edit=-1" class="button add-new-h2"><?php _e('Add New Discount Code', 'pmpro');?></a>
|
527 |
</h2>
|
528 |
|
529 |
<?php if(!empty($pmpro_msg)) { ?>
|
540 |
</form>
|
541 |
|
542 |
<br class="clear" />
|
543 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
544 |
<table class="widefat">
|
545 |
<thead>
|
546 |
<tr>
|
550 |
<th><?php _e('Expires', 'pmpro');?></th>
|
551 |
<th><?php _e('Uses', 'pmpro');?></th>
|
552 |
<th><?php _e('Levels', 'pmpro');?></th>
|
|
|
553 |
<th></th>
|
554 |
<th></th>
|
555 |
</tr>
|
556 |
</thead>
|
557 |
<tbody>
|
558 |
<?php
|
559 |
+
$sqlQuery = "SELECT *, UNIX_TIMESTAMP(starts) as starts, UNIX_TIMESTAMP(expires) as expires FROM $wpdb->pmpro_discount_codes ";
|
560 |
+
if(!empty($s))
|
561 |
+
$sqlQuery .= "WHERE code LIKE '%$s%' ";
|
562 |
+
$sqlQuery .= "ORDER BY id ASC";
|
563 |
+
|
564 |
+
$codes = $wpdb->get_results($sqlQuery, OBJECT);
|
565 |
+
|
566 |
if(!$codes)
|
567 |
{
|
568 |
?>
|
610 |
echo "None";
|
611 |
?>
|
612 |
</td>
|
|
|
613 |
<td>
|
614 |
<a href="?page=pmpro-discountcodes&edit=<?php echo $code->id?>"><?php _e('edit', 'pmpro');?></a>
|
615 |
</td>
|
628 |
|
629 |
<?php
|
630 |
require_once(dirname(__FILE__) . "/admin_footer.php");
|
631 |
+
?>
|
adminpages/emailsettings.php
CHANGED
@@ -1,181 +1,152 @@
|
|
1 |
-
<?php
|
2 |
-
//only admins can get this
|
3 |
-
if(!function_exists("current_user_can") || (!current_user_can("manage_options") && !current_user_can("pmpro_emailsettings")))
|
4 |
-
{
|
5 |
-
die(__("You do not have permissions to perform this action.", "pmpro"));
|
6 |
-
}
|
7 |
-
|
8 |
-
global $wpdb, $msg, $msgt;
|
9 |
-
|
10 |
-
//get/set settings
|
11 |
-
global $pmpro_pages;
|
12 |
-
if(!empty($_REQUEST['savesettings']))
|
13 |
-
{
|
14 |
-
//email options
|
15 |
-
pmpro_setOption("from_email");
|
16 |
-
pmpro_setOption("from_name");
|
17 |
-
|
18 |
-
|
19 |
-
pmpro_setOption("
|
20 |
-
pmpro_setOption("
|
21 |
-
pmpro_setOption("
|
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 |
-
|
144 |
-
|
145 |
-
|
146 |
-
<
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
</td>
|
154 |
-
</tr>
|
155 |
-
</tbody>
|
156 |
-
</table>
|
157 |
-
|
158 |
-
<h3><?php _e('Send members emails', 'pmpro');?>:</h3>
|
159 |
-
|
160 |
-
<table class="form-table">
|
161 |
-
<tbody>
|
162 |
-
<tr>
|
163 |
-
<th scope="row" valign="top">
|
164 |
-
<label for="email_admin_checkout"><?php _e('New Users', 'pmpro');?>:</label>
|
165 |
-
</th>
|
166 |
-
<td>
|
167 |
-
<input type="checkbox" id="email_member_notification" name="email_member_notification" value="1" <?php if(!empty($email_member_notification)) { ?>checked="checked"<?php } ?> />
|
168 |
-
<?php _e('Default WP notification email. (Recommended: Leave unchecked. Members will still get an email confirmation from PMPro after checkout.)', 'pmpro');?>
|
169 |
-
</td>
|
170 |
-
</tr>
|
171 |
-
</tbody>
|
172 |
-
</table>
|
173 |
-
|
174 |
-
<p class="submit">
|
175 |
-
<input name="savesettings" type="submit" class="button-primary" value="Save Settings" />
|
176 |
-
</p>
|
177 |
-
</form>
|
178 |
-
|
179 |
-
<?php
|
180 |
-
require_once(dirname(__FILE__) . "/admin_footer.php");
|
181 |
-
?>
|
1 |
+
<?php
|
2 |
+
//only admins can get this
|
3 |
+
if(!function_exists("current_user_can") || (!current_user_can("manage_options") && !current_user_can("pmpro_emailsettings")))
|
4 |
+
{
|
5 |
+
die(__("You do not have permissions to perform this action.", "pmpro"));
|
6 |
+
}
|
7 |
+
|
8 |
+
global $wpdb, $msg, $msgt;
|
9 |
+
|
10 |
+
//get/set settings
|
11 |
+
global $pmpro_pages;
|
12 |
+
if(!empty($_REQUEST['savesettings']))
|
13 |
+
{
|
14 |
+
//email options
|
15 |
+
pmpro_setOption("from_email");
|
16 |
+
pmpro_setOption("from_name");
|
17 |
+
|
18 |
+
pmpro_setOption("email_admin_checkout");
|
19 |
+
pmpro_setOption("email_admin_changes");
|
20 |
+
pmpro_setOption("email_admin_cancels");
|
21 |
+
pmpro_setOption("email_admin_billing");
|
22 |
+
|
23 |
+
pmpro_setOption("email_member_notification");
|
24 |
+
|
25 |
+
//assume success
|
26 |
+
$msg = true;
|
27 |
+
$msgt = "Your email settings have been updated.";
|
28 |
+
}
|
29 |
+
|
30 |
+
$from_email = pmpro_getOption("from_email");
|
31 |
+
$from_name = pmpro_getOption("from_name");
|
32 |
+
|
33 |
+
$email_admin_checkout = pmpro_getOption("email_admin_checkout");
|
34 |
+
$email_admin_changes = pmpro_getOption("email_admin_changes");
|
35 |
+
$email_admin_cancels = pmpro_getOption("email_admin_cancels");
|
36 |
+
$email_admin_billing = pmpro_getOption("email_admin_billing");
|
37 |
+
|
38 |
+
$email_member_notification = pmpro_getOption("email_member_notification");
|
39 |
+
|
40 |
+
if(empty($from_email))
|
41 |
+
{
|
42 |
+
$parsed = parse_url(home_url());
|
43 |
+
$hostname = $parsed[host];
|
44 |
+
$hostparts = split("\.", $hostname);
|
45 |
+
$email_domain = $hostparts[count($hostparts) - 2] . "." . $hostparts[count($hostparts) - 1];
|
46 |
+
$from_email = "wordpress@" . $email_domain;
|
47 |
+
pmpro_setOption("from_email", $from_email);
|
48 |
+
}
|
49 |
+
|
50 |
+
if(empty($from_name))
|
51 |
+
{
|
52 |
+
$from_name = "WordPress";
|
53 |
+
pmpro_setOption("from_name", $from_name);
|
54 |
+
}
|
55 |
+
|
56 |
+
require_once(dirname(__FILE__) . "/admin_header.php");
|
57 |
+
?>
|
58 |
+
|
59 |
+
<form action="" method="post" enctype="multipart/form-data">
|
60 |
+
<h2><?php _e('Email Settings', 'pmpro');?></h2>
|
61 |
+
<p><?php _e('By default, system generated emails are sent from <em><strong>wordpress@yourdomain.com</strong></em>. You can update this from address using the fields below.', 'pmpro');?></p>
|
62 |
+
|
63 |
+
<p><?php _e('To modify the appearance of system generated emails, add the files <em>email_header.html</em> and <em>email_footer.html</em> to your theme\'s directory. This will modify both the WordPress default messages as well as messages generated by Paid Memberships Pro. <a title="Paid Memberships Pro - Member Communications" target="_blank" href="http://www.paidmembershipspro.com/documentation/member-communications/">Click here to learn more about Paid Memberships Pro emails</a>.', 'pmpro');?></p>
|
64 |
+
|
65 |
+
<table class="form-table">
|
66 |
+
<tbody>
|
67 |
+
<tr>
|
68 |
+
<th scope="row" valign="top">
|
69 |
+
<label for="from_email"><?php _e('From Email', 'pmpro');?>:</label>
|
70 |
+
</th>
|
71 |
+
<td>
|
72 |
+
<input type="text" name="from_email" size="60" value="<?php echo $from_email?>" />
|
73 |
+
</td>
|
74 |
+
</tr>
|
75 |
+
<tr>
|
76 |
+
<th scope="row" valign="top">
|
77 |
+
<label for="from_name"><?php _e('From Name', 'pmpro');?>:</label>
|
78 |
+
</th>
|
79 |
+
<td>
|
80 |
+
<input type="text" name="from_name" size="60" value="<?php echo $from_name?>" />
|
81 |
+
</td>
|
82 |
+
</tr>
|
83 |
+
</tbody>
|
84 |
+
</table>
|
85 |
+
|
86 |
+
<h3><?php _e('Send the site admin emails', 'pmpro');?>:</h3>
|
87 |
+
|
88 |
+
<table class="form-table">
|
89 |
+
<tbody>
|
90 |
+
<tr>
|
91 |
+
<th scope="row" valign="top">
|
92 |
+
<label for="email_admin_checkout"><?php _e('Checkout', 'pmpro');?>:</label>
|
93 |
+
</th>
|
94 |
+
<td>
|
95 |
+
<input type="checkbox" id="email_admin_checkout" name="email_admin_checkout" value="1" <?php if(!empty($email_admin_checkout)) { ?>checked="checked"<?php } ?> />
|
96 |
+
<?php _e('when a member checks out.', 'pmpro');?>
|
97 |
+
</td>
|
98 |
+
</tr>
|
99 |
+
<tr>
|
100 |
+
<th scope="row" valign="top">
|
101 |
+
<label for="email_admin_changes"><?php _e('Admin Changes', 'pmpro');?>:</label>
|
102 |
+
</th>
|
103 |
+
<td>
|
104 |
+
<input type="checkbox" id="email_admin_changes" name="email_admin_changes" value="1" <?php if(!empty($email_admin_changes)) { ?>checked="checked"<?php } ?> />
|
105 |
+
<?php _e('when an admin changes a user\'s membership level through the dashboard.', 'pmpro');?>
|
106 |
+
</td>
|
107 |
+
</tr>
|
108 |
+
<tr>
|
109 |
+
<th scope="row" valign="top">
|
110 |
+
<label for="email_admin_cancels"><?php _e('Cancellation', 'pmpro');?>:</label>
|
111 |
+
</th>
|
112 |
+
<td>
|
113 |
+
<input type="checkbox" id="email_admin_cancels" name="email_admin_cancels" value="1" <?php if(!empty($email_admin_cancels)) { ?>checked="checked"<?php } ?> />
|
114 |
+
<?php _e('when a user cancels his or her account.', 'pmpro');?>
|
115 |
+
</td>
|
116 |
+
</tr>
|
117 |
+
<tr>
|
118 |
+
<th scope="row" valign="top">
|
119 |
+
<label for="email_admin_billing"><?php _e('Bill Updates', 'pmpro');?>:</label>
|
120 |
+
</th>
|
121 |
+
<td>
|
122 |
+
<input type="checkbox" id="email_admin_billing" name="email_admin_billing" value="1" <?php if(!empty($email_admin_billing)) { ?>checked="checked"<?php } ?> />
|
123 |
+
<?php _e('when a user updates his or her billing information.', 'pmpro');?>
|
124 |
+
</td>
|
125 |
+
</tr>
|
126 |
+
</tbody>
|
127 |
+
</table>
|
128 |
+
|
129 |
+
<h3><?php _e('Send members emails', 'pmpro');?>:</h3>
|
130 |
+
|
131 |
+
<table class="form-table">
|
132 |
+
<tbody>
|
133 |
+
<tr>
|
134 |
+
<th scope="row" valign="top">
|
135 |
+
<label for="email_admin_checkout"><?php _e('New Users', 'pmpro');?>:</label>
|
136 |
+
</th>
|
137 |
+
<td>
|
138 |
+
<input type="checkbox" id="email_member_notification" name="email_member_notification" value="1" <?php if(!empty($email_member_notification)) { ?>checked="checked"<?php } ?> />
|
139 |
+
<?php _e('Default WP notification email. (Recommended: Leave unchecked. Members will still get an email confirmation from PMPro after checkout.)', 'pmpro');?>
|
140 |
+
</td>
|
141 |
+
</tr>
|
142 |
+
</tbody>
|
143 |
+
</table>
|
144 |
+
|
145 |
+
<p class="submit">
|
146 |
+
<input name="savesettings" type="submit" class="button-primary" value="Save Settings" />
|
147 |
+
</p>
|
148 |
+
</form>
|
149 |
+
|
150 |
+
<?php
|
151 |
+
require_once(dirname(__FILE__) . "/admin_footer.php");
|
152 |
+
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
adminpages/functions.php
CHANGED
@@ -40,11 +40,11 @@ function pmpro_checkLevelForStripeCompatibility($level = NULL)
|
|
40 |
/*
|
41 |
Stripe currently does not support:
|
42 |
* Trial Amounts > 0.
|
43 |
-
* Daily billing periods.
|
44 |
* Billing Limits.
|
45 |
*/
|
46 |
if($level->trial_amount > 0 ||
|
47 |
-
($level->cycle_number > 0 && $level->cycle_period == "Day") ||
|
48 |
$level->billing_limit > 0)
|
49 |
{
|
50 |
return false;
|
@@ -60,7 +60,7 @@ function pmpro_checkLevelForStripeCompatibility($level = NULL)
|
|
60 |
|
61 |
//check this level
|
62 |
if($level->trial_amount > 0 ||
|
63 |
-
($level->cycle_number > 0 && $level->cycle_period == "Day") ||
|
64 |
$level->billing_limit > 0)
|
65 |
{
|
66 |
return false;
|
40 |
/*
|
41 |
Stripe currently does not support:
|
42 |
* Trial Amounts > 0.
|
43 |
+
* Daily or Weekly billing periods.
|
44 |
* Billing Limits.
|
45 |
*/
|
46 |
if($level->trial_amount > 0 ||
|
47 |
+
($level->cycle_number > 0 && ($level->cycle_period == "Day" || $level->cycle_period == "Week")) ||
|
48 |
$level->billing_limit > 0)
|
49 |
{
|
50 |
return false;
|
60 |
|
61 |
//check this level
|
62 |
if($level->trial_amount > 0 ||
|
63 |
+
($level->cycle_number > 0 && ($level->cycle_period == "Day" || $level->cycle_period == "Week")) ||
|
64 |
$level->billing_limit > 0)
|
65 |
{
|
66 |
return false;
|
adminpages/membershiplevels.php
CHANGED
@@ -157,8 +157,6 @@
|
|
157 |
|
158 |
if($ml_id > 0)
|
159 |
{
|
160 |
-
do_action("pmpro_delete_membership_level", $ml_id);
|
161 |
-
|
162 |
//remove any categories from the ml
|
163 |
$sqlQuery = "DELETE FROM $wpdb->pmpro_memberships_categories WHERE membership_id = '$ml_id'";
|
164 |
$r1 = $wpdb->query($sqlQuery);
|
@@ -363,7 +361,7 @@
|
|
363 |
<br /><small>
|
364 |
<?php _e('The amount to be billed one cycle after the initial payment.', 'pmpro');?>
|
365 |
<?php if($gateway == "stripe") { ?>
|
366 |
-
<br /><strong <?php if(!empty($pmpro_stripe_error)) { ?>class="pmpro_red"<?php } ?>><?php _e('Stripe integration currently only supports billing periods of "
|
367 |
<?php } elseif($gateway == "braintree") { ?>
|
368 |
<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');?>
|
369 |
<?php } elseif($gateway == "payflowpro") { ?>
|
@@ -446,7 +444,7 @@
|
|
446 |
<input id="expiration_number" name="expiration_number" type="text" size="10" value="<?php echo str_replace("\"", """, stripslashes($level->expiration_number))?>" />
|
447 |
<select id="expiration_period" name="expiration_period">
|
448 |
<?php
|
449 |
-
$cycles = array(
|
450 |
foreach ( $cycles as $name => $value ) {
|
451 |
echo "<option value='$value'";
|
452 |
if ( $level->expiration_period == $value ) echo " selected='selected'";
|
@@ -495,7 +493,7 @@
|
|
495 |
{
|
496 |
?>
|
497 |
|
498 |
-
<h2><?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>
|
499 |
<form id="posts-filter" method="get" action="">
|
500 |
<p class="search-box">
|
501 |
<label class="screen-reader-text" for="post-search-input"><?php _e('Search Levels', 'pmpro');?>:</label>
|
@@ -548,7 +546,7 @@
|
|
548 |
<?php if(!pmpro_isLevelRecurring($level)) { ?>
|
549 |
--
|
550 |
<?php } else { ?>
|
551 |
-
<?php echo $pmpro_currency_symbol?><?php echo $level->billing_amount?> <?php _e('every', 'pmpro');?> <?php echo $level->cycle_number.' '.
|
552 |
|
553 |
<?php if($level->billing_limit) { ?>(<?php _e('for', 'pmpro');?> <?php echo $level->billing_limit?> <?php echo sornot($level->cycle_period,$level->billing_limit)?>)<?php } ?>
|
554 |
|
@@ -569,9 +567,9 @@
|
|
569 |
<?php } ?>
|
570 |
</td>
|
571 |
<td><?php if($level->allow_signups) { ?><?php _e('Yes', 'pmpro');?><?php } else { ?><?php _e('No', 'pmpro');?><?php } ?></td>
|
572 |
-
<td align="center"><a href="admin.php?page=pmpro-membershiplevels&
|
573 |
-
<td align="center"><a href="admin.php?page=pmpro-membershiplevels&
|
574 |
-
<td align="center"><a href="javascript: askfirst('<?php printf(__("Are you sure you want to delete membership level %s? All subscriptions will be cancelled.", "pmpro"), $level->name);?>','admin.php?page=pmpro-membershiplevels&
|
575 |
</tr>
|
576 |
<?php
|
577 |
}
|
157 |
|
158 |
if($ml_id > 0)
|
159 |
{
|
|
|
|
|
160 |
//remove any categories from the ml
|
161 |
$sqlQuery = "DELETE FROM $wpdb->pmpro_memberships_categories WHERE membership_id = '$ml_id'";
|
162 |
$r1 = $wpdb->query($sqlQuery);
|
361 |
<br /><small>
|
362 |
<?php _e('The amount to be billed one cycle after the initial payment.', 'pmpro');?>
|
363 |
<?php if($gateway == "stripe") { ?>
|
364 |
+
<br /><strong <?php if(!empty($pmpro_stripe_error)) { ?>class="pmpro_red"<?php } ?>><?php _e('Stripe integration currently only supports billing periods of "Month" or "Year".', 'pmpro');?>
|
365 |
<?php } elseif($gateway == "braintree") { ?>
|
366 |
<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');?>
|
367 |
<?php } elseif($gateway == "payflowpro") { ?>
|
444 |
<input id="expiration_number" name="expiration_number" type="text" size="10" value="<?php echo str_replace("\"", """, stripslashes($level->expiration_number))?>" />
|
445 |
<select id="expiration_period" name="expiration_period">
|
446 |
<?php
|
447 |
+
$cycles = array( 'Day(s)' => 'Day', 'Week(s)' => 'Week', 'Month(s)' => 'Month', 'Year(s)' => 'Year' );
|
448 |
foreach ( $cycles as $name => $value ) {
|
449 |
echo "<option value='$value'";
|
450 |
if ( $level->expiration_period == $value ) echo " selected='selected'";
|
493 |
{
|
494 |
?>
|
495 |
|
496 |
+
<h2><?php _e('Membership Levels', 'pmpro');?> <a href="admin.php?page=pmpro-membershiplevels&edit=-1" class="button add-new-h2"><?php _e('Add New Level', 'pmpro');?></a></h2>
|
497 |
<form id="posts-filter" method="get" action="">
|
498 |
<p class="search-box">
|
499 |
<label class="screen-reader-text" for="post-search-input"><?php _e('Search Levels', 'pmpro');?>:</label>
|
546 |
<?php if(!pmpro_isLevelRecurring($level)) { ?>
|
547 |
--
|
548 |
<?php } else { ?>
|
549 |
+
<?php echo $pmpro_currency_symbol?><?php echo $level->billing_amount?> <?php _e('every', 'pmpro');?> <?php echo $level->cycle_number.' '.sornot($level->cycle_period,$level->cycle_number)?>
|
550 |
|
551 |
<?php if($level->billing_limit) { ?>(<?php _e('for', 'pmpro');?> <?php echo $level->billing_limit?> <?php echo sornot($level->cycle_period,$level->billing_limit)?>)<?php } ?>
|
552 |
|
567 |
<?php } ?>
|
568 |
</td>
|
569 |
<td><?php if($level->allow_signups) { ?><?php _e('Yes', 'pmpro');?><?php } else { ?><?php _e('No', 'pmpro');?><?php } ?></td>
|
570 |
+
<td align="center"><a href="admin.php?page=pmpro-membershiplevels&edit=<?php echo $level->id?>" class="edit"><?php _e('edit', 'pmpro');?></a></td>
|
571 |
+
<td align="center"><a href="admin.php?page=pmpro-membershiplevels©=<?php echo $level->id?>&edit=-1" class="edit"><?php _e('copy', 'pmpro');?></a></td>
|
572 |
+
<td align="center"><a href="javascript: askfirst('<?php printf(__("Are you sure you want to delete membership level %s? All subscriptions will be cancelled.", "pmpro"), $level->name);?>','admin.php?page=pmpro-membershiplevels&action=delete_membership_level&deleteid=<?php echo $level->id?>'); void(0);" class="delete"><?php _e('delete', 'pmpro');?></a></td>
|
573 |
</tr>
|
574 |
<?php
|
575 |
}
|
adminpages/memberslist-csv.php
CHANGED
@@ -42,83 +42,45 @@
|
|
42 |
|
43 |
if($s)
|
44 |
{
|
45 |
-
$sqlQuery = "SELECT SQL_CALC_FOUND_ROWS u.ID, u.user_login, u.user_email, UNIX_TIMESTAMP(u.user_registered) as joindate, u.user_login, u.user_nicename, u.user_url, u.user_registered, u.user_status, u.display_name, mu.membership_id, mu.initial_payment, mu.billing_amount, mu.cycle_period, UNIX_TIMESTAMP(mu.enddate) as enddate, m.name as membership FROM $wpdb->users u LEFT JOIN $wpdb->usermeta um ON u.ID = um.user_id LEFT JOIN $wpdb->pmpro_memberships_users mu ON u.ID = mu.user_id LEFT JOIN $wpdb->pmpro_membership_levels m ON mu.membership_id = m.id ";
|
46 |
-
|
47 |
-
if($l
|
48 |
-
$sqlQuery .= "
|
49 |
-
|
50 |
-
$sqlQuery .= " WHERE mu.membership_id > 0 AND (u.user_login LIKE '%" . esc_sql($s) . "%' OR u.user_email LIKE '%" . esc_sql($s) . "%' OR um.meta_value LIKE '%" . esc_sql($s) . "%') ";
|
51 |
-
|
52 |
-
if($l == "oldmembers")
|
53 |
-
$sqlQuery .= " AND mu.status = 'inactive' AND mu2.status IS NULL ";
|
54 |
-
elseif($l)
|
55 |
-
$sqlQuery .= " AND mu.status = 'active' AND mu.membership_id = '" . esc_sql($l) . "' ";
|
56 |
-
else
|
57 |
-
$sqlQuery .= " AND mu.status = 'active' ";
|
58 |
|
59 |
-
$sqlQuery .= "GROUP BY u.ID ";
|
60 |
-
|
61 |
-
if($l == "oldmembers")
|
62 |
-
$sqlQuery .= "ORDER BY enddate DESC ";
|
63 |
-
else
|
64 |
-
$sqlQuery .= "ORDER BY u.user_registered DESC ";
|
65 |
|
66 |
if($limit)
|
67 |
$sqlQuery .= "LIMIT $start, $limit";
|
68 |
}
|
69 |
else
|
70 |
{
|
71 |
-
$sqlQuery = "SELECT SQL_CALC_FOUND_ROWS u.ID
|
72 |
-
|
73 |
-
if($l
|
74 |
-
|
75 |
-
|
76 |
-
$sqlQuery .= " WHERE mu.membership_id > 0 ";
|
77 |
-
|
78 |
-
if($l == "oldmembers")
|
79 |
-
$sqlQuery .= " AND mu.status = 'inactive' AND mu2.status IS NULL ";
|
80 |
-
elseif($l)
|
81 |
-
$sqlQuery .= " AND mu.status = 'active' AND mu.membership_id = '" . $l . "' ";
|
82 |
-
else
|
83 |
-
$sqlQuery .= " AND mu.status = 'active' ";
|
84 |
-
|
85 |
-
$sqlQuery .= "GROUP BY u.ID ";
|
86 |
-
|
87 |
-
if($l == "oldmembers")
|
88 |
-
$sqlQuery .= "ORDER BY enddate DESC ";
|
89 |
-
else
|
90 |
-
$sqlQuery .= "ORDER BY u.user_registered DESC ";
|
91 |
-
|
92 |
if($limit)
|
93 |
$sqlQuery .= "LIMIT $start, $limit";
|
94 |
}
|
95 |
|
96 |
//filter
|
97 |
$sqlQuery = apply_filters("pmpro_members_list_sql", $sqlQuery);
|
98 |
-
|
99 |
//get users
|
100 |
$theusers = $wpdb->get_col($sqlQuery);
|
101 |
-
|
102 |
//begin output
|
103 |
header("Content-type: text/csv");
|
104 |
-
if($s && $l
|
105 |
-
header("Content-Disposition: attachment; filename=
|
106 |
-
elseif($s && $l)
|
107 |
-
header("Content-Disposition: attachment; filename=members_list_" . intval($l) . "_level_" . sanitize_file_name($s) . ".csv");
|
108 |
elseif($s)
|
109 |
header("Content-Disposition: attachment; filename=members_list_" . sanitize_file_name($s) . ".csv");
|
110 |
-
elseif($l
|
111 |
-
header("Content-Disposition: attachment; filename=
|
112 |
else
|
113 |
header("Content-Disposition: attachment; filename=members_list.csv");
|
114 |
|
115 |
-
$heading = "id,username,firstname,lastname,email,billing firstname,billing lastname,address1,address2,city,state,zipcode,country,phone,membership,initial payment,fee,term,discount_code_id,discount_code,joined";
|
116 |
-
|
117 |
-
if($l == "oldmembers")
|
118 |
-
$heading .= ",ended";
|
119 |
-
else
|
120 |
-
$heading .= ",expires";
|
121 |
-
|
122 |
$heading = apply_filters("pmpro_members_list_csv_heading", $heading);
|
123 |
$csvoutput = $heading;
|
124 |
|
@@ -172,12 +134,7 @@
|
|
172 |
{
|
173 |
//MULTI: This query will need to be updated to support multiple levels per user. Should probably just dump multiple rows for each membership.
|
174 |
//get meta
|
175 |
-
|
176 |
-
if($l == "oldmembers")
|
177 |
-
$theuser = $wpdb->get_row("SELECT u.ID, u.user_login, u.user_email, UNIX_TIMESTAMP(u.user_registered) as joindate, u.user_login, u.user_nicename, u.user_url, u.user_registered, u.user_status, u.display_name, mu.membership_id, mu.initial_payment, mu.billing_amount, mu.cycle_period, UNIX_TIMESTAMP(mu.enddate) as enddate, m.name as membership FROM $wpdb->users u LEFT JOIN $wpdb->usermeta um ON u.ID = um.user_id LEFT JOIN $wpdb->pmpro_memberships_users mu ON u.ID = mu.user_id LEFT JOIN $wpdb->pmpro_membership_levels m ON mu.membership_id = m.id WHERE u.ID = '" . $user_id . "' ORDER BY mu.id DESC LIMIT 1");
|
178 |
-
else
|
179 |
-
$theuser = $wpdb->get_row("SELECT u.ID, u.user_login, u.user_email, UNIX_TIMESTAMP(u.user_registered) as joindate, u.user_login, u.user_nicename, u.user_url, u.user_registered, u.user_status, u.display_name, mu.membership_id, mu.initial_payment, mu.billing_amount, mu.cycle_period, UNIX_TIMESTAMP(mu.enddate) as enddate, m.name as membership FROM $wpdb->users u LEFT JOIN $wpdb->usermeta um ON u.ID = um.user_id LEFT JOIN $wpdb->pmpro_memberships_users mu ON u.ID = mu.user_id AND mu.status = 'active' LEFT JOIN $wpdb->pmpro_membership_levels m ON mu.membership_id = m.id WHERE u.ID = '" . $user_id . "' LIMIT 1");
|
180 |
-
|
181 |
$sqlQuery = "SELECT meta_key as `key`, meta_value as `value` FROM $wpdb->usermeta WHERE $wpdb->usermeta.user_id = '" . $user_id . "'";
|
182 |
$metavalues = pmpro_getMetavalues($sqlQuery);
|
183 |
$theuser->metavalues = $metavalues;
|
@@ -203,27 +160,17 @@
|
|
203 |
|
204 |
//joindate and enddate
|
205 |
$csvoutput .= "," . pmpro_enclose(date("Y-m-d", $theuser->joindate)) . ",";
|
206 |
-
|
207 |
-
if($theuser->membership_id)
|
208 |
-
{
|
209 |
-
if($theuser->enddate)
|
210 |
-
$csvoutput .= pmpro_enclose(apply_filters("pmpro_memberslist_expires_column", date("Y-m-d", $theuser->enddate), $theuser));
|
211 |
-
else
|
212 |
-
$csvoutput .= pmpro_enclose(apply_filters("pmpro_memberslist_expires_column", "Never", $theuser));
|
213 |
-
}
|
214 |
-
elseif($l == "oldmembers" && $theuser->enddate)
|
215 |
-
{
|
216 |
$csvoutput .= pmpro_enclose(date("Y-m-d", $theuser->enddate));
|
217 |
-
}
|
218 |
else
|
219 |
-
$csvoutput .= "
|
220 |
-
|
221 |
//any extra columns
|
222 |
if(!empty($extra_columns))
|
223 |
{
|
224 |
foreach($extra_columns as $heading => $callback)
|
225 |
{
|
226 |
-
$csvoutput .= "," . pmpro_enclose(call_user_func($callback, $theuser
|
227 |
}
|
228 |
}
|
229 |
|
42 |
|
43 |
if($s)
|
44 |
{
|
45 |
+
$sqlQuery = "SELECT SQL_CALC_FOUND_ROWS u.ID, u.user_login, u.user_email, UNIX_TIMESTAMP(u.user_registered) as joindate, u.user_login, u.user_nicename, u.user_url, u.user_registered, u.user_status, u.display_name, mu.membership_id, mu.initial_payment, mu.billing_amount, mu.cycle_period, UNIX_TIMESTAMP(mu.enddate) as enddate, m.name as membership FROM $wpdb->users u LEFT JOIN $wpdb->usermeta um ON u.ID = um.user_id LEFT JOIN $wpdb->pmpro_memberships_users mu ON u.ID = mu.user_id LEFT JOIN $wpdb->pmpro_membership_levels m ON mu.membership_id = m.id WHERE mu.status = 'active' AND mu.membership_id > 0 AND (u.user_login LIKE '%" . esc_sql($s) . "%' OR u.user_email LIKE '%" . esc_sql($s) . "%' OR um.meta_value LIKE '%" . esc_sql($s) . "%') ";
|
46 |
+
|
47 |
+
if($l)
|
48 |
+
$sqlQuery .= " AND mu.membership_id = '" . esc_sql($l) . "' ";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
|
50 |
+
$sqlQuery .= "GROUP BY u.ID ORDER BY user_registered DESC ";
|
|
|
|
|
|
|
|
|
|
|
51 |
|
52 |
if($limit)
|
53 |
$sqlQuery .= "LIMIT $start, $limit";
|
54 |
}
|
55 |
else
|
56 |
{
|
57 |
+
$sqlQuery = "SELECT SQL_CALC_FOUND_ROWS u.ID FROM $wpdb->users u LEFT JOIN $wpdb->pmpro_memberships_users mu ON u.ID = mu.user_id LEFT JOIN $wpdb->pmpro_membership_levels m ON mu.membership_id = m.id";
|
58 |
+
$sqlQuery .= " WHERE mu.membership_id > 0 AND mu.status = 'active' ";
|
59 |
+
if($l)
|
60 |
+
$sqlQuery .= " AND mu.membership_id = '" . $l . "' ";
|
61 |
+
$sqlQuery .= "ORDER BY user_registered DESC ";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
if($limit)
|
63 |
$sqlQuery .= "LIMIT $start, $limit";
|
64 |
}
|
65 |
|
66 |
//filter
|
67 |
$sqlQuery = apply_filters("pmpro_members_list_sql", $sqlQuery);
|
68 |
+
|
69 |
//get users
|
70 |
$theusers = $wpdb->get_col($sqlQuery);
|
71 |
+
|
72 |
//begin output
|
73 |
header("Content-type: text/csv");
|
74 |
+
if($s && $l)
|
75 |
+
header("Content-Disposition: attachment; filename=members_list_" . intval($l) . "_level" . sanitize_file_name($s) . ".csv");
|
|
|
|
|
76 |
elseif($s)
|
77 |
header("Content-Disposition: attachment; filename=members_list_" . sanitize_file_name($s) . ".csv");
|
78 |
+
elseif($l)
|
79 |
+
header("Content-Disposition: attachment; filename=members_list_level" . intval($l) . ".csv");
|
80 |
else
|
81 |
header("Content-Disposition: attachment; filename=members_list.csv");
|
82 |
|
83 |
+
$heading = "id,username,firstname,lastname,email,billing firstname,billing lastname,address1,address2,city,state,zipcode,country,phone,membership,initial payment,fee,term,discount_code_id,discount_code,joined,expires";
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
$heading = apply_filters("pmpro_members_list_csv_heading", $heading);
|
85 |
$csvoutput = $heading;
|
86 |
|
134 |
{
|
135 |
//MULTI: This query will need to be updated to support multiple levels per user. Should probably just dump multiple rows for each membership.
|
136 |
//get meta
|
137 |
+
$theuser = $wpdb->get_row("SELECT u.ID, u.user_login, u.user_email, UNIX_TIMESTAMP(u.user_registered) as joindate, u.user_login, u.user_nicename, u.user_url, u.user_registered, u.user_status, u.display_name, mu.membership_id, mu.initial_payment, mu.billing_amount, mu.cycle_period, UNIX_TIMESTAMP(mu.enddate) as enddate, m.name as membership FROM $wpdb->users u LEFT JOIN $wpdb->usermeta um ON u.ID = um.user_id LEFT JOIN $wpdb->pmpro_memberships_users mu ON u.ID = mu.user_id AND mu.status = 'active' LEFT JOIN $wpdb->pmpro_membership_levels m ON mu.membership_id = m.id WHERE u.ID = '" . $user_id . "' LIMIT 1");
|
|
|
|
|
|
|
|
|
|
|
138 |
$sqlQuery = "SELECT meta_key as `key`, meta_value as `value` FROM $wpdb->usermeta WHERE $wpdb->usermeta.user_id = '" . $user_id . "'";
|
139 |
$metavalues = pmpro_getMetavalues($sqlQuery);
|
140 |
$theuser->metavalues = $metavalues;
|
160 |
|
161 |
//joindate and enddate
|
162 |
$csvoutput .= "," . pmpro_enclose(date("Y-m-d", $theuser->joindate)) . ",";
|
163 |
+
if($theuser->enddate)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
164 |
$csvoutput .= pmpro_enclose(date("Y-m-d", $theuser->enddate));
|
|
|
165 |
else
|
166 |
+
$csvoutput .= pmpro_enclose("Never");
|
167 |
+
|
168 |
//any extra columns
|
169 |
if(!empty($extra_columns))
|
170 |
{
|
171 |
foreach($extra_columns as $heading => $callback)
|
172 |
{
|
173 |
+
$csvoutput .= "," . pmpro_enclose(call_user_func($callback, $theuser));
|
174 |
}
|
175 |
}
|
176 |
|
adminpages/memberslist.php
CHANGED
@@ -23,7 +23,7 @@
|
|
23 |
<form id="posts-filter" method="get" action="">
|
24 |
<h2>
|
25 |
<?php _e('Members List', 'pmpro');?>
|
26 |
-
<a target="_blank" href="<?php echo admin_url('admin-ajax.php');?>?action=memberslist_csv&s=<?php echo $s?>&l=<?php echo $l?>" class="add-new-h2"><?php _e('Export to CSV', 'pmpro');?></a>
|
27 |
</h2>
|
28 |
<ul class="subsubsub">
|
29 |
<li>
|
@@ -39,7 +39,6 @@
|
|
39 |
<?php
|
40 |
}
|
41 |
?>
|
42 |
-
<option value="oldmembers" <?php if($l == "oldmembers") { ?>selected="selected"<?php } ?>><?php _e('Old Members', 'pmpro');?></option>
|
43 |
</select>
|
44 |
</li>
|
45 |
</ul>
|
@@ -66,56 +65,24 @@
|
|
66 |
|
67 |
if($s)
|
68 |
{
|
69 |
-
$sqlQuery = "SELECT SQL_CALC_FOUND_ROWS u.ID, u.user_login, u.user_email, UNIX_TIMESTAMP(u.user_registered) as joindate, mu.membership_id, mu.initial_payment, mu.billing_amount, mu.cycle_period, mu.cycle_number, mu.billing_limit, mu.trial_amount, mu.trial_limit, UNIX_TIMESTAMP(mu.startdate) as startdate, UNIX_TIMESTAMP(mu.enddate) as enddate, m.name as membership FROM $wpdb->users u LEFT JOIN $wpdb->usermeta um ON u.ID = um.user_id LEFT JOIN $wpdb->pmpro_memberships_users mu ON u.ID = mu.user_id LEFT JOIN $wpdb->pmpro_membership_levels m ON mu.membership_id = m.id ";
|
70 |
-
|
71 |
-
if($l == "oldmembers")
|
72 |
-
$sqlQuery .= " LEFT JOIN $wpdb->pmpro_memberships_users mu2 ON u.ID = mu2.user_id AND mu2.status = 'active' ";
|
73 |
-
|
74 |
-
$sqlQuery .= " WHERE mu.membership_id > 0 AND (u.user_login LIKE '%$s%' OR u.user_email LIKE '%$s%' OR um.meta_value LIKE '%$s%') ";
|
75 |
|
76 |
-
if($l
|
77 |
-
$sqlQuery .= " AND mu.
|
78 |
-
|
79 |
-
|
80 |
-
else
|
81 |
-
$sqlQuery .= " AND mu.status = 'active' ";
|
82 |
-
|
83 |
-
$sqlQuery .= "GROUP BY u.ID ";
|
84 |
-
|
85 |
-
if($l == "oldmembers")
|
86 |
-
$sqlQuery .= "ORDER BY enddate DESC ";
|
87 |
-
else
|
88 |
-
$sqlQuery .= "ORDER BY u.user_registered DESC ";
|
89 |
-
|
90 |
-
$sqlQuery .= "LIMIT $start, $limit";
|
91 |
}
|
92 |
else
|
93 |
{
|
94 |
$sqlQuery = "SELECT SQL_CALC_FOUND_ROWS u.ID, u.user_login, u.user_email, UNIX_TIMESTAMP(u.user_registered) as joindate, mu.membership_id, mu.initial_payment, mu.billing_amount, mu.cycle_period, mu.cycle_number, mu.billing_limit, mu.trial_amount, mu.trial_limit, UNIX_TIMESTAMP(mu.startdate) as startdate, UNIX_TIMESTAMP(mu.enddate) as enddate, m.name as membership FROM $wpdb->users u LEFT JOIN $wpdb->pmpro_memberships_users mu ON u.ID = mu.user_id LEFT JOIN $wpdb->pmpro_membership_levels m ON mu.membership_id = m.id";
|
95 |
-
|
96 |
-
if($l
|
97 |
-
$sqlQuery .= "
|
98 |
-
|
99 |
-
$sqlQuery .= " WHERE mu.membership_id > 0 ";
|
100 |
-
|
101 |
-
if($l == "oldmembers")
|
102 |
-
$sqlQuery .= " AND mu.status = 'inactive' AND mu2.status IS NULL ";
|
103 |
-
elseif($l)
|
104 |
-
$sqlQuery .= " AND mu.status = 'active' AND mu.membership_id = '" . $l . "' ";
|
105 |
-
else
|
106 |
-
$sqlQuery .= " AND mu.status = 'active' ";
|
107 |
-
$sqlQuery .= "GROUP BY u.ID ";
|
108 |
-
|
109 |
-
if($l == "oldmembers")
|
110 |
-
$sqlQuery .= "ORDER BY enddate DESC ";
|
111 |
-
else
|
112 |
-
$sqlQuery .= "ORDER BY u.user_registered DESC ";
|
113 |
-
|
114 |
-
$sqlQuery .= "LIMIT $start, $limit";
|
115 |
}
|
116 |
|
117 |
$sqlQuery = apply_filters("pmpro_members_list_sql", $sqlQuery);
|
118 |
-
|
119 |
$theusers = $wpdb->get_results($sqlQuery);
|
120 |
$totalrows = $wpdb->get_var("SELECT FOUND_ROWS() as found_rows");
|
121 |
|
@@ -151,14 +118,7 @@
|
|
151 |
<th><?php _e('Membership', 'pmpro');?></th>
|
152 |
<th><?php _e('Fee', 'pmpro');?></th>
|
153 |
<th><?php _e('Joined', 'pmpro');?></th>
|
154 |
-
<th>
|
155 |
-
<?php
|
156 |
-
if($l == "oldmembers")
|
157 |
-
_e('Ended', 'pmpro');
|
158 |
-
else
|
159 |
-
_e('Expires', 'pmpro');
|
160 |
-
?>
|
161 |
-
</th>
|
162 |
</tr>
|
163 |
</thead>
|
164 |
<tbody id="users" class="list:user user-list">
|
@@ -186,9 +146,21 @@
|
|
186 |
<td><a href="mailto:<?php echo $theuser->user_email?>"><?php echo $theuser->user_email?></a></td>
|
187 |
<?php do_action("pmpro_memberslist_extra_cols_body", $theuser);?>
|
188 |
<td>
|
189 |
-
<?php
|
190 |
-
|
191 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
</td>
|
193 |
<td><?php echo $auser->membership?></td>
|
194 |
<td>
|
@@ -203,13 +175,13 @@
|
|
203 |
-
|
204 |
<?php } ?>
|
205 |
</td>
|
206 |
-
<td><?php echo date(
|
207 |
<td>
|
208 |
<?php
|
209 |
if($auser->enddate)
|
210 |
-
echo
|
211 |
else
|
212 |
-
echo __(
|
213 |
?>
|
214 |
</td>
|
215 |
</tr>
|
23 |
<form id="posts-filter" method="get" action="">
|
24 |
<h2>
|
25 |
<?php _e('Members List', 'pmpro');?>
|
26 |
+
<a target="_blank" href="<?php echo admin_url('admin-ajax.php');?>?action=memberslist_csv&s=<?php echo $s?>&l=<?php echo $l?>" class="button add-new-h2"><?php _e('Export to CSV', 'pmpro');?></a>
|
27 |
</h2>
|
28 |
<ul class="subsubsub">
|
29 |
<li>
|
39 |
<?php
|
40 |
}
|
41 |
?>
|
|
|
42 |
</select>
|
43 |
</li>
|
44 |
</ul>
|
65 |
|
66 |
if($s)
|
67 |
{
|
68 |
+
$sqlQuery = "SELECT SQL_CALC_FOUND_ROWS u.ID, u.user_login, u.user_email, UNIX_TIMESTAMP(u.user_registered) as joindate, mu.membership_id, mu.initial_payment, mu.billing_amount, mu.cycle_period, mu.cycle_number, mu.billing_limit, mu.trial_amount, mu.trial_limit, UNIX_TIMESTAMP(mu.startdate) as startdate, UNIX_TIMESTAMP(mu.enddate) as enddate, m.name as membership FROM $wpdb->users u LEFT JOIN $wpdb->usermeta um ON u.ID = um.user_id LEFT JOIN $wpdb->pmpro_memberships_users mu ON u.ID = mu.user_id LEFT JOIN $wpdb->pmpro_membership_levels m ON mu.membership_id = m.id WHERE mu.status = 'active' AND mu.membership_id > 0 AND (u.user_login LIKE '%$s%' OR u.user_email LIKE '%$s%' OR um.meta_value LIKE '%$s%') ";
|
|
|
|
|
|
|
|
|
|
|
69 |
|
70 |
+
if($l)
|
71 |
+
$sqlQuery .= " AND mu.membership_id = '" . $l . "' ";
|
72 |
+
|
73 |
+
$sqlQuery .= "GROUP BY u.ID ORDER BY user_registered DESC LIMIT $start, $limit";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
}
|
75 |
else
|
76 |
{
|
77 |
$sqlQuery = "SELECT SQL_CALC_FOUND_ROWS u.ID, u.user_login, u.user_email, UNIX_TIMESTAMP(u.user_registered) as joindate, mu.membership_id, mu.initial_payment, mu.billing_amount, mu.cycle_period, mu.cycle_number, mu.billing_limit, mu.trial_amount, mu.trial_limit, UNIX_TIMESTAMP(mu.startdate) as startdate, UNIX_TIMESTAMP(mu.enddate) as enddate, m.name as membership FROM $wpdb->users u LEFT JOIN $wpdb->pmpro_memberships_users mu ON u.ID = mu.user_id LEFT JOIN $wpdb->pmpro_membership_levels m ON mu.membership_id = m.id";
|
78 |
+
$sqlQuery .= " WHERE mu.membership_id > 0 AND mu.status = 'active' ";
|
79 |
+
if($l)
|
80 |
+
$sqlQuery .= " AND mu.membership_id = '" . $l . "' ";
|
81 |
+
$sqlQuery .= "GROUP BY u.ID ORDER BY user_registered DESC LIMIT $start, $limit";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
}
|
83 |
|
84 |
$sqlQuery = apply_filters("pmpro_members_list_sql", $sqlQuery);
|
85 |
+
|
86 |
$theusers = $wpdb->get_results($sqlQuery);
|
87 |
$totalrows = $wpdb->get_var("SELECT FOUND_ROWS() as found_rows");
|
88 |
|
118 |
<th><?php _e('Membership', 'pmpro');?></th>
|
119 |
<th><?php _e('Fee', 'pmpro');?></th>
|
120 |
<th><?php _e('Joined', 'pmpro');?></th>
|
121 |
+
<th><?php _e('Expires', 'pmpro');?></th>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<