Opened 13 years ago
Closed 13 years ago
#24199 closed enhancement (fixed)
Redundant post ID validation
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 3.6 | Priority: | normal |
| Severity: | normal | Version: | 3.6 |
| Component: | General | Keywords: | has-patch |
| Focuses: | Cc: |
Description
We have this in some of the recently introduced functions:
$post = empty( $post_id ) ? get_post() : get_post( $post_id );
That kind of validation is redundant, it duplicates the check in get_post(). We can just always call get_post( $post_id ) instead.
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
[23772]