#21527 closed enhancement (fixed)
post_type_supports(), no arguments case
| Reported by: | bilalcoder | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.6 |
| Component: | Posts, Post Types | Version: | |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: | Focuses: |
Description
At line 1388 in wp-includes/post.php when checking for number of arguments passed to post_type_supports():
if( function_num_args() <= 2 )
return true;
Obviously it does not hurt, but absolutely it's just an extra code.
Attachments (2)
Change History (12)
#7
follow-up:
↓ 8
@
14 years ago
Looks like remove_post_type_support() can lose some redundant code too, the second isset() check is unnecessary: 21527.2.diff.
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Looking at the code (introduced in [12682]), seems that the check can be removed indeed:
http://core.trac.wordpress.org/browser/tags/3.4.1/wp-includes/post.php#L1358
Related: #17584