set target _blank for original post link#1280
Conversation
|
@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:
|
|
@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: distributor/includes/syndicated-post-ui.php Lines 496 to 504 in ff477ee |
|
@peterwilsoncc I have added the equivalent change for the classic editor in 7a881cb |
peterwilsoncc
left a comment
There was a problem hiding this comment.
Thanks Gustavo, this looks good to me and tests well.
I've taken the liberty of pushing some code to add dashicons as a dependency to the edited CSS files. This will ensure the file is enqueued and the font available.
I missed the need for the dependency change on my earlier review and decided to push the change so I could get this merged more quickly.

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
Credits
Props @gustavo-p-rossler, @jeffpaul, @peterwilsoncc.
Checklist: