Version Description
- Added the redirect away from wp-login.php page (was accidentally removed in version 1.7).
- Added support for Theme My Login versions 6.3+
- Fixed CSV downloads.
- Fixed some warnings.
- Fixed generation of cost text when using built in tax.
- Added "pmpro_subscribe_order" filter.
- Added an index to the user_id column of pmpro_memberships_users table which will help with performance of the new logins report and other user search functions.:
Download this release
Release Info
Developer | strangerstudios |
Plugin | ![]() |
Version | 1.7.0.1 |
Comparing to | |
See all releases |
Code changes from version 1.7.14 to 1.7.0.1
- adminpages/addons.php +1 -1
- adminpages/addons/images/pmpro-aweber.gif +0 -0
- adminpages/addons/images/pmpro-bbpress.jpg +0 -0
- adminpages/addons/images/pmpro-constant-contact.gif +0 -0
- adminpages/addons/images/pmpro-email-templates.gif +0 -0
- adminpages/addons/images/pmpro-woocommerce.gif +0 -0
- adminpages/addons/pmpro-addon-packages.php +2 -2
- adminpages/addons/pmpro-affiliates.php +2 -2
- adminpages/addons/pmpro-aweber.php +0 -31
- 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-international-addresses.php +0 -31
- adminpages/addons/pmpro-mailchimp.php +4 -4
- adminpages/addons/pmpro-network-subsite.php +0 -31
- adminpages/addons/pmpro-network.php +1 -1
- 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 +0 -31
- adminpages/addons/pmpro-stripe-lite.php +30 -0
- adminpages/addons/pmpro-user-pages.php +2 -2
- 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 +4 -4
- adminpages/admin_header.php +1 -22
- adminpages/advancedsettings.php +12 -96
- adminpages/dashboard.php +2 -2
- adminpages/discountcodes.php +631 -636
- adminpages/emailsettings.php +152 -181
- adminpages/functions.php +6 -71
- adminpages/membershiplevels.php +580 -588
- adminpages/memberslist-csv.php +36 -105
- adminpages/memberslist.php +30 -58
- adminpages/orders-csv.php +23 -135
- adminpages/orders.php +13 -318
- adminpages/pagesettings.php +9 -51
- adminpages/paymentsettings.php +491 -538
- adminpages/reports.php +41 -54
- adminpages/reports/login.php +51 -51
- adminpages/reports/memberships.php +0 -651
- adminpages/reports/sales.php +0 -397
- classes/class.memberorder.php +46 -106
- classes/class.pmproemail.php +24 -141
- classes/gateways/class.pmprogateway.php +2 -21
- classes/gateways/class.pmprogateway_authorizenet.php +4 -3
- classes/gateways/class.pmprogateway_braintree.php +14 -13
- classes/gateways/class.pmprogateway_check.php +2 -2
- classes/gateways/class.pmprogateway_cybersource.php +0 -765
- classes/gateways/class.pmprogateway_payflowpro.php +20 -19
- classes/gateways/class.pmprogateway_paypal.php +12 -13
- classes/gateways/class.pmprogateway_paypalexpress.php +24 -69
- classes/gateways/class.pmprogateway_paypalstandard.php +17 -36
- classes/gateways/class.pmprogateway_stripe.php +33 -82
- classes/gateways/class.pmprogateway_twocheckout.php +0 -145
- css/admin-rtl.css +0 -63
- css/admin.css +5 -6
- css/frontend-rtl.css +0 -111
- css/frontend.css +118 -173
- email/admin_change.html +1 -1
- 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_express.html +2 -2
- email/checkout_express_admin.html +2 -2
- 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 +0 -13
- email/invoice.html +6 -2
- includes/adminpages.php +66 -147
- includes/cleanup.php +12 -1
- includes/content.php +39 -74
- includes/currencies.php +2 -9
- includes/email.php +31 -58
- includes/filters.php +3 -41
- includes/functions.php +1605 -1742
- includes/https.php +19 -54
- includes/init.php +29 -94
- includes/lib/CyberSource/cyber_source_soap_client.php +0 -87
- 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/lib/Twocheckout/Twocheckout.php +0 -31
- includes/lib/Twocheckout/Twocheckout/Api/TwocheckoutAccount.php +0 -25
- includes/lib/Twocheckout/Twocheckout/Api/TwocheckoutApi.php +0 -33
- includes/lib/Twocheckout/Twocheckout/Api/TwocheckoutCoupon.php +0 -42
- includes/lib/Twocheckout/Twocheckout/Api/TwocheckoutError.php +0 -14
- includes/lib/Twocheckout/Twocheckout/Api/TwocheckoutOption.php +0 -42
- includes/lib/Twocheckout/Twocheckout/Api/TwocheckoutPayment.php +0 -24
- includes/lib/Twocheckout/Twocheckout/Api/TwocheckoutProduct.php +0 -42
- includes/lib/Twocheckout/Twocheckout/Api/TwocheckoutSale.php +0 -104
- includes/lib/Twocheckout/Twocheckout/Api/TwocheckoutUtil.php +0 -72
- includes/lib/Twocheckout/Twocheckout/TwocheckoutCharge.php +0 -61
- includes/lib/Twocheckout/Twocheckout/TwocheckoutMessage.php +0 -13
- includes/lib/Twocheckout/Twocheckout/TwocheckoutNotification.php +0 -20
- includes/lib/Twocheckout/Twocheckout/TwocheckoutReturn.php +0 -21
- includes/localization.php +4 -4
- includes/login.php +8 -32
- includes/metaboxes.php +2 -2
- includes/notifications.php +3 -9
- includes/profile.php +6 -9
- includes/recaptcha.php +10 -18
- includes/services.php +1 -8
- includes/setup.sql +26 -35
- includes/upgradecheck.php +56 -125
- 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 -23
- 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-es_CL.mo +0 -0
- languages/pmpro-es_CL.po +0 -981
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-aweber.gif
DELETED
Binary file
|
adminpages/addons/images/pmpro-bbpress.jpg
DELETED
Binary file
|
adminpages/addons/images/pmpro-constant-contact.gif
DELETED
Binary file
|
adminpages/addons/images/pmpro-email-templates.gif
DELETED
Binary file
|
adminpages/addons/images/pmpro-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.2',
|
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
DELETED
@@ -1,31 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Addon: PMPro AWeber Integration
|
4 |
-
Slug: pmpro-aweber
|
5 |
-
*/
|
6 |
-
pmpro_add_addon('thirdparty', array(
|
7 |
-
'title' => 'PMPro AWeber Integration',
|
8 |
-
'version' => '1.0',
|
9 |
-
'widget' => 'pmpro_addon_pmpro_aweber_widget',
|
10 |
-
'enabled' => function_exists('pmproaw_init')
|
11 |
-
)
|
12 |
-
);
|
13 |
-
|
14 |
-
function pmpro_addon_pmpro_aweber_widget($addon)
|
15 |
-
{
|
16 |
-
?>
|
17 |
-
<img class="addon-thumb" src="<?php echo PMPRO_URL?>/adminpages/addons/images/pmpro-aweber.gif" />
|
18 |
-
<div class="info">
|
19 |
-
<p>Integrate User Registrations with AWeber. Adds members to lists based on their membership level. (Note: works without PMPro as well.)</p>
|
20 |
-
<div class="actions">
|
21 |
-
<?php if($addon['enabled']) { ?>
|
22 |
-
<a href="<?php echo admin_url("plugins.php");?>" class="button">Enabled</a>
|
23 |
-
<?php } elseif(file_exists(dirname(__FILE__) . "/../../../pmpro-aweber/pmpro-aweber.php")) { ?>
|
24 |
-
<a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-aweber/pmpro-aweber.php'), 'activate-plugin_pmpro-aweber/pmpro-aweber.php')?>" class="button button-primary">Activate</a>
|
25 |
-
<?php } else { ?>
|
26 |
-
<a href="<?php echo wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=pmpro-aweber'), 'install-plugin_pmpro-aweber'); ?>" class="button button-primary">Download</a>
|
27 |
-
<?php } ?>
|
28 |
-
</div>
|
29 |
-
</div> <!-- end info -->
|
30 |
-
<?php
|
31 |
-
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
adminpages/addons/pmpro-bbpress.php
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' => '1
|
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' => '.1',
|
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-international-addresses.php
DELETED
@@ -1,31 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Addon: PMPro International Addresses
|
4 |
-
Slug: pmpro-international-addresses
|
5 |
-
*/
|
6 |
-
pmpro_add_addon('github', array(
|
7 |
-
'title' => 'PMPro International Addresses',
|
8 |
-
'version' => '.2.2',
|
9 |
-
'widget' => 'pmpro_addon_pmpro_international_addresses_widget',
|
10 |
-
'enabled' => function_exists('pmproia_pmpro_international_addresses')
|
11 |
-
)
|
12 |
-
);
|
13 |
-
|
14 |
-
function pmpro_addon_pmpro_international_addresses_widget($addon)
|
15 |
-
{
|
16 |
-
?>
|
17 |
-
<?php /* <img class="addon-thumb" src="<?php echo PMPRO_URL?>/adminpages/addons/images/pmpro-international-addresses.jpg" /> */ ?>
|
18 |
-
<div class="info">
|
19 |
-
<p>Adds long form addresses to the PMPro checkout.</p>
|
20 |
-
<div class="actions">
|
21 |
-
<?php if($addon['enabled']) { ?>
|
22 |
-
<a href="https://github.com/strangerstudios/pmpro-international-addresses/" class="button">Enabled</a>
|
23 |
-
<?php } elseif(file_exists(dirname(__FILE__) . "/../../../pmpro-international-addresses/pmpro-international-addresses.php")) { ?>
|
24 |
-
<a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-international-addresses/pmpro-international-addresses.php'), 'activate-plugin_pmpro-international-addresses/pmpro-international-addresses.php')?>" class="button button-primary">Activate</a>
|
25 |
-
<?php } else { ?>
|
26 |
-
<a href="http://www.paidmembershipspro.com/wp-content/uploads/plugins/pmpro-international-addresses.zip" class="button button-primary">Download</a>
|
27 |
-
<?php } ?>
|
28 |
-
</div>
|
29 |
-
</div> <!-- end info -->
|
30 |
-
<?php
|
31 |
-
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
adminpages/addons/pmpro-mailchimp.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
Â
*/
|
6 |
Â
pmpro_add_addon('thirdparty', array(
|
7 |
Â
'title' => 'PMPro MailChimp Integration',
|
8 |
-
'version' => '1
|
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="
|
27 |
-
<?php } ?>
|
28 |
Â
</div>
|
29 |
Â
</div> <!-- end info -->
|
30 |
Â
<?php
|
5 |
Â
*/
|
6 |
Â
pmpro_add_addon('thirdparty', array(
|
7 |
Â
'title' => 'PMPro MailChimp Integration',
|
8 |
+
'version' => '.2.1',
|
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="http://www.paidmembershipspro.com/wp-content/uploads/plugins/pmpro-mailchimp.zip" 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-network.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
Â
*/
|
6 |
Â
pmpro_add_addon('github', array(
|
7 |
Â
'title' => 'PMPro Network',
|
8 |
-
'version' => '.
|
9 |
Â
'widget' => 'pmpro_addon_pmpro_network_widget',
|
10 |
Â
'enabled' => function_exists('pmpron_new_blogs_settings')
|
11 |
Â
)
|
5 |
Â
*/
|
6 |
Â
pmpro_add_addon('github', array(
|
7 |
Â
'title' => 'PMPro Network',
|
8 |
+
'version' => '.2',
|
9 |
Â
'widget' => 'pmpro_addon_pmpro_network_widget',
|
10 |
Â
'enabled' => function_exists('pmpron_new_blogs_settings')
|
11 |
Â
)
|
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' => '.3',
|
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',
|
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',
|
9 |
Â
'widget' => 'pmpro_addon_pmpro_series_widget',
|
10 |
Â
'enabled' => class_exists("PMProSeries")
|
11 |
Â
)
|
adminpages/addons/pmpro-shipping.php
DELETED
@@ -1,31 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Addon: PMPro Shipping Add On
|
4 |
-
Slug: pmpro-shipping
|
5 |
-
*/
|
6 |
-
pmpro_add_addon('github', array(
|
7 |
-
'title' => 'PMPro Shipping Add On',
|
8 |
-
'version' => '.2.6',
|
9 |
-
'widget' => 'pmpro_addon_pmpro_shipping_widget',
|
10 |
-
'enabled' => function_exists('pmproship_pmpro_checkout_boxes')
|
11 |
-
)
|
12 |
-
);
|
13 |
-
|
14 |
-
function pmpro_addon_pmpro_shipping_widget($addon)
|
15 |
-
{
|
16 |
-
?>
|
17 |
-
<?php /* <img class="addon-thumb" src="<?php echo PMPRO_URL?>/adminpages/addons/images/pmpro-shipping.jpg" /> */ ?>
|
18 |
-
<div class="info">
|
19 |
-
<p>Adds shipping fields to the checkout page, confirmation page, confirmation emails, member's list and edit user profile pages.</p>
|
20 |
-
<div class="actions">
|
21 |
-
<?php if($addon['enabled']) { ?>
|
22 |
-
<a href="https://github.com/strangerstudios/pmpro-shipping/" class="button">Enabled</a>
|
23 |
-
<?php } elseif(file_exists(dirname(__FILE__) . "/../../../pmpro-shipping/pmpro-shipping.php")) { ?>
|
24 |
-
<a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-shipping/pmpro-shipping.php'), 'activate-plugin_pmpro-shipping/pmpro-shipping.php')?>" class="button button-primary">Activate</a>
|
25 |
-
<?php } else { ?>
|
26 |
-
<a href="http://www.paidmembershipspro.com/wp-content/uploads/plugins/pmpro-shipping.zip" class="button button-primary">Download</a>
|
27 |
-
<?php } ?>
|
28 |
-
</div>
|
29 |
-
</div> <!-- end info -->
|
30 |
-
<?php
|
31 |
-
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
adminpages/addons/pmpro-stripe-lite.php
ADDED
@@ -0,0 +1,30 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Addon: PMPro Stripe Lite
|
4 |
+
Slug: pmpro-stripe-lite
|
5 |
+
*/
|
6 |
+
pmpro_add_addon('github', array(
|
7 |
+
'title' => 'PMPro Stripe Lite',
|
8 |
+
'version' => '.1.1',
|
9 |
+
'widget' => 'pmpro_addon_pmpro_stripe_lite_widget',
|
10 |
+
'enabled' => function_exists('pmprosl_pmpro_pages_shortcode_checkout')
|
11 |
+
)
|
12 |
+
);
|
13 |
+
|
14 |
+
function pmpro_addon_pmpro_stripe_lite_widget($addon)
|
15 |
+
{
|
16 |
+
?>
|
17 |
+
<div class="info">
|
18 |
+
<p>Remove billing fields (not required by Stripe) from the checkout page when using the Stripe payment gateway with PMPro.</p>
|
19 |
+
<div class="actions">
|
20 |
+
<?php if($addon['enabled']) { ?>
|
21 |
+
<a href="https://github.com/strangerstudios/pmpro-stripe-lite/blob/master/readme.txt" class="button">Enabled</a>
|
22 |
+
<?php } elseif(file_exists(dirname(__FILE__) . "/../../../pmpro-stripe-lite/pmpro-stripe-lite.php")) { ?>
|
23 |
+
<a href="<?php echo wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin=pmpro-stripe-lite/pmpro-stripe-lite.php'), 'activate-plugin_pmpro-stripe-lite/pmpro-stripe-lite.php')?>" class="button button-primary">Activate</a>
|
24 |
+
<?php } else { ?>
|
25 |
+
<a href="http://www.paidmembershipspro.com/wp-content/uploads/plugins/pmpro-stripe-lite.zip" class="button button-primary">Download</a>
|
26 |
+
<?php } ?>
|
27 |
+
</div>
|
28 |
+
</div> <!-- end info -->
|
29 |
+
<?php
|
30 |
+
}
|
adminpages/addons/pmpro-user-pages.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
Â
*/
|
6 |
Â
pmpro_add_addon('github', array(
|
7 |
Â
'title' => 'PMPro User Pages',
|
8 |
-
'version' => '.
|
9 |
Â
'widget' => 'pmpro_addon_pmpro_user_pages_widget',
|
10 |
Â
'enabled' => function_exists('pmproup_pmpro_after_checkout')
|
11 |
Â
)
|
@@ -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']) { ?>
|
5 |
Â
*/
|
6 |
Â
pmpro_add_addon('github', array(
|
7 |
Â
'title' => 'PMPro User Pages',
|
8 |
+
'version' => '.2',
|
9 |
Â
'widget' => 'pmpro_addon_pmpro_user_pages_widget',
|
10 |
Â
'enabled' => function_exists('pmproup_pmpro_after_checkout')
|
11 |
Â
)
|
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
@@ -3,9 +3,9 @@
|
|
3 |
Â
Addon: WP Bouncer
|
4 |
Â
Slug: wp-bouncer
|
5 |
Â
*/
|
6 |
-
pmpro_add_addon('
|
7 |
Â
'title' => 'WP Bouncer',
|
8 |
-
'version' => '1.1',
|
9 |
Â
'widget' => 'pmpro_addon_wp_bouncer_widget',
|
10 |
Â
'enabled' => class_exists('WP_Bouncer')
|
11 |
Â
)
|
@@ -19,11 +19,11 @@ 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 { ?>
|
26 |
-
<a href="
|
27 |
Â
<?php } ?>
|
28 |
Â
</div>
|
29 |
Â
</div> <!-- end info -->
|
3 |
Â
Addon: WP Bouncer
|
4 |
Â
Slug: wp-bouncer
|
5 |
Â
*/
|
6 |
+
pmpro_add_addon('github', array(
|
7 |
Â
'title' => 'WP Bouncer',
|
8 |
+
'version' => '1.0.1',
|
9 |
Â
'widget' => 'pmpro_addon_wp_bouncer_widget',
|
10 |
Â
'enabled' => class_exists('WP_Bouncer')
|
11 |
Â
)
|
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 { ?>
|
26 |
+
<a href="http://www.paidmembershipspro.com/wp-content/uploads/plugins/wp-bouncer.zip" class="button button-primary">Download</a>
|
27 |
Â
<?php } ?>
|
28 |
Â
</div>
|
29 |
Â
</div> <!-- end info -->
|
adminpages/admin_header.php
CHANGED
@@ -92,27 +92,6 @@
|
|
92 |
Â
$msgt .= " <a href=\"?page=pmpro-membershiplevels\">" . __("Please edit your levels", "pmpro") . "</a>.";
|
93 |
Â
}
|
94 |
Â
|
95 |
-
if(!pmpro_checkLevelForTwoCheckoutCompatibility())
|
96 |
-
{
|
97 |
-
$msg = -1;
|
98 |
-
$msgt = __("The billing details for some of your membership levels is not supported by TwoCheckout.", "pmpro");
|
99 |
-
if($view == "pmpro-membershiplevels" && !empty($_REQUEST['edit']) && $_REQUEST['edit'] > 0)
|
100 |
-
{
|
101 |
-
if(!pmpro_checkLevelForTwoCheckoutCompatibility($_REQUEST['edit']))
|
102 |
-
{
|
103 |
-
global $pmpro_twocheckout_error;
|
104 |
-
$pmpro_twocheckout_error = true;
|
105 |
-
|
106 |
-
$msg = -1;
|
107 |
-
$msgt = __("The billing details for this level are not supported by 2Checkout. Please review the notes in the Billing Details section below.", "pmpro");
|
108 |
-
}
|
109 |
-
}
|
110 |
-
elseif($view == "pmpro-membershiplevels")
|
111 |
-
$msgt .= " " . __("The levels with issues are highlighted below.", "pmpro");
|
112 |
-
else
|
113 |
-
$msgt .= " <a href=\"?page=pmpro-membershiplevels\">" . __("Please edit your levels", "pmpro") . "</a>.";
|
114 |
-
}
|
115 |
-
|
116 |
Â
if(!empty($msg))
|
117 |
Â
{
|
118 |
Â
?>
|
@@ -124,7 +103,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>
|
92 |
Â
$msgt .= " <a href=\"?page=pmpro-membershiplevels\">" . __("Please edit your levels", "pmpro") . "</a>.";
|
93 |
Â
}
|
94 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
95 |
Â
if(!empty($msg))
|
96 |
Â
{
|
97 |
Â
?>
|
103 |
Â
<div class="wrap pmpro_admin">
|
104 |
Â
<div class="pmpro_banner">
|
105 |
Â
<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>
|
106 |
+
<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>
|
107 |
Â
|
108 |
Â
<br style="clear:both;" />
|
109 |
Â
</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
@@ -1,636 +1,631 @@
|
|
1 |
-
<?php
|
2 |
-
//only admins can get this
|
3 |
-
if(!function_exists("current_user_can") || (!current_user_can("manage_options") && !current_user_can("pmpro_discountcodes")))
|
4 |
-
{
|
5 |
-
die(__("You do not have permissions to perform this action.", "pmpro"));
|
6 |
-
}
|
7 |
-
|
8 |
-
//vars
|
9 |
-
global $wpdb, $pmpro_currency_symbol;
|
10 |
-
|
11 |
-
if(isset($_REQUEST['edit']))
|
12 |
-
$edit = $_REQUEST['edit'];
|
13 |
-
else
|
14 |
-
$edit = false;
|
15 |
-
|
16 |
-
if(isset($_REQUEST['delete']))
|
17 |
-
$delete = $_REQUEST['delete'];
|
18 |
-
else
|
19 |
-
$delete = false;
|
20 |
-
|
21 |
-
if(isset($_REQUEST['saveid']))
|
22 |
-
$saveid = $_POST['saveid'];
|
23 |
-
else
|
24 |
-
$saveid = false;
|
25 |
-
|
26 |
-
if($saveid)
|
27 |
-
{
|
28 |
-
//get vars
|
29 |
-
$code = $_POST['code'];
|
30 |
-
$starts_month = $_POST['starts_month'];
|
31 |
-
$starts_day = $_POST['starts_day'];
|
32 |
-
$starts_year = $_POST['starts_year'];
|
33 |
-
$expires_month = $_POST['expires_month'];
|
34 |
-
$expires_day = $_POST['expires_day'];
|
35 |
-
$expires_year = $_POST['expires_year'];
|
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)
|
44 |
-
{
|
45 |
-
$sqlQuery = "UPDATE $wpdb->pmpro_discount_codes SET code = '" .
|
46 |
-
if($wpdb->query($sqlQuery) !== false)
|
47 |
-
{
|
48 |
-
$pmpro_msg = __("Discount code updated successfully.", "pmpro");
|
49 |
-
$pmpro_msgt = "success";
|
50 |
-
$saved = true;
|
51 |
-
$edit = $saveid;
|
52 |
-
}
|
53 |
-
else
|
54 |
-
{
|
55 |
-
$pmpro_msg = __("Error updating discount code. That code may already be in use.", "pmpro");
|
56 |
-
$pmpro_msgt = "error";
|
57 |
-
}
|
58 |
-
}
|
59 |
-
else
|
60 |
-
{
|
61 |
-
$sqlQuery = "INSERT INTO $wpdb->pmpro_discount_codes (code, starts, expires, uses) VALUES('" .
|
62 |
-
if($wpdb->query($sqlQuery) !== false)
|
63 |
-
{
|
64 |
-
$pmpro_msg = __("Discount code added successfully.", "pmpro");
|
65 |
-
$pmpro_msgt = "success";
|
66 |
-
$saved = true;
|
67 |
-
$edit = $wpdb->insert_id;
|
68 |
-
}
|
69 |
-
else
|
70 |
-
{
|
71 |
-
$pmpro_msg = __("Error adding discount code. That code may already be in use.", "pmpro") . $wpdb->last_error;
|
72 |
-
$pmpro_msgt = "error";
|
73 |
-
}
|
74 |
-
}
|
75 |
-
|
76 |
-
//now add the membership level rows
|
77 |
-
if($saved && $edit > 0)
|
78 |
-
{
|
79 |
-
//get the submitted values
|
80 |
-
$all_levels_a = $_REQUEST['all_levels'];
|
81 |
-
if(!empty($_REQUEST['levels']))
|
82 |
-
$levels_a = $_REQUEST['levels'];
|
83 |
-
else
|
84 |
-
$levels_a = array();
|
85 |
-
$initial_payment_a = $_REQUEST['initial_payment'];
|
86 |
-
if(!empty($_REQUEST['recurring']))
|
87 |
-
$recurring_a = $_REQUEST['recurring'];
|
88 |
-
$billing_amount_a = $_REQUEST['billing_amount'];
|
89 |
-
$cycle_number_a = $_REQUEST['cycle_number'];
|
90 |
-
$cycle_period_a = $_REQUEST['cycle_period'];
|
91 |
-
$billing_limit_a = $_REQUEST['billing_limit'];
|
92 |
-
if(!empty($_REQUEST['custom_trial']))
|
93 |
-
$custom_trial_a = $_REQUEST['custom_trial'];
|
94 |
-
$trial_amount_a = $_REQUEST['trial_amount'];
|
95 |
-
$trial_limit_a = $_REQUEST['trial_limit'];
|
96 |
-
if(!empty($_REQUEST['expiration']))
|
97 |
-
$expiration_a = $_REQUEST['expiration'];
|
98 |
-
$expiration_number_a = $_REQUEST['expiration_number'];
|
99 |
-
$expiration_period_a = $_REQUEST['expiration_period'];
|
100 |
-
|
101 |
-
//clear the old rows
|
102 |
-
$sqlQuery = "DELETE FROM $wpdb->pmpro_discount_codes_levels WHERE code_id = '" . $edit . "'";
|
103 |
-
$wpdb->query($sqlQuery);
|
104 |
-
|
105 |
-
//add a row for each checked level
|
106 |
-
if(!empty($levels_a))
|
107 |
-
{
|
108 |
-
foreach($levels_a as $level_id)
|
109 |
-
{
|
110 |
-
//get the values ready
|
111 |
-
$n = array_search($level_id, $all_levels_a); //this is the key location of this level's values
|
112 |
-
$initial_payment = $initial_payment_a[$n];
|
113 |
-
|
114 |
-
//is this recurring?
|
115 |
-
if(!empty($recurring_a))
|
116 |
-
{
|
117 |
-
if(in_array($level_id, $recurring_a))
|
118 |
-
$recurring = 1;
|
119 |
-
else
|
120 |
-
$recurring = 0;
|
121 |
-
}
|
122 |
-
else
|
123 |
-
$recurring = 0;
|
124 |
-
|
125 |
-
if(!empty($recurring))
|
126 |
-
{
|
127 |
-
$billing_amount = $billing_amount_a[$n];
|
128 |
-
$cycle_number = $cycle_number_a[$n];
|
129 |
-
$cycle_period = $cycle_period_a[$n];
|
130 |
-
$billing_limit = $billing_limit_a[$n];
|
131 |
-
|
132 |
-
//custom trial
|
133 |
-
if(!empty($custom_trial_a))
|
134 |
-
{
|
135 |
-
if(in_array($level_id, $custom_trial_a))
|
136 |
-
$custom_trial = 1;
|
137 |
-
else
|
138 |
-
$custom_trial = 0;
|
139 |
-
}
|
140 |
-
else
|
141 |
-
$custom_trial = 0;
|
142 |
-
|
143 |
-
if(!empty($custom_trial))
|
144 |
-
{
|
145 |
-
$trial_amount = $trial_amount_a[$n];
|
146 |
-
$trial_limit = $trial_limit_a[$n];
|
147 |
-
}
|
148 |
-
else
|
149 |
-
{
|
150 |
-
$trial_amount = '';
|
151 |
-
$trial_limit = '';
|
152 |
-
}
|
153 |
-
}
|
154 |
-
else
|
155 |
-
{
|
156 |
-
$billing_amount = '';
|
157 |
-
$cycle_number = '';
|
158 |
-
$cycle_period = 'Month';
|
159 |
-
$billing_limit = '';
|
160 |
-
$custom_trial = 0;
|
161 |
-
$trial_amount = '';
|
162 |
-
$trial_limit = '';
|
163 |
-
}
|
164 |
-
|
165 |
-
if(!empty($expiration_a))
|
166 |
-
{
|
167 |
-
if(in_array($level_id, $expiration_a))
|
168 |
-
$expiration = 1;
|
169 |
-
else
|
170 |
-
$expiration = 0;
|
171 |
-
}
|
172 |
-
else
|
173 |
-
$expiration = 0;
|
174 |
-
|
175 |
-
if(!empty($expiration))
|
176 |
-
{
|
177 |
-
$expiration_number = $expiration_number_a[$n];
|
178 |
-
$expiration_period = $expiration_period_a[$n];
|
179 |
-
}
|
180 |
-
else
|
181 |
-
{
|
182 |
-
$expiration_number = '';
|
183 |
-
$expiration_period = 'Month';
|
184 |
-
}
|
185 |
-
|
186 |
-
//okay, do the insert
|
187 |
-
$sqlQuery = "INSERT INTO $wpdb->pmpro_discount_codes_levels (code_id, level_id, initial_payment, billing_amount, cycle_number, cycle_period, billing_limit, trial_amount, trial_limit, expiration_number, expiration_period) VALUES('" .
|
188 |
-
|
189 |
-
if($wpdb->query($sqlQuery) !== false)
|
190 |
-
{
|
191 |
-
//okay
|
192 |
-
do_action("pmpro_save_discount_code_level", $
|
193 |
-
}
|
194 |
-
else
|
195 |
-
{
|
196 |
-
$level_errors[] = sprintf(__("Error saving values for the %s level.", "pmpro"), $wpdb->get_var("SELECT name FROM $wpdb->pmpro_membership_levels WHERE id = '" . $level_id . "' LIMIT 1"));
|
197 |
-
}
|
198 |
-
}
|
199 |
-
}
|
200 |
-
|
201 |
-
//errors?
|
202 |
-
if(!empty($level_errors))
|
203 |
-
{
|
204 |
-
$pmpro_msg = __("There were errors updating the level values: ", "pmpro") . implode(" ", $level_errors);
|
205 |
-
$pmpro_msgt = "error";
|
206 |
-
}
|
207 |
-
else
|
208 |
-
{
|
209 |
-
//all good. set edit = NULL so we go back to the overview page
|
210 |
-
$edit = NULL;
|
211 |
-
|
212 |
-
do_action("pmpro_save_discount_code", $saveid);
|
213 |
-
}
|
214 |
-
}
|
215 |
-
}
|
216 |
-
|
217 |
-
//are we deleting?
|
218 |
-
if(!empty($delete))
|
219 |
-
{
|
220 |
-
//is this a code?
|
221 |
-
$code = $wpdb->get_var("SELECT code FROM $wpdb->pmpro_discount_codes WHERE id = '" . $delete . "' LIMIT 1");
|
222 |
-
if(!empty($code))
|
223 |
-
{
|
224 |
-
//
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
$
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
//
|
295 |
-
if(
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
$
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
<
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
</
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
<
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
<
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
<td
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
$
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
<?php } ?>
|
633 |
-
|
634 |
-
<?php
|
635 |
-
require_once(dirname(__FILE__) . "/admin_footer.php");
|
636 |
-
?>
|
1 |
+
<?php
|
2 |
+
//only admins can get this
|
3 |
+
if(!function_exists("current_user_can") || (!current_user_can("manage_options") && !current_user_can("pmpro_discountcodes")))
|
4 |
+
{
|
5 |
+
die(__("You do not have permissions to perform this action.", "pmpro"));
|
6 |
+
}
|
7 |
+
|
8 |
+
//vars
|
9 |
+
global $wpdb, $pmpro_currency_symbol;
|
10 |
+
|
11 |
+
if(isset($_REQUEST['edit']))
|
12 |
+
$edit = $_REQUEST['edit'];
|
13 |
+
else
|
14 |
+
$edit = false;
|
15 |
+
|
16 |
+
if(isset($_REQUEST['delete']))
|
17 |
+
$delete = $_REQUEST['delete'];
|
18 |
+
else
|
19 |
+
$delete = false;
|
20 |
+
|
21 |
+
if(isset($_REQUEST['saveid']))
|
22 |
+
$saveid = $_POST['saveid'];
|
23 |
+
else
|
24 |
+
$saveid = false;
|
25 |
+
|
26 |
+
if($saveid)
|
27 |
+
{
|
28 |
+
//get vars
|
29 |
+
$code = $_POST['code'];
|
30 |
+
$starts_month = $_POST['starts_month'];
|
31 |
+
$starts_day = $_POST['starts_day'];
|
32 |
+
$starts_year = $_POST['starts_year'];
|
33 |
+
$expires_month = $_POST['expires_month'];
|
34 |
+
$expires_day = $_POST['expires_day'];
|
35 |
+
$expires_year = $_POST['expires_year'];
|
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)
|
44 |
+
{
|
45 |
+
$sqlQuery = "UPDATE $wpdb->pmpro_discount_codes SET code = '" . $wpdb->escape($code) . "', starts = '" . $starts . "', expires = '" . $expires . "', uses = '" . intval($uses) . "' WHERE id = '" . $saveid . "' LIMIT 1";
|
46 |
+
if($wpdb->query($sqlQuery) !== false)
|
47 |
+
{
|
48 |
+
$pmpro_msg = __("Discount code updated successfully.", "pmpro");
|
49 |
+
$pmpro_msgt = "success";
|
50 |
+
$saved = true;
|
51 |
+
$edit = $saveid;
|
52 |
+
}
|
53 |
+
else
|
54 |
+
{
|
55 |
+
$pmpro_msg = __("Error updating discount code. That code may already be in use.", "pmpro");
|
56 |
+
$pmpro_msgt = "error";
|
57 |
+
}
|
58 |
+
}
|
59 |
+
else
|
60 |
+
{
|
61 |
+
$sqlQuery = "INSERT INTO $wpdb->pmpro_discount_codes (code, starts, expires, uses) VALUES('" . $wpdb->escape($code) . "', '" . $starts . "', '" . $expires . "', '" . intval($uses) . "')";
|
62 |
+
if($wpdb->query($sqlQuery) !== false)
|
63 |
+
{
|
64 |
+
$pmpro_msg = __("Discount code added successfully.", "pmpro");
|
65 |
+
$pmpro_msgt = "success";
|
66 |
+
$saved = true;
|
67 |
+
$edit = $wpdb->insert_id;
|
68 |
+
}
|
69 |
+
else
|
70 |
+
{
|
71 |
+
$pmpro_msg = __("Error adding discount code. That code may already be in use.", "pmpro") . $wpdb->last_error;
|
72 |
+
$pmpro_msgt = "error";
|
73 |
+
}
|
74 |
+
}
|
75 |
+
|
76 |
+
//now add the membership level rows
|
77 |
+
if($saved && $edit > 0)
|
78 |
+
{
|
79 |
+
//get the submitted values
|
80 |
+
$all_levels_a = $_REQUEST['all_levels'];
|
81 |
+
if(!empty($_REQUEST['levels']))
|
82 |
+
$levels_a = $_REQUEST['levels'];
|
83 |
+
else
|
84 |
+
$levels_a = array();
|
85 |
+
$initial_payment_a = $_REQUEST['initial_payment'];
|
86 |
+
if(!empty($_REQUEST['recurring']))
|
87 |
+
$recurring_a = $_REQUEST['recurring'];
|
88 |
+
$billing_amount_a = $_REQUEST['billing_amount'];
|
89 |
+
$cycle_number_a = $_REQUEST['cycle_number'];
|
90 |
+
$cycle_period_a = $_REQUEST['cycle_period'];
|
91 |
+
$billing_limit_a = $_REQUEST['billing_limit'];
|
92 |
+
if(!empty($_REQUEST['custom_trial']))
|
93 |
+
$custom_trial_a = $_REQUEST['custom_trial'];
|
94 |
+
$trial_amount_a = $_REQUEST['trial_amount'];
|
95 |
+
$trial_limit_a = $_REQUEST['trial_limit'];
|
96 |
+
if(!empty($_REQUEST['expiration']))
|
97 |
+
$expiration_a = $_REQUEST['expiration'];
|
98 |
+
$expiration_number_a = $_REQUEST['expiration_number'];
|
99 |
+
$expiration_period_a = $_REQUEST['expiration_period'];
|
100 |
+
|
101 |
+
//clear the old rows
|
102 |
+
$sqlQuery = "DELETE FROM $wpdb->pmpro_discount_codes_levels WHERE code_id = '" . $edit . "'";
|
103 |
+
$wpdb->query($sqlQuery);
|
104 |
+
|
105 |
+
//add a row for each checked level
|
106 |
+
if(!empty($levels_a))
|
107 |
+
{
|
108 |
+
foreach($levels_a as $level_id)
|
109 |
+
{
|
110 |
+
//get the values ready
|
111 |
+
$n = array_search($level_id, $all_levels_a); //this is the key location of this level's values
|
112 |
+
$initial_payment = $initial_payment_a[$n];
|
113 |
+
|
114 |
+
//is this recurring?
|
115 |
+
if(!empty($recurring_a))
|
116 |
+
{
|
117 |
+
if(in_array($level_id, $recurring_a))
|
118 |
+
$recurring = 1;
|
119 |
+
else
|
120 |
+
$recurring = 0;
|
121 |
+
}
|
122 |
+
else
|
123 |
+
$recurring = 0;
|
124 |
+
|
125 |
+
if(!empty($recurring))
|
126 |
+
{
|
127 |
+
$billing_amount = $billing_amount_a[$n];
|
128 |
+
$cycle_number = $cycle_number_a[$n];
|
129 |
+
$cycle_period = $cycle_period_a[$n];
|
130 |
+
$billing_limit = $billing_limit_a[$n];
|
131 |
+
|
132 |
+
//custom trial
|
133 |
+
if(!empty($custom_trial_a))
|
134 |
+
{
|
135 |
+
if(in_array($level_id, $custom_trial_a))
|
136 |
+
$custom_trial = 1;
|
137 |
+
else
|
138 |
+
$custom_trial = 0;
|
139 |
+
}
|
140 |
+
else
|
141 |
+
$custom_trial = 0;
|
142 |
+
|
143 |
+
if(!empty($custom_trial))
|
144 |
+
{
|
145 |
+
$trial_amount = $trial_amount_a[$n];
|
146 |
+
$trial_limit = $trial_limit_a[$n];
|
147 |
+
}
|
148 |
+
else
|
149 |
+
{
|
150 |
+
$trial_amount = '';
|
151 |
+
$trial_limit = '';
|
152 |
+
}
|
153 |
+
}
|
154 |
+
else
|
155 |
+
{
|
156 |
+
$billing_amount = '';
|
157 |
+
$cycle_number = '';
|
158 |
+
$cycle_period = 'Month';
|
159 |
+
$billing_limit = '';
|
160 |
+
$custom_trial = 0;
|
161 |
+
$trial_amount = '';
|
162 |
+
$trial_limit = '';
|
163 |
+
}
|
164 |
+
|
165 |
+
if(!empty($expiration_a))
|
166 |
+
{
|
167 |
+
if(in_array($level_id, $expiration_a))
|
168 |
+
$expiration = 1;
|
169 |
+
else
|
170 |
+
$expiration = 0;
|
171 |
+
}
|
172 |
+
else
|
173 |
+
$expiration = 0;
|
174 |
+
|
175 |
+
if(!empty($expiration))
|
176 |
+
{
|
177 |
+
$expiration_number = $expiration_number_a[$n];
|
178 |
+
$expiration_period = $expiration_period_a[$n];
|
179 |
+
}
|
180 |
+
else
|
181 |
+
{
|
182 |
+
$expiration_number = '';
|
183 |
+
$expiration_period = 'Month';
|
184 |
+
}
|
185 |
+
|
186 |
+
//okay, do the insert
|
187 |
+
$sqlQuery = "INSERT INTO $wpdb->pmpro_discount_codes_levels (code_id, level_id, initial_payment, billing_amount, cycle_number, cycle_period, billing_limit, trial_amount, trial_limit, expiration_number, expiration_period) VALUES('" . $wpdb->escape($edit) . "', '" . $wpdb->escape($level_id) . "', '" . (double)$wpdb->escape($initial_payment) . "', '" . (double)$wpdb->escape($billing_amount) . "', '" . intval($wpdb->escape($cycle_number)) . "', '" . $wpdb->escape($cycle_period) . "', '" . intval($wpdb->escape($billing_limit)) . "', '" . (double)$wpdb->escape($trial_amount) . "', '" . intval($wpdb->escape($trial_limit)) . "', '" . intval($wpdb->escape($expiration_number)) . "', '" . $wpdb->escape($expiration_period) . "')";
|
188 |
+
|
189 |
+
if($wpdb->query($sqlQuery) !== false)
|
190 |
+
{
|
191 |
+
//okay
|
192 |
+
do_action("pmpro_save_discount_code_level", $saveid, $level_id);
|
193 |
+
}
|
194 |
+
else
|
195 |
+
{
|
196 |
+
$level_errors[] = sprintf(__("Error saving values for the %s level.", "pmpro"), $wpdb->get_var("SELECT name FROM $wpdb->pmpro_membership_levels WHERE id = '" . $level_id . "' LIMIT 1"));
|
197 |
+
}
|
198 |
+
}
|
199 |
+
}
|
200 |
+
|
201 |
+
//errors?
|
202 |
+
if(!empty($level_errors))
|
203 |
+
{
|
204 |
+
$pmpro_msg = __("There were errors updating the level values: ", "pmpro") . implode(" ", $level_errors);
|
205 |
+
$pmpro_msgt = "error";
|
206 |
+
}
|
207 |
+
else
|
208 |
+
{
|
209 |
+
//all good. set edit = NULL so we go back to the overview page
|
210 |
+
$edit = NULL;
|
211 |
+
|
212 |
+
do_action("pmpro_save_discount_code", $saveid);
|
213 |
+
}
|
214 |
+
}
|
215 |
+
}
|
216 |
+
|
217 |
+
//are we deleting?
|
218 |
+
if(!empty($delete))
|
219 |
+
{
|
220 |
+
//is this a code?
|
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 |
+
|
227 |
+
if($r1 !== false)
|
228 |
+
{
|
229 |
+
//delete the code
|
230 |
+
$r2 = $wpdb->query("DELETE FROM $wpdb->pmpro_discount_codes WHERE id = '" . $delete . "' LIMIT 1");
|
231 |
+
|
232 |
+
if($r2 !== false)
|
233 |
+
{
|
234 |
+
$pmpro_msg = sprintf(__("Code %s deleted successfully.", "pmpro"), $code);
|
235 |
+
$pmpro_msgt = "success";
|
236 |
+
}
|
237 |
+
else
|
238 |
+
{
|
239 |
+
$pmpro_msg = __("Error deleting discount code. The code was only partially deleted. Please try again.", "pmpro");
|
240 |
+
$pmpro_msgt = "error";
|
241 |
+
}
|
242 |
+
}
|
243 |
+
else
|
244 |
+
{
|
245 |
+
$pmpro_msg = __("Error deleting code. Please try again.", "pmpro");
|
246 |
+
$pmpro_msgt = "error";
|
247 |
+
}
|
248 |
+
}
|
249 |
+
else
|
250 |
+
{
|
251 |
+
$pmpro_msg = __("Code not found.", "pmpro");
|
252 |
+
$pmpro_msgt = "error";
|
253 |
+
}
|
254 |
+
}
|
255 |
+
|
256 |
+
require_once(dirname(__FILE__) . "/admin_header.php");
|
257 |
+
?>
|
258 |
+
|
259 |
+
<?php if($edit) { ?>
|
260 |
+
|
261 |
+
<h2>
|
262 |
+
<?php
|
263 |
+
if($edit > 0)
|
264 |
+
echo __("Edit Discount Code", "pmpro");
|
265 |
+
else
|
266 |
+
echo __("Add New Discount Code", "pmpro");
|
267 |
+
?>
|
268 |
+
</h2>
|
269 |
+
|
270 |
+
<?php if(!empty($pmpro_msg)) { ?>
|
271 |