Making WordPress.org

Changeset 12348


Ignore:
Timestamp:
12/20/2022 02:37:30 AM (16 months ago)
Author:
dd32
Message:

Support Forums: Blocks: Don't fallback to having the Block Editor enabled, if forums are not enabled by default.

This is reliant upon [12347], which allows this code to know which forum is being viewed for the views (plugins/themes/reviews).

See #6608.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-blocks.php

    r12345 r12348  
    264264        // Determine if the forum has the editor enabled.
    265265        $forum             = bbp_get_forum( bbp_get_forum_id() );
    266         $enabled_for_forum = $forum ? ( 'enabled' === $forum->block_editor || ( ! $forum->block_editor && $this->forum_enabled_by_default ) ) : true;
     266        $enabled_for_forum = $forum ? ( 'enabled' === $forum->block_editor || ( ! $forum->block_editor && $this->forum_enabled_by_default ) ) : $this->forum_enabled_by_default;
    267267        $enabled_for_user  = ( 'enabled' === $user_option );
    268268        $use_it            = ( $enabled_for_user && $enabled_for_forum );
Note: See TracChangeset for help on using the changeset viewer.