简体   繁体   English

BuddyPress Xprofile字段显示在“ wordpress用户编辑管理面板”上

[英]BuddyPress Xprofile fields to display on “wordpress user edit admin panel”

I am building a buddypress/bbpress, website with xprofile registration fields. 我正在建立一个带有xprofile注册字段的buddypress / bbpress网站。 I am using New User Approve plugin to approve each users manually since we need to check information of each user before they get activated. 我正在使用“新用户批准”插件来手动批准每个用户,因为我们需要在激活每个用户之前检查每个用户的信息。

Problem here is, I am unable to check/view the xprofile field values in Wordpress user edit admin panel. 问题是,我无法在Wordpress用户编辑管理面板中检查/查看xprofile字段值。 All I have is the username change password, changing roles etc. I want the admin panel to display the extra information of the registered user so that I can check the info and approve . 我所拥有的只是用户名更改密码,角色更改等。我希望管理面板显示注册用户的额外信息,以便我可以查看信息并批准。 Anyone can help me out to solve this problem. 任何人都可以帮助我解决这个问题。

Might be similar to this.. haven't tried the code though.... Replace the key value 'xprofile_key_birthday' with actual xprofile keys in Buddypress DB. 可能与此类似。.虽然还没有尝试过代码。...用Buddypress DB中的实际xprofile键替换键值'xprofile_key_birthday'。

Note: This code only displays the values on the edit screen and doesn't insert or update anything. 注意:此代码仅在编辑屏幕上显示值,而不插入或更新任何内容。

<?php 
add_action( 'show_user_profile', 'showmy_extra_profile_fields' );
add_action( 'edit_user_profile', 'showmy_extra_profile_fields' );
function showmy_extra_profile_fields( $user ) { ?>
    <h3>Extra profile information</h3>
    <table class="form-table">
        <tr>
            <th><label>xprofile_key_birthday</label></th>
            <td>
                <?php 
                if( function_exists( 'xprofile_get_field_data' ) ) {
                    $xprofile_value = xprofile_get_field_data('xprofile_key_birthday', $user->ID );
                }
                else {
                    $xprofile_value = '';
                }
                ?>
                <input type="text" name="xprofile_key_birthday" id="xprofile_key_birthday" value="<?php echo esc_attr( $xprofile_value ); ?>" class="regular-text" readonly />
            </td>
        </tr>

    </table>
<?php 
}
?>

I use the free Wangguard plugin on my BuddyPress/bbPress website. 我在BuddyPress / bbPress网站上使用免费的Wangguard插件 All I need to do is click on "Users" in the Wangguard menu on Wordpress dashboard sidebar and then click on "BP Profile" under the member username column. 我需要做的就是单击Wordpress仪表板侧栏上Wangwang菜单中的“用户”,然后单击成员用户名列下的“ BP配置文件”。 I can view and even edit the member profile from there. 我可以从那里查看甚至编辑会员资料。 Hope it helps. 希望能帮助到你。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 BuddyPress Xprofile字段显示在“ wordpress用户编辑管理面板”上 - BuddyPress Xprofile fields to display on “wordpress user edit admin panel” Buddypress Xprofile字段和Wordpress自定义用户元2方式同步 - Buddypress Xprofile fields & Wordpress custom user meta 2 way sync Buddypress Xprofile自定义字段类型(Loop用户配置文件字段) - Buddypress Xprofile Custom Fields Type (Loop user profile field) 更新 Buddypress 用户的 xprofile 输入 - Update Buddypress user’s xprofile input 我如何在 WordPress 管理面板编辑帐户页面上显示终极会员插件的输入元字段以供管理员编辑? - how can I display ultimate member plugin's input meta fields on WordPress admin panel edit account page for editing by the admin? 隐藏buddypress注册页面中的所有Xprofile字段 - Hide all Xprofile fields from buddypress registration page wordpress 允许管理员使用自定义字段编辑用户配置文件 - wordpress allow admin to edit user profile with custom fields 如何在Wordpress管理面板中编辑页面标题? - How to edit page heading in wordpress admin panel? 将用户配置文件字段添加到Wordpress Buddypress以包括“收藏夹” - Adding User Profile Fields to Wordpress Buddypress to Include “Favorites” WordPress 管理面板中的帖子标题显示不正确 - Incorrect display of post titles in WordPress admin panel
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM