Advertisement
hendrajeg

frontend submit role

Sep 25th, 2022
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.38 KB | None | 0 0
  1. function is_user_allow_access_frontend_submit() {
  2.     $value = false;
  3.     if ( in_array( 'editor', wp_get_current_user()->roles ) || in_array( 'author', wp_get_current_user()->roles ) || in_array( 'administrator', wp_get_current_user()->roles ) ) {
  4.         $value = true;
  5.     }
  6.  
  7.     return $value;
  8. }
  9. add_filter( 'jnews_frontend_submit_user_subscription', 'is_user_allow_access_frontend_submit' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement