Opened 12 years ago
Closed 8 years ago
#17891 closed enhancement (fixed)
Pass $post_type to 'restrict_manage_posts'
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Posts, Post Types | Keywords: | good-first-bug |
Focuses: | administration | Cc: |
Description
It would be nice if the 'restrict_manage_posts' hook received the post type as an argument, rather than having to check the global.
Attachments (3)
Change History (18)
#6
@
8 years ago
- Owner set to wonderboymusic
- Resolution set to fixed
- Status changed from new to closed
In 33644:
#9
follow-up:
↓ 11
@
8 years ago
- Keywords needs-docs added; has-patch removed
- Resolution fixed deleted
- Severity changed from minor to normal
- Status changed from closed to reopened
The hook actually needs a full docbloc, see https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/php/#1-functions-and-class-methods. Shouldn't be more than a couple lines.
#11
in reply to:
↑ 9
@
8 years ago
Replying to chriscct7:
The hook actually needs a full docbloc
Not sure what you're referring to. The 'restrict_manage_posts' hook is already fully documented in class-wp-posts-list-table. As @pavelevap pointed out, all we really need here is a changelog entry for the new parameter, unless I'm missing something.
#13
follow-up:
↓ 14
@
8 years ago
Sure, I will add patch in a while...
I found similar docs, but I am not sure if there is any standard for this sentence?
Added `$post_type` parameter. The `$post_type` parameter was added. Introduced the `$post_type` parameter. ...
#14
in reply to:
↑ 13
@
8 years ago
- Keywords needs-docs removed
- Owner changed from wonderboymusic to DrewAPicture
- Status changed from reopened to reviewing
Replying to pavelevap:
Sure, I will add patch in a while...
I found similar docs, but I am not sure if there is any standard for this sentence?
Added `$post_type` parameter. The `$post_type` parameter was added. Introduced the `$post_type` parameter. ...
Personally, I prefer the second one:
The `$post_type` parameter was added.
I'll fix it on commit. Thanks for the patch!
Now that we're not passing around the
$post_type
global, we should instead pass the whole$this->screen
object.