#16935 closed enhancement (fixed)
Add filter to selected text in press-this.php
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 4.2 | Priority: | normal |
Severity: | normal | Version: | 3.1 |
Component: | Press This | Keywords: | has-patch |
Focuses: | Cc: |
Description
When using the "Press This" bookmarklet, any text selected on the current page is inserted into the post body textarea. This should be wrapped in a <blockquote> tag with some appropriate class name.
Attachments (4)
Change History (22)
#1
@
14 years ago
- Cc info@… added
- Keywords has-patch needs-testing dev-feedback 2nd-opinion added
I didn't add a class, I did add the cite attribute. However this still needs an okay from higher up for the feature request to be honored. I can see the 'need' for this because why would anybody want to copy content from a different website without a <blockquote>, unless they're stealing content ;)
#3
@
14 years ago
Just added another patch including your changes plus the class "press-this-selection"
This is my first time contributing a patch so I hope I've done it correctly.
#4
@
14 years ago
Ha, already screwed that up. I used double quotes where I should have used single quotes. New patch corrected and uploaded. Apologies.
#5
@
14 years ago
- Component changed from General to Press This
- Keywords dev-feedback removed
Related: #16935
#7
@
12 years ago
- Resolution set to wontfix
- Status changed from new to closed
I would rather see a filter for $selection than forcing it in blockquotes. Many different uses out there for press-this. Let the theme or end user decide how front end content gets marked up. I'm closing as wont fix please reopen if you have any further thoughts.
#10
follow-up:
↓ 11
@
12 years ago
Any styling hook would be beneficial, I think -- just *something* to allow Press This to be more effortless.
I'm not sure what you mean by adding a filter for $selection
, however.
#11
in reply to:
↑ 10
@
12 years ago
Replying to topdownjimmy:
Any styling hook would be beneficial, I think -- just *something* to allow Press This to be more effortless.
I'm not sure what you mean by adding a filter for
$selection
, however.
$selection
is the variable that holds the selected text that gets added to the editor. Adding a filter (see: patch) will allow you to wrap any html you wanted around it.
#12
@
12 years ago
- Keywords 2nd-opinion needs-testing removed
- Resolution wontfix deleted
- Status changed from closed to reopened
#13
@
12 years ago
- Summary changed from Wrap selected text in <blockquote> in press-this.php to Add filter to selected text in press-this.php
#15
@
12 years ago
- Milestone changed from 3.7 to Future Release
I don't know how useful this filter really is as it stands - you're going to be string replacing or regex-ing HTML and praying no other filters are there. It should pass the original $selection
for context, probably, so one could just wrap that with whatever.
Added blockquotes to the "Press This" content.