Making WordPress.org

Changeset 5215


Ignore:
Timestamp:
03/30/2017 09:22:57 PM (10 years ago)
Author:
coreymckrill
Message:

Remove restrictions on loading the budget tool

The restrictions were possibly added during testing and never removed. They
were preventing the budget tool from loading on any site without a 4-digit
year as the leading subdomain, or any site with europe as a subdomain. Now
that we have several sites with leading subdomains like "2017-journalist", this
doesn't serve us.

If there are sites we don't want to load the budget tool on, we should use
wcorg_disable_network_activated_plugins_on_sites() instead.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/bootstrap.php

    r4160 r5215  
    1919        require_once( __DIR__ . '/includes/reimbursement-request.php' );
    2020        require_once( __DIR__ . '/includes/encryption.php' );
    21 
    22         $load_budget_tool = true;
    23 
    24         // Don't load the budget tool on these sites.
    25         if ( preg_match( '#\.europe\.wordcamp\.org$#', strtolower( $_SERVER['HTTP_HOST'] ) ) ) {
    26                 $load_budget_tool = false;
    27         }
    28 
    29         // Don't load the budget tool on non YYYY. sites.
    30         if ( ! preg_match( '#^[0-9]{4}\.#', $_SERVER['HTTP_HOST'] ) ) {
    31                 $load_budget_tool = false;
    32         }
    33 
    34         // Force budget tool on testing.wordcamp.org
    35         if ( 'testing.wordcamp.org' == $_SERVER['HTTP_HOST'] ) {
    36                 $load_budget_tool = true;
    37         }
    38 
    39         if ( $load_budget_tool ) {
    40                 require_once( __DIR__ . '/includes/budget-tool.php' );
    41         }
     21        require_once( __DIR__ . '/includes/budget-tool.php' );
    4222
    4323        $GLOBALS['wordcamp_budgets']    = new WordCamp_Budgets();
Note: See TracChangeset for help on using the changeset viewer.