Skip to content

Instantly share code, notes, and snippets.

@nayemDevs
Last active April 12, 2021 23:42
Show Gist options
  • Save nayemDevs/2f06137afe28fd7be366901cbab9a645 to your computer and use it in GitHub Desktop.
Save nayemDevs/2f06137afe28fd7be366901cbab9a645 to your computer and use it in GitHub Desktop.
Move Dokan vendor dashboard Settings menu to before the settings (First page)
<?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