Php Wordpress为特定级别的成员微笑

Php Wordpress为特定级别的成员微笑,php,wordpress,block,membership,emoticons,Php,Wordpress,Block,Membership,Emoticons,您好,我正在尝试使用一个会员插件来设置我的wordpress网站(目前正在尝试付费会员专业版),并且我正在尝试使某些会员级别可以访问wordpress笑脸(表情符号)。在更大程度上,我希望某些会员级别能够访问不同的笑脸。 Paid Membership Pro提供了一个代码示例,用于根据成员级别授予对主题中内容的访问权限,但微笑的代码不在该文件夹中 示例代码: <?php if(pmpro_hasMembershipLevel('Gold')) { ?>

您好,我正在尝试使用一个会员插件来设置我的wordpress网站(目前正在尝试付费会员专业版),并且我正在尝试使某些会员级别可以访问wordpress笑脸(表情符号)。在更大程度上,我希望某些会员级别能够访问不同的笑脸。

Paid Membership Pro提供了一个代码示例,用于根据成员级别授予对主题中内容的访问权限,但微笑的代码不在该文件夹中

示例代码:

<?php
    if(pmpro_hasMembershipLevel('Gold'))
    {
    ?>
        //Place your HTML or PHP code here if the user is in the required membership level
        ...
    <?php
    }
?>
使用这种方法,当有人评论一个笑脸,并且不是“白金”,并且该成员级别确实存在时,任何东西都不会改变。我不确定我是否需要链接付费会员专业代码(我还没有尝试或寻找)或其他东西。任何帮助都将不胜感激

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