Opened 10 years ago
Closed 10 years ago
#31493 closed defect (bug) (fixed)
Press This: Remove classes from suggested blockquote and source
Reported by: | Michael Arestad | Owned by: | azaozz |
---|---|---|---|
Milestone: | 4.2 | Priority: | normal |
Severity: | normal | Version: | 4.2 |
Component: | Press This | Keywords: | has-patch |
Focuses: | Cc: |
Description
While I can see these classes being handy, we probably shouldn't keep them around.
Attachments (5)
Change History (13)
#3
@
10 years ago
I'm aware. I don't see a huge reason for Press This to add extra classes the full editor doesn't add. I don't think the majority would use it.
I'm also still on the fence for the cite tag since you can't remove it without hopping into the text editor and the cite tag's default styles tend to appear to be italic. Seems confusing.
#4
@
10 years ago
Personally, I like the cite tag since it has a semantic purpose. The particular classes, hearing feedback that it's a lot of cruft on the front end, can be dropped.
A middle ground: a filter, etc that would allow classes to be set if desired by a third-party plugin (noting that I haven't checked the current status of the code and what filters have already been added).
#5
@
10 years ago
Could we have a filter for the entirety of the default text? Something like:
$default_text = apply_filters( 'press_this_default_text', $default_text, $all_variables );
I'd like to be able to keep my current format.
A stretch goal would be a filter for the sniffing action too — Fusion would like to reuse Press This for our quote, link, and note custom post types.
#6
@
10 years ago
31493.3 acknowledges @danielbachhuber point of a "legacy" mode:
* Renames `press_this_suggested_html` filter to `press_this_suggested_source_html`. * Adds `press_this_suggested_default_html` filter to modify the wrapper/html associated with the blockquote. * Continues the original patch of removing the default classes on both items.
"Legacy" mode could be done via a couple of filters, e.g.
add_filter( 'press_this_suggested_default_html', 'bk_pt_legacy_default' ); function bk_pt_legacy_default() { $default_html = ''; return $default_html; } add_filter( 'press_this_suggested_source_html', 'bk_pt_legacy_source' ); function bk_pt_legacy_source() { $source_html = '<a href="%1$s">%2$s</a>'; return $source_html; }
@
10 years ago
Same as .3 except default to em instead of cite and removes unintentional inclusion of testing code from hello.php
A class for the source paragraph was requested in #16922.