Last active
September 1, 2022 20:50
-
-
Save glueckpress/7b33f988b749ecba9078 to your computer and use it in GitHub Desktop.
[WordPress] Custom site titles for the My Sites network admin bar menu in a multisite network. Configure first function, then auto-activate by saving this file in wp-content/mu-plugins, or network activate as a regular plugin.
Hint if you use MultilingualPress
I see in the first method the defining of language specific sites in the network. If you will pursue this with the MultilingualPress plugin, then is it a better alternative to filter the name of each site with the custom site name of each site.
@bueltge Thanks, very helpful!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please take note: Replacing a rather large core function only to implement a missing filter should not be understood as good practice. The code above turned out as the result of support topic and should be seen rather as a temporary hack than as anything long-term. Even though the menu tweak is implemented as a plugin, one will have to monitor the
admin_bar_menu
core filter and it’s arguments in the future when using this plugin on a productive site.