diff --git a/assets/css/gutenberg-syndicated-post.scss b/assets/css/gutenberg-syndicated-post.scss index b8e02453c..67a148446 100644 --- a/assets/css/gutenberg-syndicated-post.scss +++ b/assets/css/gutenberg-syndicated-post.scss @@ -81,6 +81,22 @@ body.dt-linked-post { display: none; } + .action-link { + + &:after { + font-family: dashicons; + content: "\f504"; + font-size: 1rem; + position: absolute; + margin-top: -.125rem; + } + + &.is-secondary:hover:not(:disabled,[aria-disabled=true]) { + box-shadow: none; + } + } + + } #distributed-from, diff --git a/assets/js/gutenberg-syndicated-post.js b/assets/js/gutenberg-syndicated-post.js index e87f974a0..f1fc7d7d8 100644 --- a/assets/js/gutenberg-syndicated-post.js +++ b/assets/js/gutenberg-syndicated-post.js @@ -45,7 +45,12 @@ if ( __( 'View the origin %1$s.', 'distributor' ), dtGutenberg.postTypeSingular.toLowerCase() ), - url: dtGutenberg.postUrl, + url: false, + className: 'action-link is-link', + onClick: function(e) { + e.preventDefault(); + window.open(dtGutenberg.postUrl, 'blank') + }, } ); } else { message = sprintf( @@ -73,7 +78,12 @@ if ( __( 'View the origin %1$s.', 'distributor' ), dtGutenberg.postTypeSingular.toLowerCase() ), - url: dtGutenberg.postUrl, + url: false, + className: 'action-link is-link', + onClick: function(e) { + e.preventDefault(); + window.open(dtGutenberg.postUrl, 'blank') + }, } ); }