Skip to content

Commit 80f65b6

Browse files
committed
Added a missing <?php tag in a code example opener
1 parent cca7006 commit 80f65b6

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ require_once get_template_directory() . '/class-wp-bootstrap-navwalker.php';
2929
If you encounter errors with the above code use a check like this to return clean errors to help diagnose the problem.
3030

3131
```php
32+
<?php
3233
if ( ! file_exists( get_template_directory() . '/class-wp-bootstrap-navwalker.php' ) ) {
3334
// file does not exist... return an error.
3435
return new WP_Error( 'class-wp-bootstrap-navwalker-missing', __( 'It appears the class-wp-bootstrap-navwalker.php file may be missing.', 'wp-bootstrap-navwalker' ) );
@@ -40,9 +41,9 @@ if ( ! file_exists( get_template_directory() . '/class-wp-bootstrap-navwalker.ph
4041
You will also need to declare a new menu in your `functions.php` file if one doesn't already exist.
4142

4243
```php
43-
register_nav_menus( array(
44-
'primary' => __( 'Primary Menu', 'THEMENAME' ),
45-
) );
44+
register_nav_menus( array(
45+
'primary' => __( 'Primary Menu', 'THEMENAME' ),
46+
) );
4647
```
4748
## Usage
4849

@@ -125,6 +126,10 @@ You can decide yourself if you want to put up with those drawbacks for the benef
125126

126127
Be sure to set the `echo` argument to FALSE in `the wp_nav_menu()` call when doing this so that the results can be stored instead of echoed to the page.
127128

129+
See also:
130+
- https://generatewp.com/how-to-use-transients-to-speed-up-wordpress-menus/
131+
- https://vip-svn.wordpress.com/plugins/cache-nav-menu/cache-nav-menu.php
132+
128133
### Extras
129134

130135
This script included the ability to use Bootstrap nav link mods in your menus through the WordPress menu UI. Disabled links, dropdown headers and dropdown dividers are supported. Additionally icon support is built-in for Glyphicons and Font Awesome (note: you will need to include the icon stylesheets or assets separately).

class-wp-bootstrap-navwalker.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ public static function fallback( $args ) {
384384
* Find any custom linkmod or icon classes and store in their holder
385385
* arrays then remove them from the main classes array.
386386
*
387-
* Supported linkmods: .disabled, .dropdown-header, .dropdown-divider
387+
* Supported linkmods: .disabled, .dropdown-header, .dropdown-divider, .sr-only
388388
* Supported iconsets: Font Awesome 4/5, Glypicons
389389
*
390390
* NOTE: This accepts the linkmod and icon arrays by reference.

0 commit comments

Comments
 (0)