Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/13/2021 02:33:37 PM (2 years ago)
Author:
imath
Message:

WP FSE Compat: make sure BuddyPress templates are loaded on front-end

Adapt the BuddyPress Theme Compat API so that it uses the WordPress block template canvas when the active theme supports block templates. You can now test BuddyPress inside Twenty Twenty-Two: the next WordPress default theme!

Improves the BP Nouveau Template Pack introducing a new function bp_nouveau_get_theme_layout_widths() to get the theme layout available widths and use the wider one by default.

See #8474

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-nouveau/includes/customizer.php

    r12537 r13145  
    44 *
    55 * @since 3.0.0
    6  * @version 3.1.0
     6 * @version 10.0.0
    77 */
    88
     
    2222    $wp_customize->register_control_type( 'BP_Nouveau_Nav_Customize_Control' );
    2323    $bp_nouveau_options = bp_nouveau_get_appearance_settings();
     24    $layout_widths      = bp_nouveau_get_theme_layout_widths();
    2425
    2526    $wp_customize->add_panel( 'bp_nouveau_panel', array(
     
    203204    ) );
    204205
    205     if ( current_theme_supports( 'align-wide' ) ) {
     206    if ( $layout_widths ) {
    206207        $settings['bp_nouveau_appearance[global_alignment]'] = array(
    207208            'index'             => 'global_alignment',
     
    307308    $controls = apply_filters( 'bp_nouveau_customizer_controls', $controls );
    308309
    309     if ( current_theme_supports( 'align-wide' ) ) {
     310    if ( $layout_widths ) {
    310311        $controls['global_alignment'] = array(
    311312            'label'      => __( 'Select the BuddyPress container width for your site.', 'buddypress' ),
     
    313314            'settings'   => 'bp_nouveau_appearance[global_alignment]',
    314315            'type'       => 'select',
    315             'choices'    => array(
    316                 'alignnone' => __( 'Default width', 'buddypress' ),
    317                 'alignwide' => __( 'Wide width', 'buddypress' ),
    318                 'alignfull' => __( 'Full width', 'buddypress' ),
    319             ),
     316            'choices'    => $layout_widths,
    320317        );
    321318    }
Note: See TracChangeset for help on using the changeset viewer.