Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/* translators: %s: post type singular name */
__( 'Great Work! You\'ve just published your first %s. You can review it here to check for any mistakes, or start on a new %s.' ), postLabel, postLabel
)
}
<p></p>
<div>
{ this.state.showCopyConfirmation ? __( 'Copied!' ) : __( 'Copy Link' ) }
</div>
{ ! isScheduled && (
<div>
</div>
<div>
<a href="{">{ post.title || __( '(no title)' ) }</a> { postPublishNonLinkHeader }
<p>
<strong>{ __( 'What’s next?' ) }</strong>
</p>
<div>
{ ! isScheduled && (
<button href="{">
{ viewPostLabel }
</button>
) }
{ this.state.showCopyConfirmation ? __( 'Copied!' ) : __( 'Copy Link' ) }
</div>
{ children }
</div>
isOpened,
onTogglePanel,
isEditable,
postLink,
permalinkParts,
editPermalink,
forceEmptyField,
setState,
postTitle,
postSlug,
postID,
postTypeLabel,
} ) {
const { prefix, suffix } = permalinkParts;
let prefixElement, postNameElement, suffixElement;
const currentSlug = safeDecodeURIComponent( postSlug ) || cleanForSlug( postTitle ) || postID;
if ( isEditable ) {
prefixElement = prefix && (
<span>{ prefix }</span>
);
postNameElement = currentSlug && (
<span>{ currentSlug }</span>
);
suffixElement = suffix && (
<span>{ suffix }</span>
);
}
return (
permalinkParts,
postLink,
postSlug,
postID,
postTitle,
} = this.props;
if ( isNew || ! isViewable || ! permalinkParts || ! postLink ) {
return null;
}
const { isCopied, isEditingPermalink } = this.state;
const ariaLabel = isCopied ? __( 'Permalink copied' ) : __( 'Copy the permalink' );
const { prefix, suffix } = permalinkParts;
const slug = safeDecodeURIComponent( postSlug ) || cleanForSlug( postTitle ) || postID;
const samplePermalink = ( isEditable ) ? prefix + slug + suffix : prefix;
return (
<div>
this.setState( { isCopied: true } ) }
aria-disabled={ isCopied }
icon="admin-links"
/>
<span>{ __( 'Permalink:' ) }</span>
{ ! isEditingPermalink &&</div>