Making WordPress.org

Changeset 1033


Ignore:
Timestamp:
12/11/2014 04:07:57 PM (8 years ago)
Author:
kovshenin
Message:

WordCamp.org: Explicitly set the admin cookie path in the global login plugin for subdirectories support.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/wcorg-global-login.php

    r756 r1033  
    1111        add_action( 'login_url', array( $this, 'login_url' ), 99, 2 );
    1212        add_filter( 'allowed_redirect_hosts', array( $this, 'allowed_redirect_hosts' ) );
     13        add_action( 'muplugins_loaded', array( $this, 'muplugins_loaded' ) );
     14    }
     15
     16    /**
     17     * A subdomain install will set the default auth cookie path to /wp-admin but we're
     18     * running a semi-subdomain install because we have subdirectories too. Explicitly
     19     * define the admin cookie path, otherwise it will get set to /wp-admin from the
     20     * wordcamp.org login point.
     21     */
     22    public function muplugins_loaded() {
     23        define( 'ADMIN_COOKIE_PATH', '/' );
    1324    }
    1425
Note: See TracChangeset for help on using the changeset viewer.