Opened 14 years ago
Closed 13 years ago
#18083 closed enhancement (fixed)
Enable Post formats in Quick Edit
Reported by: | mfields | Owned by: | duck_ |
---|---|---|---|
Milestone: | 3.3 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Quick/Bulk Edit | Keywords: | dev-feedback has-patch |
Focuses: | Cc: |
Description
I think that it would be great to be able to modify a post's format via bulk/quick edit. It appears that there is room for a select box under "Post Status".
Attachments (3)
Change History (10)
#1
@
13 years ago
- Keywords needs-patch added; ui-feedback removed
- Milestone changed from Awaiting Review to 3.3
#2
@
13 years ago
- Keywords has-patch added; needs-patch removed
Quick stab at a first patch attached. I [and anybody else who wants to] need to review it again later.
#3
@
13 years ago
- Owner set to duck_
- Resolution set to fixed
- Status changed from new to closed
In [18722]:
#4
@
13 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
The issue of what to do about posts with a format that is not supported by the current theme returns. See #15393.
Fixing this has to be done in Javascript, like it's done for authors who no longer have edit caps [12046], for example:
if ( !$(':input[name="post_format"] option[value="' + $('.post_format', rowData).text() + '"]', editRow).val() ) { // post format not supported by current theme, so we need to add it back to the list of formats $(':input[name="post_format"]', editRow).append('<option value="' + $('.post_format', rowData).text() + '">' + $('.post_format', rowData).text() + '</option>'); }
Unfortunately the display string isn't available so this would show "chat", for example, in the select box instead of "Chat".
#5
@
13 years ago
18083.unsupported-formats.diff following suggestion by nacin: "What if we added all post format strings (supported or not) to the select box, then hide them dynamically if they're A) not supported and B) not the current one?"
Needs a bit of clean up and testing when I'm not as tired :)
#6
@
13 years ago
18083.2.diff uses .remove() instead of .hide(), which doesn't work on option elements on Chrome and possibly other browsers. Since we clone the edit row and then modify that, this will work for multiple quick edits on the page. Patch also removes the id on the select, as it would introduce duplicate ids. We don't use the id in the JS so we're good there.
Fine with this addition to Quick Edit. Needs patch. If someone does it within the next week I see no reason not to include in 3.3.