buddydev / bp-xprofile-custom-field-types Goto Github PK
View Code? Open in Web Editor NEWXprofile Custom field types for BuddyPress
Xprofile Custom field types for BuddyPress
add_action('profile_update',function($user_id,$oldData,$newData){
require_once('updateUsersToSheet.php');
updateUsersToSheet($api_url,$user_id);
},10,3);
I am using the above code to send user data to a google sheet when the profile is updated. I have a "date" field which allows user to choose their birthday, and its field_id is 33.
In updateUsersToSheet.php
,if I do
var_dump(xprofile_get_field_data(33,$user_id));
It will output an empty string. However, if I put
var_dump(xprofile_get_field_data(33,$user_id));
in function.php, it will correctly output the users' birthday.
I also tried to get this data from custom api
// get User bDay
add_action( 'rest_api_init', 'returnUserBday' );
function returnUserBday(){
register_rest_route( 'wsk/v1', '/userBday/', array(
'methods' => 'GET',
'callback' => 'getUserBday',
) );
}
function getUserBday( $request ) {
$id = $request->get_param('id');
$bday = xprofile_get_field_data(33,$id);
$response = array(
'bday' => $bday
);
return rest_ensure_response( $response );
}
It also outputs an empty string.
I have tried create another "html5 date picker" field, and it doesn't have this problem.
Hello,
I have several use cases to add groups of fields at once. We also have several conditional scenarios where will will be adding several hundred conditional fields based upon existing user selections. Are there any methods to import BP fields? I'm thinking some kind of csv or xml import? This will save us many hours of manual input. Curious for feedback. Thank you!
The Checkbox Acceptance type sticks on value 1
when unchecked on the dashboard profile edit page. This causes the field to always save as if it were checked, even if it previously wasn't.
The cause appears to be line 6 in assets/js/bp-xprofile-custom-field-types.js
. It uses .editfield
as a parent selector, but that class does not exist on the parent on the dashboard profile edit page.
Possible fix: replace the selector with .field_type_checkbox_acceptance
, which appears to be on both front and backend.
Hello,
I would like to submit a bug in the plugin called "BuddyPress Xprofile Custom Field Types" v1.1.1
Problem: The file field does not save the files.
Steps to reproduce:
I hope you can fix this issue get a fixed version available for download. For more information, please email me at [email protected]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.