Skip to content

Instantly share code, notes, and snippets.

View ronalfy's full-sized avatar
🏠
Working from home

Ronald Huereca ronalfy

🏠
Working from home
View GitHub Profile
@ronalfy
ronalfy / pmpro-display-membership-levels-for-posts.php
Last active November 12, 2020 18:53 — forked from greathmaster/pmpro-display-membership-levels-for-posts.php
PMPro Display membership levels for posts and pages
<?php
/**
* Show levels for a post/page in the admin.
*
* 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/
*/
function pmprobe_manage_posts_columns( $columns, $post_type)
@ronalfy
ronalfy / pmpro-bulk-approve-members.php
Created November 12, 2020 18:06
PMPro - Bulk Approve Existing Members
<?php
/**
* Bulk approve existing members.
*
* 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/
*/
/**
@ronalfy
ronalfy / pmpro-acf-add-options-page.restrict-levels-domains.php
Created November 12, 2020 17:36
PMPro + ACF - Add Options Page and Restrict Levels by Domains
<?php
/**
* Requires ACF Pro. Registers an options page and restricts by level and domain.
*
* 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/
*/
@ronalfy
ronalfy / pmpro-email-confirmation-add-body-classes.php
Created November 11, 2020 16:47
PMPro - Email Confirmation Add Body Classes
<?php
/**
* Set up classes for email confirmation.
*
* Available classes:
*
* 1. Logged in: pmpro-body-is-logged-in
* 2. Logged out: pmpro-body-is-logged-out
* 3. Logged in and and active member: pmpro-body-has-membership-level, pmpro-body-has-membership-level-n
* 4. Logged in and awaiting confirmation: pmpro-body-pending-confirmation
@ronalfy
ronalfy / pmpro-style-email-confirmation-message.php
Created November 11, 2020 04:26
PMPro - Style the Email Confirmation Confirmation Message
<?php
/**
* Sample HTML and example of wrapping a div around confirmation message for styling.
*
* 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/
*/
/**
@ronalfy
ronalfy / pmpro-add-company-name-rh.php
Created November 10, 2020 18:48
PMPro - Adding Company Name to Register Helper
<?php
/**
* Adds a company name to the checkout page.
*
* 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/
*/
@ronalfy
ronalfy / pmpro-example-styling-buttons.css
Created November 10, 2020 18:29
PMPro - Example of Styling Buttons
body a.pmpro_btn,
body a.pmpro_btn.pmpro_btn-select {
background: #ed8609;
color: #FFF;
}
body a.pmpro_btn.disabled {
background: #ec9a39;
color: #FFF;
}
body .pmpro_content_message {
@ronalfy
ronalfy / pmpro-woo-prevent-level-buying-product.php
Created November 10, 2020 16:51
PMPro - WooCommerce - Prevent Level from Buying Product
<?php
/**
* Prevent certain levels from purchasing products.
* Change the `12` below to othe level you'd like to hide.
*
* 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/
@ronalfy
ronalfy / pmpro-get-text-example.php
Created November 10, 2020 16:33
PMPro Get Text Example 2
<?php
/**
* This recipe replaces text strings in the content filter.
*
* 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/
*/
@ronalfy
ronalfy / pmpro-strong-password-css.css
Created November 9, 2020 19:57
PMPro - Strong Password Checker CSS Fixes
#pmprosp-container {
float: right;
width: 100%;
max-width: 51%;
}
.pmpro_checkout-field-password2 {
float: right;
clear: both;
width: 51%;
}