Skip to:
Content

BuddyPress.org

Changeset 12668


Ignore:
Timestamp:
06/16/2020 05:02:44 AM (4 years ago)
Author:
imath
Message:

Administration: make all remaining admin notices dismissible

props immeet94

Fixes #8315

Location:
trunk/src
Files:
8 edited

Legend:

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

    r12538 r12668  
    152152    foreach ( $notice_types as $type ) {
    153153        $notices = wp_list_filter( buddypress()->admin->notices, array( 'type' => $type ) );
    154         printf( '<div id="message" class="fade %s">', sanitize_html_class( $type ) );
     154        printf( '<div id="message" class="fade %s notice is-dismissible">', sanitize_html_class( $type ) );
    155155
    156156        foreach ( $notices as $notice ) {
  • trunk/src/bp-core/admin/bp-core-admin-tools.php

    r12622 r12668  
    423423    }
    424424
    425     $message = '<div id="message" class="' . esc_attr( $class ) . '">' . $message . '</div>';
     425    $message = '<div id="message" class="' . esc_attr( $class ) . ' notice is-dismissible">' . $message . '</div>';
    426426    $message = str_replace( "'", "\'", $message );
    427427    $lambda  = function() use ( $message ) { echo $message; };
  • trunk/src/bp-loader.php

    r12656 r12668  
    5959    ?>
    6060
    61     <div id="message" class="error notice">
     61    <div id="message" class="error notice is-dismissible">
    6262        <p><strong><?php esc_html_e( 'Your site does not support BuddyPress.', 'buddypress' ); ?></strong></p>
    6363        <?php /* translators: 1: current PHP version, 2: required PHP version */ ?>
  • trunk/src/bp-members/classes/class-bp-members-admin.php

    r12591 r12668  
    984984        if ( ! empty( $notice ) ) : ?>
    985985
    986             <div <?php if ( 'updated' === $notice['class'] ) : ?>id="message" <?php endif; ?>class="<?php echo esc_attr( $notice['class'] ); ?>">
     986            <div <?php if ( 'updated' === $notice['class'] ) : ?>id="message" <?php endif; ?>class="<?php echo esc_attr( $notice['class'] ); ?>  notice is-dismissible">
    987987
    988988                <p><?php echo esc_html( $notice['message'] ); ?></p>
     
    19871987            if ( 'updated' === $notice['class'] ) : ?>
    19881988
    1989                 <div id="message" class="<?php echo esc_attr( $notice['class'] ); ?>">
     1989                <div id="message" class="<?php echo esc_attr( $notice['class'] ); ?> notice is-dismissible">
    19901990
    19911991            <?php else: ?>
    19921992
    1993                 <div class="<?php echo esc_attr( $notice['class'] ); ?>">
     1993                <div class="<?php echo esc_attr( $notice['class'] ); ?> notice is-dismissible">
    19941994
    19951995            <?php endif; ?>
  • trunk/src/bp-messages/classes/class-bp-messages-notices-admin.php

    r11910 r12668  
    219219            <?php if ( isset( $_GET['success'] ) || isset( $_GET['error'] ) ) : ?>
    220220
    221                 <div id="message" class="<?php echo isset( $_GET['success'] ) ? 'updated' : 'error'; ?>">
     221                <div id="message" class="<?php echo isset( $_GET['success'] ) ? 'updated' : 'error'; ?> notice is-dismissible">
    222222
    223223                    <p>
  • trunk/src/bp-xprofile/bp-xprofile-admin.php

    r12660 r12668  
    171171                $type = ( $type == 'error' ) ? 'error' : 'updated'; ?>
    172172
    173                 <div id="message" class="<?php echo $type; ?> fade">
     173                <div id="message" class="<?php echo $type; ?> fade notice is-dismissible">
    174174                    <p><?php echo esc_html( $message ); ?></p>
    175175                </div>
     
    314314                <?php endforeach; else : ?>
    315315
    316                     <div id="message" class="error"><p><?php _ex( 'You have no groups.', 'You have no profile fields groups.', 'buddypress' ); ?></p></div>
     316                    <div id="message" class="error notice is-dismissible"><p><?php _ex( 'You have no groups.', 'You have no profile fields groups.', 'buddypress' ); ?></p></div>
    317317                    <p><a href="<?php echo esc_url( $add_group_url ); ?>"><?php _ex( 'Add New Group', 'Add New Profile Fields Group', 'buddypress' ); ?></a></p>
    318318
  • trunk/src/bp-xprofile/classes/class-bp-xprofile-field.php

    r12596 r12668  
    12311231            <?php if ( !empty( $message ) ) : ?>
    12321232
    1233                 <div id="message" class="error fade">
     1233                <div id="message" class="error fade notice is-dismissible">
    12341234                    <p><?php echo esc_html( $message ); ?></p>
    12351235                </div>
  • trunk/src/bp-xprofile/classes/class-bp-xprofile-group.php

    r12660 r12668  
    849849            <?php if ( ! empty( $message ) ) : ?>
    850850
    851                 <div id="message" class="error fade">
     851                <div id="message" class="error fade notice is-dismissible">
    852852                    <p><?php echo esc_html( $message ); ?></p>
    853853                </div>
Note: See TracChangeset for help on using the changeset viewer.