Skip to content

Instantly share code, notes, and snippets.

Avatar

Theuns Coetzee ipokkel

View GitHub Profile
@ipokkel
ipokkel / my-pmpro-themeco-pro-cornerstone-editor.php
Created Mar 5, 2021
This recipe improves compatibility for ThemeCo's Cornerstone Editor plugin when editing pages that requires a membership level.
View my-pmpro-themeco-pro-cornerstone-editor.php
<?php
/**
* This recipe improves compatibility for ThemeCo's Cornerstone Editor plugin
* when editing pages that requires a membership level.
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
@ipokkel
ipokkel / example-pmprorh-save-function-with-registration-check.php
Created Mar 5, 2021
Example Registrer helper fields using save_function custom callback that includes a validation check that returns an error message if the field value failed the check.
View example-pmprorh-save-function-with-registration-check.php
<?php
/**
* This recipe adds Website and Biographical Info to the Membership Checkout.
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
@ipokkel
ipokkel / my-pmprosp-strong-password-hint.php
Last active Mar 4, 2021
Change the password hint message displayed for PMPro Strong Passwords.
View my-pmprosp-strong-password-hint.php
<?php
/**
* This recipe changes the password hint message displayed for PMPro Strong Passwords.
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
@ipokkel
ipokkel / my-pmpro-admin-has-all-membership-levels.php
Created Mar 3, 2021
This recipe gives administrators access to all membership levels' privileges on front-end single post of any post type (post, attachment, page, custom post types). Returns true for pmpro_hasMembershipLevel() if user has administrative capabilities. This will also return true when checking if an administrator has access using the filter 'pmpro_ha…
View my-pmpro-admin-has-all-membership-levels.php
<?php
/**
* This recipe gives administrators access to all membership levels' privileges
* on front-end single post of any post type (post, attachment, page, custom post types).
*
* Returns true for pmpro_hasMembershipLevel() if user has administrative capabilities.
* This will also return true when checking if an administrator has access using the
* filter 'pmpro_has_membership_access_filter'.
*
* keywords: admin, admins, administrator, administrators, hasaccess, $hasaccess
@ipokkel
ipokkel / my-pmpro-series-shortcode.php
Created Mar 2, 2021
Shortcode to display a series' list of articles with their available date. #pmpro_series #shortcode
View my-pmpro-series-shortcode.php
<?php
/**
* This recipe creates a shortcode that shows the list of articles for a specific series.
* Use [pmpro_series id="n"] on any page/post to display a list of posts that belong to a series.
* The attribute "id" is the post ID of the series and is required, e.g [pmpro_series id="123"]
*
* This recipe assumes the site has the PMPro Series: Drip Feed Add On active.
* @link https://www.paidmembershipspro.com/add-ons/pmpro-series-for-drip-feed-content/
*
* You can add this recipe to your site by creating a custom plugin
@ipokkel
ipokkel / my-pmpro-custom-email-data-shortcodes.php
Created Feb 26, 2021
This recipe will add some shortcodes to emails.
View my-pmpro-custom-email-data-shortcodes.php
<?php
/**
* This recipe will add some shortcodes to emails.
*
* by default the $data array that controls the email shortcodes is loaded
* conditionally, depending on the type of email being sent. This will
* add certain fields to emails if they are not available for that email template.
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
@ipokkel
ipokkel / pmprosm-email-message-at-bottom.php
Last active Feb 27, 2021
Customize the PMPro Sponsored Levels' email by placing the sponsor code and link details at the bottom of the email.
View pmprosm-email-message-at-bottom.php
<?php
/**
* This recipe places the sponsor message at the bottom of the confirmation mail.
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
@ipokkel
ipokkel / my-pmpro-add-required-attribute-to-input.php
Created Feb 24, 2021
Add the HTML5 required attribute to all checkout fields that has the pmpro_required class for front-end validation that checks that a required field is not empty before processing the form submit.
View my-pmpro-add-required-attribute-to-input.php
<?php
/**
* This recipe adds the HTML5 attribute "required" to all required
* fields on the checkout page that has the class "pmpro_required"
* to check that a required field is not empty before submitting.
*
* @link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/required
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
@ipokkel
ipokkel / my-pmpro-turkish-lira-currency-format.php
Last active Feb 23, 2021
Adjust the Turkish Lira (TRY) currency format for Paid Memberships Pro.
View my-pmpro-turkish-lira-currency-format.php
<?php
/**
* This recipe adjust the Turkish Lira currency settings for Paid Memberships Pro.
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
@ipokkel
ipokkel / my-gettext-shipping.php
Created Feb 22, 2021
Change text for PMPro Shipping
View my-gettext-shipping.php
<?php
/**
* This recipe changes text for the PMPro Shipping Add On.
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/