WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 3 years ago

Last modified 3 years ago

#16922 closed enhancement (fixed)

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

Reported by: topdownjimmy Owned by:
Milestone: 4.2 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 7 years ago.
Added "press-this-via" class to the via paragraph
16922.2.patch (725 bytes) - added by c3mdigital 4 years ago.
Filter press-this source url paragraph.

Download all attachments as: .zip

Change History (16)

#1 @topdownjimmy
7 years ago

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

@topdownjimmy
7 years ago

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

#2 @topdownjimmy
7 years ago

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

#3 @topdownjimmy
7 years ago

  • Keywords has-patch added

#4 @ocean90
6 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.

#5 @ocean90
6 years ago

Related: #16935

#6 @c3mdigital
4 years 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.

@c3mdigital
4 years ago

Filter press-this source url paragraph.

#7 @c3mdigital
4 years ago

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

#8 @SergeyBiryukov
4 years ago

  • Milestone changed from Awaiting Review to 3.7

#9 @helen
4 years ago

  • Milestone changed from 3.7 to Future Release

Same concern with latest patch as in #16935.

#10 @kraftbj
3 years ago

#29298 was marked as a duplicate.

#11 @kraftbj
3 years ago

FYI: The Press This plugin working on the rehash of the feature added a class to the paragraph tag wrapping the attribution line via https://github.com/MichaelArestad/Press-This/commit/2ff1b2381271bd8c812211d5f0cb9a139d0f8ec5

The feature plugin also uses the cite tag.

Once merged with core, those changes should resolve this ticket.

#12 @kraftbj
3 years ago

  • Resolution set to worksforme
  • Status changed from new to closed

#13 @DrewAPicture
3 years ago

  • Milestone Future Release deleted

#14 @SergeyBiryukov
3 years ago

  • Milestone set to 4.2
  • Resolution changed from worksforme to fixed
Note: See TracTickets for help on using tickets.