php - Wordpress Smilies for certain levels of members -
hello, trying setup wordpress website membership plugin (right trying paid membership pro), , trying make membership levels either granted access wordpress smilies (emoticons). further extent love have membership levels have access different smilies.
paid membership pro gives example of code grant access things in theme based on membership level, code smilies not in folder.
example code:
<?php if(pmpro_hasmembershiplevel('gold')) { ?> //place html or php code here if user in required membership level ... <?php } ?> i have tried add code (without php breaking html) function.php in wp-includes/ folder.
so code in wordpress's (not theme's) function.php looks like:
function smilies_init() { global $wpsmiliestrans, $wp_smiliessearch; // don't bother setting smilies if disabled if ( !get_option( 'use_smilies' ) ) return; if(pmpro_hasmembershiplevel('platinum')) { if ( !isset( $wpsmiliestrans ) ) { $wpsmiliestrans = array( //the list of smilies here , long placeholder ); } } //and rest of code in function have not modified with method nothing changed when comments smilies , not 'platinum' , membership level exist. not sure if need link paid membership pro code (which have not tried or looked yet) or else. appreciated.
Comments
Post a Comment