#23850 closed enhancement (fixed)
Searchform Format
Reported by: | WraithKenny | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 3.6 | Priority: | normal |
Severity: | normal | Version: | 3.6 |
Component: | Widgets | Keywords: | has-patch commit needs-codex |
Focuses: | Cc: |
Description
We should use a filter instead of an argument.
Attachments (11)
Change History (42)
#3
@
12 years ago
+1 -- cleaner and easier. In a theme, it'd be rare you'd want one search form call to be XHTML and another be HTML5.
#5
@
12 years ago
@WraithKenny -- something's weird with your patch. Did not apply cleanly in my local WP install.
#9
@
12 years ago
I created it from git unified diff, thought it'd be compatible... Making a new one, to include docs.
#10
follow-up:
↓ 12
@
12 years ago
New patch is good ol' fashioned svn patch. Just removed the @param doc (didn't need anything else, right?)
#12
in reply to:
↑ 10
@
12 years ago
Replying to WraithKenny:
Just removed the @param doc (didn't need anything else, right?)
Edit: Yeah, didn't realize the $format
param was introduced in the 3.6 cycle. Disregard 23850.diff.
#14
follow-up:
↓ 15
@
12 years ago
The param was only there for 11 days, and we didn't hit beta with it. I don't think we should add the deprecated arg.
#15
in reply to:
↑ 14
@
12 years ago
Replying to WraithKenny:
The param was only there for 11 days, and we didn't hit beta with it. I don't think we should add the deprecated arg.
Ha, good call. Didn't realize the param was added in this cycle. By all means general-template.php.patch should do the trick.
#16
@
12 years ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed
In 23798:
#18
in reply to:
↑ 17
@
11 years ago
Replying to lancewillett:
Can we update the PHPDocs to highlight that search_form_format
filter is 3.6 feature.
#19
@
11 years ago
I'm not sure this should be a filter. Or rather, while it should be a filter, this should also be theme support. There's no reason to force a theme to write a function just to return 'html5' when a single add_theme_support() function will do.
#21
@
11 years ago
23850.2.diff checks for html5-search-form
theme feature.
#24
@
11 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Thinking we should make a few more changes here.
#25
follow-up:
↓ 26
@
11 years ago
I love the move to a simple 'html5'
support call.
In .3.diff, can we make it 'comment-form'
and 'search-form'
maybe? We could use 'comments'
or 'comment-list'
for the html5 markup in wp_list_comments()
then.
We also introduced html5 in the Quote format fallback, would it make sense to add a switch there, too? Happy to add a patch if you think we should, btw :)
#26
in reply to:
↑ 25
@
11 years ago
Replying to obenland:
We also introduced html5 in the Quote format fallback, would it make sense to add a switch there, too? Happy to add a patch if you think we should, btw :)
I'd vote no switch to 3.6+ features because a) we don't need back compat and b) we're pushing the web forward to modern markup.
The advantage of a filter is themes wouldn't have to add args to each get_search_form call, and places where core calls it would be affected (which seems desirable), like (search widget), and would obsolete #23848