如何在我的插件中改变 bp-custom.php
how to variable in bp-custom.php in my plugin
这是bd中的代码-custom.php
global $bp_profile_field_data;
function show_profile_field()
{
$args = array(
'field' => 'Field Name',
'user_id' => 1
);
$tx_profile_field = bp_profile_field_data( $args );
};
但我想在插件中使用这个字符串,但它回显为空 space
你从数据库中获取字符串
$matric = $wpdb->get_row("SELECT value FROM wp_bp_xprofile_data WHERE field_id = 2 AND user_id = 3");
// this variable holds the string
$matric->value
这是bd中的代码-custom.php
global $bp_profile_field_data;
function show_profile_field()
{
$args = array(
'field' => 'Field Name',
'user_id' => 1
);
$tx_profile_field = bp_profile_field_data( $args );
};
但我想在插件中使用这个字符串,但它回显为空 space
你从数据库中获取字符串
$matric = $wpdb->get_row("SELECT value FROM wp_bp_xprofile_data WHERE field_id = 2 AND user_id = 3");
// this variable holds the string
$matric->value