Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save andrewlimaza/4b66f8b908705a0e877e841d1fcacfbc to your computer and use it in GitHub Desktop.
Save andrewlimaza/4b66f8b908705a0e877e841d1fcacfbc 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.
<?php // Do not copy this tag
/**
* 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.
*
* Add this code below to your PMPro Customizations Plugin - 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