Merge pull request #329 from octfx/dev

refactor: Don't create sections if they are disabled
This commit is contained in:
alistair3149 2021-03-26 08:36:00 -04:00 committed by GitHub
commit bc1c1c9001
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -72,7 +72,9 @@ final class BodyContent extends Partial {
}
// Check if it is not the main page
if ( !$title->isMainPage() && $title->isContentPage() ) {
if ( $this->getConfigValue( 'CitizenEnableCollapsibleSections' ) === true &&
!$title->isMainPage() &&
$title->isContentPage() ) {
$doc = $this->parseXhtml( $htmlBodyContent );
// Make top level sections