Created
April 10, 2022 11:30
-
-
Save kimcoleman/a16ee438a292c927f0b2bcf7a9fc8763 to your computer and use it in GitHub Desktop.
Filter to show WordPress Toolbar for Editor Role using the Hide Admin Bar From Non-Admins plugin.
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 | |
/** | |
* Filter to show WordPress Toolbar for Editor Role using the | |
* Hide Admin Bar From Non-Admins plugin. | |
* https://wordpress.org/plugins/hide-admin-bar-from-non-admins/ | |
* | |
*/ | |
function my_habfna_show_admin_bar_roles( $habfna_show_admin_bar_roles ) { | |
$habfna_show_admin_bar_roles[] = 'editor'; | |
return $habfna_show_admin_bar_roles; | |
} | |
add_filter( 'habfna_show_admin_bar_roles', 'my_habfna_show_admin_bar_roles' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment