Opened 9 years ago
Closed 9 years ago
#6690 closed enhancement (fixed)
extend class-bp-xprofile-group.php with xprofile_group_after_group_description
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.6 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Extended Profile | Keywords: | has-patch commit |
Cc: | kmb@… |
Description
Hi,
like the one in #5674 I need an action within the main part - almost like xprofile_field_after_contentbox in class-bp-xprofile-field.php
thanks in advance
Klaus
+++ wp-content/plugins/buddypress/bp-xprofile/classes/class-bp-xprofile-group.php @@ -693,6 +693,9 @@ class BP_XProfile_Group { <textarea name="group_description" id="group_description" rows="8" cols="60"><?php echo esc_textarea( $this->description ); ?></textarea> </div> </div> + <?php + do_action( 'xprofile_group_after_group_description', $this ); + ?> </div><!-- #post-body-content --> <div id="postbox-container-1" class="postbox-container">
Attachments (1)
Change History (9)
#1
@
9 years ago
- Keywords has-patch needs-testing added
- Milestone changed from Awaiting Review to 2.5
#2
@
9 years ago
- Keywords reporter-feedback added; needs-testing removed
- Milestone changed from 2.5 to 2.6
I'm trying to think why this hook would be needed as the requested hook is very specific.
Do you want to add some explanation for the xprofile field description for admins (eg. This will be displayed after the field is rendered on the frontend
)? If so, maybe we can hardcode a description instead of using a hook.
Klaus - Can you say a bit about what you would be using this hook for?
In the meantime, I'm moving this to 2.6 to clear the milestone.
#3
@
9 years ago
- Cc kmb@… added
Hi r-a-y,
sorry for answering late, but I did not get a notification.
It's not for a simple textual description. I've written an ACL-Plugin (not ready yet for public release) and the form-fields need some space. It's not enough to put the in the right column.
And because there is no hook in the center-part I've suggested this one like the one in class-bp-xprofile-field.php
kind regards
Klaus
#5
@
9 years ago
Thanks for the feedback, Klaus.
After looking into this more, I think the hook makes sense.
The only thing I'm wary about is the name of the hook. I know you were probably using the other hooks on the page as a guide (like 'xprofile_group_before_submitbox'
), but since XProfile Groups are also shown on the frontend, 'xprofile_group_after_group_description'
sounds a little too generic.
I'm thinking 'xprofile_group_admin_after_description'
would be more suitable.
Could use other thoughts from core devs.
We'll take a look at this for the 2.5 release! Thanks!