Last active
April 12, 2021 23:42
-
-
Save nayemDevs/2f06137afe28fd7be366901cbab9a645 to your computer and use it in GitHub Desktop.
Move Dokan vendor dashboard Settings menu to before the settings (First page)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//removeing the menu from settings variable | |
add_filter( 'dokan_get_dashboard_settings_nav', function($settings_sub) { | |
unset ( $settings_sub['store']); | |
return $settings_sub; | |
} , 500); | |
//adding the menu to the $url variable | |
add_filter('dokan_get_dashboard_nav',function($url) { | |
$url ['store'] = array( | |
'title' => __( 'Store', 'dokan-lite'), | |
'icon' => '<i class="fa fa-university"></i>', | |
'url' => dokan_get_navigation_url( 'settings/store' ), | |
'pos' => 30, | |
'permission' => 'dokan_view_store_settings_menu' | |
); | |
return $url; | |
},12); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment