Skip to:
Content

BuddyPress.org

Opened 11 years ago

Closed 11 years ago

Last modified 8 years ago

#4847 closed enhancement (fixed)

Misplaced 'bp_custom_profile_edit_fields' action hook in default theme

Reported by: dontdream's profile dontdream 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 @dontdream
11 years ago

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.

#2 @boonebgorges
11 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.

#3 @boonebgorges
11 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [6814]) Introduces bp_custom_profile_edit_fields_pre_visibility hook

This new hook allows for plugins/themes to add edit fields that appear before
the Visibility section on the edit/registration screens.

Fixes #4847

Props dontdream

#4 @DJPaul
8 years ago

  • Component changed from Appearance - Template Parts to Templates
Note: See TracTickets for help on using tickets.