#37067 closed defect (bug) (fixed)
add_theme_support() docs do not mention second parameter $arguments
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.6 | Priority: | normal |
Severity: | normal | Version: | |
Component: | General | Keywords: | good-first-bug has-patch |
Focuses: | docs | Cc: |
Description
add_theme_support() has two parameters, $feature and $arguments as documented in the Codex:
https://codex.wordpress.org/Function_Reference/add_theme_support
<?php add_theme_support( $feature, $arguments ); ?>
The Code Reference only lists one parameter, $feature:
https://developer.wordpress.org/reference/functions/add_theme_support/
The Code Reference should be updated to document the $arguments parameter for use cases like the following:
<?php add_theme_support( 'post-thumbnails', array( 'post_type' ) ); ?>
Moved from #meta1764
Attachments (1)
Change History (11)
This ticket was mentioned in Slack in #meta-devhub by drew. View the logs.
9 years ago
#3
@
9 years ago
- Owner set to DrewAPicture
- Resolution set to fixed
- Status changed from new to closed
In 37672:
#4
@
9 years ago
- Keywords has-patch added; needs-patch removed
- Milestone changed from Awaiting Review to 4.6
Due to the extensive context of the second parameter, $args
, let's handle migrating that content from the Codex into the "More Information" section instead of trying to squeeze it into the DocBlock.
#5
follow-up:
↓ 6
@
9 years ago
@kevinwhoffman I've migrated the Codex information to the Code Reference page. The new argument docs will come over when we reparse following the 4.6 release.
https://developer.wordpress.org/reference/functions/add_theme_support/
#6
in reply to:
↑ 5
;
follow-up:
↓ 7
@
9 years ago
Replying to DrewAPicture:
@kevinwhoffman I've migrated the Codex information to the Code Reference page. The new argument docs will come over when we reparse following the 4.6 release.
Note that =>
in all of the array examples is showing as =>
Other than that, the page is so much more helpful now. Thanks.
#7
in reply to:
↑ 6
@
9 years ago
Replying to kevinwhoffman:
Replying to DrewAPicture:
@kevinwhoffman I've migrated the Codex information to the Code Reference page. The new argument docs will come over when we reparse following the 4.6 release.
Note that
=>
in all of the array examples is showing as=>
Yeah, that's an encoding problem we need to fix on DevHub. /cc @coffee2code
#8
follow-up:
↓ 9
@
9 years ago
@DrewAPicture: For the 'more info' for this post, the multiple >
were there in the raw content. I simply edited the post to change >
to >
and all appears well.
#9
in reply to:
↑ 8
@
9 years ago
Replying to coffee2code:
@DrewAPicture: For the 'more info' for this post, the multiple
>
were there in the raw content. I simply edited the post to change>
to>
and all appears well.
There's an extra ;
on line 8 of the custom-header example.
In 37671: