Last active
August 24, 2020 07:22
-
-
Save kimcoleman/af70a4971453216ebed4c67c8a4d8223 to your computer and use it in GitHub Desktop.
Apply the WordPress the_content filter to the level description and confirmation message so that you can add shortcodes or other content in this area.
This file contains hidden or 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 | |
/** | |
* Apply the WordPress the_content filter to the level description and confirmation message | |
* so that you can add shortcodes or other content in this area. | |
* | |
* 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/ */ | |
// Apply the_content filter to level description. | |
function my_pmpro_level_description( $description ) { | |
return apply_filters( 'the_content', $description ); | |
} | |
add_filter( 'pmpro_level_description', 'my_pmpro_level_description' ); | |
// Apply the_content filter to level confirmation message. | |
function my_pmpro_confirmation_message( $message ) { | |
return apply_filters( 'the_content', $message ); | |
} | |
add_filter( 'pmpro_confirmation_message', 'my_pmpro_confirmation_message' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment