#4847 closed enhancement (fixed)
Misplaced 'bp_custom_profile_edit_fields' action hook in default theme
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 1.7 | Priority: | normal |
Severity: | trivial | Version: | 1.6.2 |
Component: | Templates | Keywords: | |
Cc: |
Description
In file 'buddypress/bp-themes/bp-default/members/single/profile/edit.php' the line:
do_action( 'bp_custom_profile_edit_fields' );
appears after the block of code that handles the field visibility, while it should appear before that block. In other words that 'do_action' line should be moved from line 136 to line 116.
Why do I think so? The 'bp_custom_profile_edit_fields' action hook is apparently intended to handle custom profile field types, see for instance the plugin 'Buddypress Xprofile Custom Fields Type'. The present placement of the 'do_action' line makes the custom fields appear after their visibility properties, while the built-in types appear before them. Probably when the visibility properties where added, they were inadvertently added before the hook.
Change History (4)
#1
in reply to:
↑ description
@
12 years ago
#2
@
12 years ago
- Milestone changed from Awaiting Review to 1.7
- Severity changed from normal to trivial
I agree that it was probably a mistake to put the visibility fields before this hook. Now that it's been in place for some time, though, I don't want to move it - it's possible that there are people who are exploiting the current hook location, and it'd screw up their sites to move it somewhere else. So I'm going to add another action.
The same applies to file 'buddypress/bp-themes/bp-default/registration/register.php', the 'do_action' line should be moved from line 179 to line 157.