Skip to content

Commit

Permalink
Merge branch 'default' into pr-num-on-release-sage-test
Browse files Browse the repository at this point in the history
  • Loading branch information
jazzsequence committed Apr 30, 2024
2 parents 7f7abcc + d6d7ffd commit 25b87dc
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
### 2024-04-30
* Adds a new `PANTHEON_HOSTNAME` constant to `application.pantheon.php` to be used for configuring multisites. For more information, see our [mulstisite configuration documentation](https://docs.pantheon.io/guides/multisite/config). ([#119](https://github.com/pantheon-systems/wordpress-composer-managed/pull/119))
* Implements `pantheon.multisite.config_contents` filter to correct the multisite configuration instructions (to use `Config::define` instead of `define`).
* Adds a new `filters.php` mu-plugin for the `pantheon.multisite.config_contents` filter and any future filters we might add.
* Adds `lint:phpcbf` script to the `composer.json`.

### 2024-04-15
Expand Down
6 changes: 0 additions & 6 deletions config/application.pantheon.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,3 @@
define( 'PANTHEON_HOSTNAME', $hostname );
}
}

// Update the multisite configuration to use Config::define() instead of define.
add_filter( 'pantheon.multisite.config_contents', function ( $config_contents ) {
$config_contents = str_replace( 'define(', 'Config::define(', $config_contents );
return $config_contents;
} );
21 changes: 21 additions & 0 deletions web/app/mu-plugins/filters.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php
/**
* Plugin Name: Pantheon WordPress Filters
* Plugin URI: https://github.com/pantheon-systems/wordpress-composer-managed
* Description: Filters for Composer-managed WordPress sites on Pantheon.
* Version: 1.0.0
* Author: Pantheon Systems
* Author URI: https://pantheon.io/
* License: MIT License
*/


/**
* Update the multisite configuration to use Config::define() instead of define.
*
* @return string
*/
add_filter( 'pantheon.multisite.config_contents', function ( $config_contents ) {
$config_contents = str_replace( 'define(', 'Config::define(', $config_contents );
return $config_contents;
} );

0 comments on commit 25b87dc

Please sign in to comment.