Paid Membership Pro gives an example of code to grant access to things in your theme based on membership level, but the code for the smilies are not in that folder.
Example Code:
<?php
if(pmpro_hasMembershipLevel('Gold'))
{
?>
//Place your HTML or PHP code here if the user is in the required membership level
...
<?php
}
?>
I have tried to add this code (without the PHP breaking for html) into the function.php in the wp-includes/ folder.
So my code in wordpress's (NOT the theme's) function.php looks like:
function smilies_init() {
global $wpsmiliestrans, $wp_smiliessearch;
// don't bother setting up smilies if they are disabled
if ( !get_option( 'use_smilies' ) )
return;
if(pmpro_hasMembershipLevel('Platinum'))
{
if ( !isset( $wpsmiliestrans ) ) {
$wpsmiliestrans = array(
//The list of smilies are here and very long so this is a placeholder
);
}
}
//And the rest of the code in this function I have not modified
With that method nothing is changed when someone comments a smilies and is not 'Platinum' and that membership level does exist. I am not sure if I need to link the Paid Membership Pro code (which I have not tried or looked for yet) or something else. Any help would be greatly appreciated.