WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 7 months ago

#16922 new enhancement

Add class to "via" paragraph in press-this.php

Reported by: topdownjimmy Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 2.6
Component: Press This Keywords: has-patch
Focuses: Cc:

Description

When using "Press This," a paragraph is added to the bottom of the post with a link to the source, and, if there is a selected block of text being quoted, the word "via" prepended.

It would be helpful for themes to be able to style this paragraph, so I suggest adding a class to it such as "via".

Also, oughtn't this be wrapped in a <cite> tag as well?

Attachments (2)

press_this_via.diff (480 bytes) - added by topdownjimmy 3 years ago.
Added "press-this-via" class to the via paragraph
16922.2.patch (725 bytes) - added by c3mdigital 8 months ago.
Filter press-this source url paragraph.

Download all attachments as: .zip

Change History (11)

comment:1 topdownjimmy3 years ago

Maybe "press-this-via" would be a more appropriate class name.

topdownjimmy3 years ago

Added "press-this-via" class to the via paragraph

comment:2 topdownjimmy3 years ago

Attached patch to include class "press-this-via" to the "via" paragraph.

comment:3 topdownjimmy3 years ago

  • Keywords has-patch added

comment:4 ocean903 years ago

  • Keywords 2nd-opinion added
  • Type changed from feature request to enhancement

No <cite>, see #17520.

Can't you add it via the HTML Editor? Also if you switch the <p> tags and the class are stripped. Maybe add it to the <a> tag directly.

comment:5 ocean903 years ago

Related: #16935

comment:6 c3mdigital8 months ago

I'm going to propose the same solution as in #16935 which is to add a filter. This would let the user or theme author alter the html around the source $url.

c3mdigital8 months ago

Filter press-this source url paragraph.

comment:7 c3mdigital8 months ago

  • Keywords 2nd-opinion removed
  • Version changed from 3.1 to 2.6

comment:8 SergeyBiryukov8 months ago

  • Milestone changed from Awaiting Review to 3.7

comment:9 helen7 months ago

  • Milestone changed from 3.7 to Future Release

Same concern with latest patch as in #16935.

Note: See TracTickets for help on using tickets.