Last active
March 29, 2021 04:23
-
-
Save JarrydLong/d3be7a74ec81ac9c90731f09f84af305 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This recipe will add in the necessary classes to PMPro Buttons, ensuring they | |
* have the same look & feel as your theme: Storefront | |
* | |
* https://wordpress.org/themes/storefront/ | |
* | |
* 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 mypmpro_storefront_classes( $class, $element ){ | |
if ( in_array( 'pmpro_btn', $class ) ) { | |
$class = array(); | |
$class[] = 'button'; | |
} | |
return $class; | |
} | |
add_action( 'pmpro_element_class', 'mypmpro_storefront_classes', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This recipe is included in the blog post on "Using the Storefront Theme By Automattic with Paid Memberships Pro" at Paid Memberships Pro here: https://www.paidmembershipspro.com/storefront-theme-by-automattic-paid-memberships-pro/