Making WordPress.org

Changeset 6673


Ignore:
Timestamp:
02/17/2018 11:46:56 AM (6 years ago)
Author:
ocean90
Message:

Locale Detection: Move locale handling into its own method.

See #1673.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/locale-detection/class-detector.php

    r6644 r6673  
    4444        $this->active_locales = $this->get_active_locales();
    4545
     46        $this->set_locale();
     47    }
     48
     49    /**
     50     * Sets the locale property based on the following parameters:
     51     *  1. $_GET['locale']
     52     *  2. $_COOKIE['wporg_locale']
     53     *  3. $_SERVER['HTTP_ACCEPT_LANGUAGE']
     54     */
     55    private function set_locale() {
    4656        if ( ! empty( $_GET['locale'] ) ) {
    4757            $get_locale = $this->sanitize_locale( $_GET['locale'] );
Note: See TracChangeset for help on using the changeset viewer.