-
Notifications
You must be signed in to change notification settings - Fork 382
pmpro-buddypress field sync support in GUI #3118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v3.2
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -1341,12 +1341,13 @@ function pmpro_get_field_html( $field = null ) { | |||||
| $field_name = $field->name; | ||||||
| $field_type = $field->type; | ||||||
| $field_required = $field->required; | ||||||
| $field_readonly = $field->readonly; | ||||||
| $field_profile = $field->profile; | ||||||
| $field_readonly = $field->readonly; | ||||||
| $field_profile = $field->profile; | ||||||
| $field_wrapper_class = $field->wrapper_class; | ||||||
| $field_element_class = $field->element_class; | ||||||
| $field_hint = $field->hint; | ||||||
| $field_options = $field->options; | ||||||
| $field_buddypress = $field->buddypress; | ||||||
| } else { | ||||||
| // Default field values | ||||||
| $field_label = ''; | ||||||
|
|
@@ -1359,6 +1360,7 @@ function pmpro_get_field_html( $field = null ) { | |||||
| $field_element_class = ''; | ||||||
| $field_hint = ''; | ||||||
| $field_options = ''; | ||||||
| $field_buddypress = ''; | ||||||
| } | ||||||
|
|
||||||
| // Other vars | ||||||
|
|
@@ -1481,6 +1483,15 @@ function pmpro_get_field_html( $field = null ) { | |||||
| </div> <!-- end pmpro_userfield-field-setting --> | ||||||
| </div> <!-- end pmpro_userfield-field-setting-dual --> | ||||||
|
|
||||||
| <?php if(defined('PMPROBP_DIR')) : ?> | ||||||
|
||||||
| <?php if(defined('PMPROBP_DIR')) : ?> | |
| <?php if ( defined( 'PMPROBP_DIR' ) ) : ?> |
Copilot
AI
Dec 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The closing PHP tag should be on the same indentation level as the opening <?php tag. This line should have 3 fewer spaces of indentation to align properly with line 1486.
| <?php endif; ?> | |
| <?php endif; ?> |
Copilot
AI
Dec 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accessing $settings_field->buddypress directly without checking if the property exists could cause a PHP notice for fields saved before this feature was added. For backward compatibility, consider using the null coalescing operator or isset check, such as $settings_field->buddypress ?? '' to safely handle fields that don't have this property.
| 'buddypress' => $settings_field->buddypress, | |
| 'buddypress' => $settings_field->buddypress ?? '', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accessing
$field->buddypressdirectly without checking if the property exists could cause a PHP notice for fields saved before this feature was added. For backward compatibility, consider using the null coalescing operator or isset check, such as$field_buddypress = $field->buddypress ?? '';to safely handle fields that don't have this property.