Making WordPress.org

Changeset 6772


Ignore:
Timestamp:
02/26/2018 08:40:51 PM (8 years ago)
Author:
coreymckrill
Message:

WordCamp SSL: Use the redirect list from sunrise for the backcompat domains

With the wcorg_get_domain_redirects function, we no longer need to add the
domain in multiple places when we set up a redirect.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/lets-encrypt-helper.php

    r6710 r6772  
    7171
    7272                // Back-compat domains.
    73                 // @todo Most (but not all) of these are redirects that also exist in sunrise.php. Setup a common function for both of them to pull from, so that things are DRY.
    74                 $domains[] = '2006.wordcamp.org';
    75                 $domains[] = '2007.wordcamp.org';
    76                 $domains[] = 'bg.wordcamp.org';
    77                 $domains[] = 'india.wordcamp.org';
    78                 $domains[] = 'fr.2011.montreal.wordcamp.org';
    79                 $domains[] = 'fr.2012.montreal.wordcamp.org';
    80                 $domains[] = 'fr.2013.montreal.wordcamp.org';
    81                 $domains[] = '2014.fr.montreal.wordcamp.org';
    82                 $domains[] = 'fr.2013.ottawa.wordcamp.org';
    83                 $domains[] = 'es.2014.mallorca.wordcamp.org';
    84                 $domains[] = 'de.2014.mallorca.wordcamp.org';
    85                 $domains[] = 'ca.2014.mallorca.wordcamp.org';
    86                 $domains[] = '2012.torontodev.wordcamp.org';
    87                 $domains[] = 'utah.wordcamp.org';
    88                 $domains[] = 'wordcampsf.org';
    89                 $domains[] = 'wordcampsf.com';
    90                 $domains[] = '2017.zilina.wordcamp.org';
    91                 $domains[] = '2017.niagara.wordcamp.org';
    92                 $domains[] = '2017.cusco.wordcamp.org';
    93                 $domains[] = '2017.saintpetersburg.wordcamp.org';
    94                 $domains[] = '2018.wurzburg.wordcamp.org';
     73                if ( is_callable( 'wcorg_get_domain_redirects' ) ) {
     74                        $domains = array_merge( $domains, array_keys( wcorg_get_domain_redirects() ) );
     75                }
    9576
    9677                $domains = array_unique( $domains );
Note: See TracChangeset for help on using the changeset viewer.