Forked from kimcoleman/pmpro_content_filter_description_confirmation.php
Created
September 20, 2018 07:50
-
-
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.
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 // 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