Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/13/2024 09:54:16 AM (14 months ago)
Author:
imath
Message:

Make sure a random email is previewed when customizing BP Emails

[13689] introduced a side effect with the BP Email customization feature. Instead of showing a random Email it was showing the site’s home page when a BP Directory was set as the site's front page. This change is making sure a random BP Email will be previewed even if a BP Directory is the site's front page.

A deprecated notice with WordPress 6.4 has also been resolved and a warning notice has been reported upstream as, to our point of view, the WP Customizer shouldn't load the widgets component when a Block Theme is used for the site. See WP60236.

Props emaralive

Fixes #9056 (branch 12.0)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/12.0/src/bp-core/bp-core-template.php

    r13690 r13693  
    19371937    $home_url      = home_url( '/' );
    19381938
    1939     if ( is_customize_preview() ) {
     1939    if ( is_customize_preview() && ! bp_is_email_customizer() ) {
    19401940        $requested_url = wp_parse_url( $requested_url, PHP_URL_PATH );
    19411941        $home_url      = wp_parse_url( $home_url, PHP_URL_PATH );
     
    37823782
    37833783/**
     3784 * Outputs the BP Email's template footer.
     3785 *
     3786 * @since 12.1.0
     3787 */
     3788function bp_email_footer() {
     3789    // `the_block_template_skip_link()` was deprecated in WP 6.4.0.
     3790    if ( bp_is_running_wp( '6.4.0', '>=' ) && has_action( 'wp_footer', 'the_block_template_skip_link' ) ) {
     3791        remove_action( 'wp_footer', 'the_block_template_skip_link' );
     3792    }
     3793
     3794    wp_footer();
     3795}
     3796
     3797/**
    37843798 * Checks if a Widget/Block is active.
    37853799 *
Note: See TracChangeset for help on using the changeset viewer.