Making WordPress.org


Ignore:
Timestamp:
07/02/2019 05:00:04 AM (6 years ago)
Author:
dd32
Message:

Plugin Directory: Admin User Cards: Only fetch user notes when the Support Forums blog id is defined.
This avoids a PHP Notice on Meta Environments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-author-card.php

    r8545 r9015  
    166166                    echo '<p>' . sprintf( __( 'This user is: %s', 'wporg-plugins' ), implode( ', ', $labels ) ) . '</p>';
    167167                }
    168             }
    169 
    170             $user_notes = get_user_meta( $user->ID, '_wporg_bbp_user_notes', true );
    171 
    172             if ( $user_notes ) {
     168
     169                $user_notes = get_user_meta( $user->ID, '_wporg_bbp_user_notes', true );
     170            }
     171
     172            if ( ! empty( $user_notes ) ) {
    173173                _e( 'User notes:', 'wporg-plugins' );
    174174                echo '<ul>';
Note: See TracChangeset for help on using the changeset viewer.