Making WordPress.org

Changeset 12697


Ignore:
Timestamp:
07/03/2023 07:03:40 PM (2 years ago)
Author:
coffee2code
Message:

Photo Directory, Admin: Add count of flagged photos to Photo Contributor metabox.

See #7119.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/photo-directory/inc/admin.php

    r12696 r12697  
    824824                    ?></li>
    825825                    <li><?php
     826                        $flagged_count = User::count_flagged_photos( $author->ID );
     827                        $flagged_link = '';
     828                        if ( $flagged_count && current_user_can( Flagged::get_capability() )) {
     829                            $link_args = [
     830                                'post_type'   => Registrations::get_post_type(),
     831                                'post_status' => Flagged::get_post_status(),
     832                                'author'      => $author->ID,
     833                            ];
     834                            $flagged_link = add_query_arg( $link_args, 'edit.php' );
     835                        }
     836                        printf(
     837                            /* translators: %s: Count of user's flagged photos possibly linked to listing of their flagged photos. */
     838                            _n( 'Flagged photos: <strong>%s</strong>', 'Flagged photos: <strong>%s</strong>', $flagged_count, 'wporg-photos' ),
     839                            $flagged_link ? sprintf( '<a href="%s">%d</a>', $flagged_link, $flagged_count ) : $flagged_count
     840                        );
     841                    ?></li>
     842                    <li><?php
    826843                        $pending_count = User::count_pending_photos( $author->ID );
    827844                        $link_args = [
Note: See TracChangeset for help on using the changeset viewer.