Making WordPress.org

Changeset 12799


Ignore:
Timestamp:
08/02/2023 09:17:27 PM (3 years ago)
Author:
coffee2code
Message:

Plugin Directory, Author Card: Prevent shortcut paths from being treated as user paths.

File:
1 edited

Legend:

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

    r11373 r12799  
    7676                }
    7777
     78                // Don't show author cards for these users.
     79                // These are Profiles shortcuts and never the users that actually happen to have these names.
     80                $ignored_users = [ 'me', 'profile' ];
     81                if ( in_array( $author->user_nicename, $ignored_users ) ) {
     82                        return;
     83                }
     84
    7885                $author_support_rep = get_posts( [
    7986                        'post_type'      => 'plugin',
Note: See TracChangeset for help on using the changeset viewer.