Skip to content

Commit

Permalink
Merge branch 'trunk' into add/zoomout-setting
Browse files Browse the repository at this point in the history
  • Loading branch information
carolinan committed Jan 27, 2025
2 parents 2a2ab79 + b984ec9 commit e03aa5a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/reference-guides/slotfills/main-dashboard-button.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ registerPlugin( 'main-dashboard-button-test', {

### Change the icon and link

This example will change the icon in the header to indicate an external link that will take the user to http://wordpress.org when clicked.
This example will change the icon in the header to indicate an external link that will take the user to https://wordpress.org when clicked.

```js
import { registerPlugin } from '@wordpress/plugins';
Expand All @@ -45,7 +45,7 @@ import { external } from '@wordpress/icons';

const MainDashboardButtonIconTest = () => (
<MainDashboardButton>
<FullscreenModeClose icon={ external } href="http://wordpress.org" />
<FullscreenModeClose icon={ external } href="https://wordpress.org" />
</MainDashboardButton>
);

Expand All @@ -54,4 +54,4 @@ registerPlugin( 'main-dashboard-button-icon-test', {
} );
```

![The edit post screen in fullscreen mode displaying an external link icon instead of the default W](https://developer.wordpress.org/files/2024/08/main-dashboard-button-external-link-example.png 'Change the icon in the header to indicate an external link that will take the user to http://wordpress.org when clicked')
![The edit post screen in fullscreen mode displaying an external link icon instead of the default W](https://developer.wordpress.org/files/2024/08/main-dashboard-button-external-link-example.png 'Change the icon in the header to indicate an external link that will take the user to https://wordpress.org when clicked')
7 changes: 7 additions & 0 deletions packages/block-library/src/navigation-submenu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* WordPress dependencies
*/
import { page, addSubmenu } from '@wordpress/icons';
import { _x } from '@wordpress/i18n';

/**
* Internal dependencies
Expand Down Expand Up @@ -37,6 +38,12 @@ export const settings = {
return label;
},
edit,
example: {
attributes: {
label: _x( 'About', 'Example link text for Navigation Submenu' ),
type: 'page',
},
},
save,
transforms,
};
Expand Down

0 comments on commit e03aa5a

Please sign in to comment.