- Cusmin ® The Ultimate WordPress Branding Manager
Cusmin can help you to set the default order of the WordPress Dashboard widgets. This works well for the new users, but you can also apply it to the existing WordPress users.
This works in a way that you choose a WordPress user that has correctly ordered Dashboard users, and with Cusmin you apply the same ordering to all other WordPress users.
We will call that user, Reference user. This user can be any WordPress user on the site.
We will presume that you already have all Dashboard widgets created and set on the Dashboard page. The only thing that is left is to set their order.
First, you log in a Reference user and go to the Dashboard page. You will need now to set the order of the WordPress dashboard widgets by drag-and-drop. WordPress will automatically save this setting for you.
Next, go to Cusmin settings page Dashboard tab > Dashboard Widgets Ordering section.
By default, the reference user is not set (in our example above, it's already set to admin username). Click on "Select User" button. This will show up the following options:
In the Username field, you need to type the username of the user that will be used as a reference. You will need to fill in the correct username, or you will get an error message saying that the user does not exist.
"Apply ordering to existing users" option will apply the ordering to the existing users as well, overriding their own custom ordering.
Click "Confirm" to apply the ordering. If everything goes well you will get a message notification like this:
Cusmin sets the default WordPress dashboard widgets ordering that will be applied to all new users, so when new user registers or when you add a new WordPress user manually, he will have that order set by default. However, the user still has a freedom to change that order by himself, setting the order by his wish, only for himself. His personal ordering will override the default Cusmin ordering.
Yes. If you check the option "Apply this ordering to the existing users as well" before "Confirm" button, when setting the reference user, you can enforce all existing users to have new widgets ordering. This will clear all their custom widgets ordering and make them use Cusmin's instead. However, after that, every user has a freedom to change the order and make his own ordering again. This option is safe to use multiple times, so you can choose to reset that again later.
WordPress dashboard widgets can be created by core WordPress, plugins or themes.
By default, WordPress adds dashboard widgets in the order in which they're registered in WordPress. WordPress widget authors usually add WordPress dashboard widgets with functions wp_add_dashboard_widget or add_meta_box. These functions have parameters priority and location, that help WordPress to decide where exactly to add those widgets, respecting the order what the developer has provided. When testing, we can set the priority lower or higher to be able to add our widget before or after other widgets. That's sometimes almost impossible to do, when we have many third-party plugins that have their own ordering priorities and locations where they're putting their widgets on the Dashboard page. Don't forget that after enabling/disabling some plugins that have their own Dashboard widgets, this can change. At the end of the day, WordPress runs all the code and creates the order in a way how all code is executed, usually, as a plugin/theme developer, you will not have much control over that.
That's the way how WordPress creates the default order for all users. However, every user has the ability to change that order in a way he likes, by dragging and dropping WordPress dashboard widgets on the Dashboard page.
When a user does drag-and-drop, WordPress will save that information and persist it in the database to the usermeta table as meta-box-order_dashboard meta key. This option contains also user_id field, meaning that every user can make his own order of the WordPress dashboard widgets, that will be persisted in the database. After that, every time user opens the Dashboard page, he will see the dashboard widgets in his own order, instead of having the default WordPress order.
Cusmin takes advance of this WordPress option, thus giving you the opportunity to change the default WordPress order, and use any of your WordPress users that have a custom order set, as a default order for other WordPress users.