Skip to content
This repository was archived by the owner on Aug 26, 2023. It is now read-only.

objectfoo/hoa_redirect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

HOA Redirect

Wordpress plugin to redirect requests.

Redirect Conditions

  1. Request for front page of child blog from not logged in client
    • redirect to '/welcome/'
  2. Login for users with role < Editor
    • redirect to '/'
  3. Login for users with role >= Editor
    • do nothing (Wordpress automatically redirects to dashboard)

Redirecting Front Page Requests

Hook: action 'wp'

If the install is multisite AND request is not for the root/mail blog AND the request is the front page AND user is not logged in. Redirect to '/welcome/' and then exit.

Redirect after login

Hook: filter 'login_redirect' priority: 100 args: 3

If hook is not called with a logged in user (valid WP_User object) do nothing.

If request redirect variable is not empty and does not contain wp-admin/ then return it

if user is a homeowner or board member {!has_cap( 'publish_posts' )} find their primary blog and redirect them to it's home page

Issues

  1. Requests to home page from users that have previously selected 'Remember Me' (have login cookie) are being redirected to the /welcome/ page instead of being left alone to go to the front page. ><

About

Wordpress plugin to redirect requests

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages