Skip to content

Commit b114939

Browse files
authored
Merge pull request #104 from moonbyt3/patch-1
Updated code for Menu
2 parents 2e1db0d + 6896331 commit b114939

File tree

1 file changed

+11
-12
lines changed
  • website/docs/legacy/v4/guides

1 file changed

+11
-12
lines changed

website/docs/legacy/v4/guides/menu.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,16 @@ To add the custom menu, you must provide an array for custom menu locations as e
1313

1414
```js
1515
/**
16-
* Return all menu poistions
17-
*
18-
* @return array Of menu positions with name and slug.
19-
*
20-
* @since 1.0.0
21-
*/
22-
public function get_menu_positions() : array {
23-
return [
24-
'header_main_default' => esc_html__( 'Header Main', 'eightshift-boilerplate' ),
25-
];
26-
}
16+
* Return all menu positions
17+
*
18+
* @return array<string> Menu positions with slug => name structure.
19+
*/
20+
public function getMenuPositions(): array
21+
{
22+
return [
23+
'header_main_nav' => \esc_html__('Main Menu', 'eightshift-boilerplate'),
24+
];
25+
}
2726
```
2827

2928
## BEM Menu helper
@@ -35,7 +34,7 @@ To use it just call this helper in your template.
3534
```js
3635
use Eightshift_Libs\Menu\Menu;
3736

38-
Menu::bem_menu( 'header_main_default', 'main-navigation' );
37+
Menu::bemMenu( 'header_main_nav', 'main-navigation' );
3938
```
4039

4140
You can also provide multiple parameters to the helper. All the details are [found here](https://github.com/infinum/eightshift-libs/blob/404aeab50beef38f788c864d7c0312858b097e81/src/menu/class-menu.php#L69).

0 commit comments

Comments
 (0)