Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/20/2023 12:11:43 PM (6 months ago)
Author:
imath
Message:

Improve BP Block Widgets front-end styles

Make sure the needed front-end CSS rules are included. These were lost during the Legacy Widgets removal (see #8869).

See #9037
Closes https://github.com/buddypress/buddypress/pull/204

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-blocks.php

    r13535 r13676  
    272272        if ( bp_get_signup_allowed() ) {
    273273            $content .= sprintf(
    274                 '<p class="bp-login-widget-register-link"><a href="%1$s">%2$s</a></p>',
     274                '<p class="bp-login-widget-register-link"><a href="%1$s" class="wp-block-button__link wp-element-button">%2$s</a></p>',
    275275                esc_url( bp_get_signup_page() ),
    276276                esc_html__( 'Register', 'buddypress' )
     
    416416        add_filter( 'login_form_bottom', 'bp_blocks_get_login_widget_registration_link', 10, 2 );
    417417
    418         $widget_content .= wp_login_form(
    419             array(
    420                 'echo'             => false,
    421                 'form_id'          => 'bp-login-widget-form',
    422                 'id_username'      => 'bp-login-widget-user-login',
    423                 'label_username'   => __( 'Username', 'buddypress' ),
    424                 'id_password'      => 'bp-login-widget-user-pass',
    425                 'label_password'   => __( 'Password', 'buddypress' ),
    426                 'id_remember'      => 'bp-login-widget-rememberme',
    427                 'id_submit'        => 'bp-login-widget-submit',
    428                 'include_pwd_link' => $pwd_link,
     418        $widget_content .= str_replace(
     419            'button button-primary',
     420            'wp-block-button__link wp-element-button',
     421            wp_login_form(
     422                array(
     423                    'echo'             => false,
     424                    'form_id'          => 'bp-login-widget-form',
     425                    'id_username'      => 'bp-login-widget-user-login',
     426                    'label_username'   => __( 'Username', 'buddypress' ),
     427                    'id_password'      => 'bp-login-widget-user-pass',
     428                    'label_password'   => __( 'Password', 'buddypress' ),
     429                    'id_remember'      => 'bp-login-widget-rememberme',
     430                    'id_submit'        => 'bp-login-widget-submit',
     431                    'include_pwd_link' => $pwd_link,
     432                )
    429433            )
    430434        );
Note: See TracChangeset for help on using the changeset viewer.