#5944 closed enhancement (fixed)
BP Members Hooks Documentation
Reported by: | tw2113 | Owned by: | tw2113 |
---|---|---|---|
Milestone: | 2.2 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Core | Keywords: | |
Cc: |
Description
This ticket will be where all BP Members patches go for the Hooks Documentation.
Relevant files:
bp-members-actions.php
bp-members-admin.php
bp-members-adminbar.php
bp-members-classes.php
bp-members-filters.php
bp-members-functions.php
bp-members-loader.php
bp-members-screens.php
bp-members-template.php
admin/bp-members-classes.php
Attachments (1)
Change History (26)
#1
@
10 years ago
- Milestone changed from Awaiting Review to Future Release
- Type changed from enhancement to task
#2
@
10 years ago
I am hoping someone familiar with the Members component could do a quick QA review of the attached diff file. I'm a little hesitant on my accuracy for what some of the hooks are for.
#3
@
10 years ago
A bit of feedback:
- Let's capitalize CSS, JS, and URL in documentation. Also, please camel-case "JavaScript".
- 'bp_members_admin_css' is not a dynamic filter, at least not in the sense that other filters in BP are dynamically generated. The value passed to the filter is of course dynamic, but the value passed to pretty much every filter is dynamic.
- I think we shouldn't be putting line breaks in short descriptions. I'm pretty sure that messes up the parser. When in doubt, run through https://github.com/rmccue/WP-Parser.
#4
@
10 years ago
Everything else looks good though for what the hooks are meant to allow or when they're supposed to run?
#7
follow-up:
↓ 10
@
10 years ago
Conflicted regarding the bp_core_signup_blog filter.
return apply_filters( 'bp_core_signup_blog', wpmu_signup_blog( $blog_domain, $blog_path, $blog_title, $user_name, $user_email, $usermeta ) );
The conflict comes from the fact that wpmu_signup_blog doesn't actually return anything, so we're filtering nothing and also returning nothing.
Luckily, we only use the function in one location, and the variable the return value is assigned to is not used again.
#10
in reply to:
↑ 7
@
10 years ago
Replying to tw2113:
Conflicted regarding the bp_core_signup_blog filter.
return apply_filters( 'bp_core_signup_blog', wpmu_signup_blog( $blog_domain, $blog_path, $blog_title, $user_name, $user_email, $usermeta ) );
The conflict comes from the fact that wpmu_signup_blog doesn't actually return anything, so we're filtering nothing and also returning nothing.
Luckily, we only use the function in one location, and the variable the return value is assigned to is not used again.
Good catch, and groan. I'd say "rip it out" but it's possible that someone is actually using that filter to provide a return value in some cases. I'd suggest doing your normal documentation, and noting in the long description that the filter returns no value by default, and is left in place for backward compatibility.
#11
follow-up:
↓ 12
@
10 years ago
Pretty well done with this component, and pending diff review before commit.
#12
in reply to:
↑ 11
@
10 years ago
Replying to tw2113:
Pretty well done with this component, and pending diff review before commit.
Did you mean to attach a diff for review?
#13
@
10 years ago
Nope, that's just me saying pre-commit review to check for periods, alignment, spelling, etc. General final QA on my part.
Moving into Future Release; we can keep these here and move them into particular releases' milestones as we commit things (or work on them).