Web Hosting
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix Reply To: User logons

Discussion in 'Misc WordPress Requests' started by David Sword, Nov 7, 2017.

  1. David Sword

    Guest

    Reply To: User logons, by David Sword

    I had written something similar a while back after being unable to find a plugin to do it. The HR department was to only be allowed to edit a single page, the JOBS page.

    https://gist.github.com/davidsword/57830718216224eae30d9b1ad97969cf

    $restricted_user would be the Kitchen staff’s user ID
    $permitted would be the ID of the page their allowed to edit.

    It’s not perfect, but it does the job. It it was proper there’d be arguments on post_save hook that make sure the $restricted_user isn’t doing anything fishy or pushing any POST values outside of $permitted.

    Reply To: User logons
     
    #1

Share This Page

Web Hosting