Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#25381 closed enhancement (fixed)

Hook Docs: wp-signup.php

Reported by: miyauchi's profile miyauchi Owned by: kpdesign's profile kpdesign
Milestone: 3.7 Priority: normal
Severity: normal Version:
Component: Inline Docs Keywords: has-patch commit
Focuses: Cc:

Description

Attached patch has done for the all hooks in wp-signup.php

Attachments (10)

wp-signup.diff (8.1 KB) - added by miyauchi 10 years ago.
inline docs for wp-signup.php
wp-signup.2.diff (7.8 KB) - added by miyauchi 10 years ago.
fixed typo. :)
wp-signup.3.diff (8.7 KB) - added by miyauchi 10 years ago.
some fix
wp-signup.4.diff (8.7 KB) - added by miyauchi 10 years ago.
Bug fix.
wp-signup.5.diff (7.6 KB) - added by miyauchi 10 years ago.
patch for r25600
wp-signup.6.diff (7.8 KB) - added by kpdesign 10 years ago.
Second pass on wp-signup.5.diff
wp-signup.7.diff (9.0 KB) - added by DrewAPicture 10 years ago.
see comment:13
wp-signup.8.diff (9.0 KB) - added by DrewAPicture 10 years ago.
Final pass s/sign up/sign-up, array keys to $variables in hash notations
wp-signup.9.diff (9.0 KB) - added by DrewAPicture 10 years ago.
Typo + moar s/signup/sign-up
25381.diff (5.5 KB) - added by DrewAPicture 9 years ago.
Hook docs fixes

Download all attachments as: .zip

Change History (27)

@miyauchi
10 years ago

inline docs for wp-signup.php

@miyauchi
10 years ago

fixed typo. :)

#1 @miyauchi
10 years ago

  • Keywords has-patch added

#2 @DrewAPicture
10 years ago

Hi miyauchi,

wp-signup.2.diff is a good start.

General notes:

  • Change "Fires actions" to "Fires"
  • @since versions should use the 3-digit x.x.x style, e.g. 3.0.0
  • Short descriptions should all start with a capital letter
  • All @param lines need a short description ending with a period
  • Try to avoid "Allows" in filter descriptions. Focus on what is filterable. e.g. "Filter X"
  • Space out all documented action or filter lines (only) per coding standards. e.g.

do_action('signup_blogform', $errors);
becomes
do_action( 'signup_blogform', $errors );

  • Generally: clarity over succinctness is preferred. Short descriptions should be a complete sentence

Specific hooks:

  • Remove // allow definition of default variables since it's being replaced
  • For the signup_another_blog_init filter, the @param is incorrect. I'd suggest breaking the array out to a variable first, then using the variable in the filter. For instance:
    <?php
    $signup_defaults = array(
            'blogname'   => $blogname,
            'blog_title' => $blog_title,
            'errors'     => $errors
    );
    /**
     * Filter default site signup variables.
     *
     * @since 3.0.0
     * @param array $signup_defaults An array of default site signup variables.
     */
    $filtered_results = apply_filters( 'signup_another_blog_init', $signup_defaults );
    
  • Some short descriptions need to be more clear. Such as "Add extra hidden fields to the form of sign up another blog." could be clearer as "Add extra hidden fields to the site signup form.
  • The signup_create_blog_meta filter needs the same treatment as the signup_another_blog_init filter example above
  • "Filter for the new" should be "Filter the new"

I'm gonna stop here. Let's work through the stuff I talked about above to the point you can generate a new patch then we'll see where we're at :)

#3 @DrewAPicture
10 years ago

  • Keywords needs-patch added; has-patch removed

#4 @DrewAPicture
10 years ago

  • Milestone changed from Awaiting Review to 3.7

@miyauchi
10 years ago

some fix

#5 @miyauchi
10 years ago

Hi Drew,

Thanks for review. :)
I was fixed !

@miyauchi
10 years ago

Bug fix.

#6 @miyauchi
10 years ago

  • Keywords has-patch added; needs-patch removed

#7 @miyauchi
10 years ago

  • Cc miya@… added

#8 @DrewAPicture
10 years ago

  • Milestone changed from 3.7 to Awaiting Review
  • Owner set to DrewAPicture
  • Status changed from new to reviewing

#9 follow-up: @DrewAPicture
10 years ago

FYI, the signup_hidden_fields hook has already been documented in [25600]

#10 in reply to: ↑ 9 ; follow-up: @miyauchi
10 years ago

Replying to DrewAPicture:

FYI, the signup_hidden_fields hook has already been documented in [25600]

I see. I'll mark it as duplicate hook.

#11 in reply to: ↑ 10 @DrewAPicture
10 years ago

Replying to miyauchi:

Replying to DrewAPicture:

FYI, the signup_hidden_fields hook has already been documented in [25600]

I see. I'll mark it as duplicate hook.

Actually, the point I was making (not very clearly) was that you'll need to update the file before you re-patch it because these changes were made to the file you're working on.

@miyauchi
10 years ago

patch for r25600

#12 @miyauchi
10 years ago

I make a patch from r25600. :)

@kpdesign
10 years ago

Second pass on wp-signup.5.diff

#13 @DrewAPicture
10 years ago

  • Milestone changed from Awaiting Review to 3.7

@kpdesign: Thanks for the updated patch!

We're almost over the finish line. What's left:

  • signup_blogform, signup_extra_fields the $errors param is missing docs
  • I guess we should do @since MU for signup_create_blog_meta if it was deprecated in 3.0.0
  • s/$signup_user_default/$signup_user_defaults
  • s/$signup_blog_default/$signup_blog_defaults
  • Several array hash notations are missing

#14 @DrewAPicture
10 years ago

  • Owner changed from DrewAPicture to kpdesign

@kpdesign, would you like to do a final review on wp-signup.7.diff? I covered everything in comment:13.

#15 @miyauchi
10 years ago

@deprecated 3.0.0
     * @param array $blog_meta_defaults {
     *     An array of default blog meta variables.
     *
     *     @type int 'lang_id'     The language ID.
     *     @type int 'blog_public' Whether the blog is indexable by search engines. 1 for true, 0 for false.
     * }

Oh! I see! Thanks!

@DrewAPicture
10 years ago

Final pass s/sign up/sign-up, array keys to $variables in hash notations

@DrewAPicture
10 years ago

Typo + moar s/signup/sign-up

#16 @kpdesign
10 years ago

  • Keywords commit added

Reviewed wp-signup.9.diff. Looks good, recommend commit.

#17 @DrewAPicture
10 years ago

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

In 25645:

Inline documentation for hooks in wp-signup.php.

Props kpdesign, miyauchi.

Fixes #25381.

@DrewAPicture
9 years ago

Hook docs fixes

Note: See TracTickets for help on using tickets.