Opened 12 years ago
Closed 12 years ago
#24116 closed task (blessed) (invalid)
Set post format when arriving to post-new.php?format={post_format}
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.6 |
Component: | Post Formats | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
So that we (or others) can jump-start people into a specific post format, we should respect format
in a query arg for post-new.php
.
Attachments (4)
Change History (17)
#4
follow-up:
↓ 5
@
12 years ago
I agree with not unsetting items from superglobals. Sometimes we do it to avoid clashes with the WP class, though.
I'd prefer 'format' over 'post_format'. 'post_format' (and, yes, 'post_type') are crufty. Why not go simple when we have the chance?
This must also only apply (I can't tell looking at just the patch) when the post type supports post formats.
#5
in reply to:
↑ 4
;
follow-up:
↓ 6
@
12 years ago
I don't think it matters all that much in the URL, but we already use post_format
as a query var in edit.php and on the front end, and the taxonomy is also called post_format
. Not sure it's really worth stepping away from the convention, for the little benefit that it would bring to this single URL.
This must also only apply when the post type supports post formats.
It does.
#6
in reply to:
↑ 5
@
12 years ago
Replying to kovshenin:
I don't think it matters all that much in the URL, but we already use
post_format
as a query var in edit.php and on the front end, and the taxonomy is also calledpost_format
. Not sure it's really worth stepping away from the convention, for the little benefit that it would bring to this single URL.
This isn't a query variable we link to; this is a shortcut for jumpstarting a post. The precedent is ?content=&excerpt= (though, oddly, post_title).
#7
@
12 years ago
Should this also only work on post-new.php? Seems like it should be inside the auto-draft branch below it.
#8
@
12 years ago
And what should happen to $post_format_set_class if ?format is provided? So maybe that's an else
.
#9
@
12 years ago
In 24116.4.diff:
- Back to using ?format vs ?post_format
- Correct handling of
$post_format_set_class
- Set correct screen icon with ?format
I always found it irritating when I put something in the query string, and then WordPress unsets it somewhere along the way, so it never reaches my plugin. We don't do that in
get_default_post_to_edit
and I don't think we should do it for post formats either.Also,
format
sounds too generic, I think we should usepost_format
, like we do withpost_type
.24116.3.diff addresses the above.