Skip to content

Commit

Permalink
Site Editor: Add the "Help" link to the tools menu (#37647)
Browse files Browse the repository at this point in the history
* Site Editor: Add the "Help" link to the tools menu

* Add icon and accessibility text

* Add role attribute

Co-authored-by: Nik Tsekouras <[email protected]>
  • Loading branch information
Mamaduka and ntsekouras authored Dec 30, 2021
1 parent 7b8583f commit 05f1024
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions packages/edit-site/src/plugins/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* WordPress dependencies
*/
import { __ } from '@wordpress/i18n';
import { MenuItem, VisuallyHidden } from '@wordpress/components';
import { external } from '@wordpress/icons';
import { registerPlugin } from '@wordpress/plugins';

/**
Expand All @@ -17,6 +20,23 @@ registerPlugin( 'edit-site', {
<ToolsMoreMenuGroup>
<SiteExport />
<WelcomeGuideMenuItem />
<MenuItem
icon={ external }
role="menuitem"
href={ __(
'https://wordpress.org/support/article/site-editor/'
) }
target="_blank"
rel="noopener noreferrer"
>
{ __( 'Help' ) }
<VisuallyHidden as="span">
{
/* translators: accessibility text */
__( '(opens in a new tab)' )
}
</VisuallyHidden>
</MenuItem>
</ToolsMoreMenuGroup>
</>
);
Expand Down

0 comments on commit 05f1024

Please sign in to comment.