distributor icon indicating copy to clipboard operation
distributor copied to clipboard

set target _blank for original post link

Open gustavo-p-rossler opened this issue 1 year ago • 4 comments

Description of the Change

This PR updates the link for the original Post, that appears in the editor when the user is editing a pulled Post. With the current behavior the link opens the original Post in the same window (or browser tab). With the change I made, the link opens the original Post in a new window.

Closes #1271

How to test the Change

This can be verfied by pulling and editing a Post.

Changelog Entry

Changed - Link to original Post

Credits

I was the only one working on this simple change.

Checklist:

gustavo-p-rossler avatar Oct 08 '24 12:10 gustavo-p-rossler

@gustavo-p-rossler thanks for the PR on this, in order to make it more clear that it'll open in a new tab could you add the https://developer.wordpress.org/resource/dashicons/#external icon as part of that link (usually after the text with a space between the text and icon)?

jeffpaul avatar Oct 08 '24 14:10 jeffpaul

@gustavo-p-rossler thanks for the PR on this, in order to make it more clear that it'll open in a new tab could you add the https://developer.wordpress.org/resource/dashicons/#external icon as part of that link (usually after the text with a space between the text and icon)?

Hi @jeffpaul, I've updated the PR adding the external icon as you can see in the screenshot bellow:

Screenshot 2024-10-08 at 18 05 25

gustavo-p-rossler avatar Oct 08 '24 21:10 gustavo-p-rossler

@gustavo-p-rossler Thanks for the pull request.

This tests well in the Gutenberg/Block editor but will need an equivalent change for the classic editor interface to add the icon and the targetting.

The code for the classic editor can be found in this block of code:

https://github.com/10up/distributor/blob/ff477ee105e8d56fc9626f7fa60464fbfb0f8f9c/includes/syndicated-post-ui.php#L496-L504

peterwilsoncc avatar Dec 02 '24 01:12 peterwilsoncc

@peterwilsoncc I have added the equivalent change for the classic editor in https://github.com/10up/distributor/pull/1280/commits/7a881cb132dff82936fb14b34e2d98643d0a159a

sanketio avatar Sep 25 '25 12:09 sanketio