Skip to content

Commit

Permalink
Add require_once for sites.php
Browse files Browse the repository at this point in the history
In the new setup, we don't use config.php, which means
jquery_default_site_options() is not defined unless this file is
ensured first.
  • Loading branch information
Krinkle committed Sep 1, 2023
1 parent 821b0f2 commit bdbbe82
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

require dirname( __FILE__ ) . '/sites.php';
require_once dirname( __FILE__ ) . '/sites.php';

if ( ! defined( 'WP_CONTENT_DIR' ) )
define( 'WP_CONTENT_DIR', ABSPATH . 'jquery-wp-content' );
Expand Down
5 changes: 4 additions & 1 deletion install.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@
exit;
}

if ( ! isset( $_POST['weblog_title'] ) )
if ( ! isset( $_POST['weblog_title'] ) ) {
$_POST['weblog_title'] = 'jQuery';
}

require_once dirname( __FILE__ ) . '/sites.php';

function wp_install( $blog_title, $user_name, $user_email, $public, $deprecated = '', $user_password = '' ) {
global $wpdb;
Expand Down
5 changes: 4 additions & 1 deletion mu-plugins/jquery-filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
* Description: Default filters for all jQuery sites.
*/

if ( defined( 'WP_INSTALLING' ) )
if ( defined( 'WP_INSTALLING' ) ) {
return;
}

require_once dirname( __FILE__ ) . '/../sites.php';

$options = jquery_default_site_options();
$sites = jquery_sites();
Expand Down
3 changes: 3 additions & 0 deletions sunrise.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<?php

require_once dirname( __FILE__ ) . '/sites.php';

// This is a single network configuration and the network is defined in config.php
if ( defined( 'DOMAIN_CURRENT_SITE' ) && defined( 'PATH_CURRENT_SITE' ) ) {
$current_site = new stdClass;
Expand Down

0 comments on commit bdbbe82

Please sign in to comment.