Last active
September 15, 2023 05:30
-
-
Save wbcomdev/0b57abdc9fa094681d2ffb48f3cc60d8 to your computer and use it in GitHub Desktop.
Allows the user roles to stick the posts
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 | |
| ** | |
| * Wbcom Designs - Add user roles for sticky post | |
| * | |
| * @param array $user_roles user role. | |
| * @return array | |
| */ | |
| function wbcom_add_roles_for_sticky_post( $user_roles ) { | |
| $add_user_roles = array( 'subscriber' ); | |
| $user_roles = array_merge( $add_user_roles, $user_roles ); | |
| return $user_roles; | |
| } | |
| add_filter( 'bpsp_allow_user_roles', 'wbcom_add_roles_for_sticky_post', 10, 1 ); | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment