Making WordPress.org

Changeset 13789


Ignore:
Timestamp:
06/07/2024 05:00:51 AM (2 years ago)
Author:
coffee2code
Message:

Photo Directory, Admin: Show number of approved photos for today in author column, if there are any.

File:
1 edited

Legend:

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

    r13787 r13789  
    846846                )
    847847                . "</div>\n";
     848
     849                // Show number of photos approved on this calendar day.
     850                $approved_today_count = User::count_published_photos_for_today();
     851                if ( $approved_today_count ) {
     852                        $approved_today_link = add_query_arg( [
     853                                'post_type'   => Registrations::get_post_type(),
     854                                'post_status' => 'publish',
     855                                'author'      => $authordata->ID,
     856                        ], 'edit.php' );
     857                        $display_name .= '<div class="user-approved-today-count">'
     858                                . sprintf(
     859                                        __( '&#x21AA; (today): %s', 'wporg-photos' ),
     860                                        sprintf( '<strong><a href="%s">%d</a></strong>', $approved_today_link, $approved_today_count )
     861                                )
     862                                . "</div>\n";
     863                }
    848864
    849865                // Show number of pending photos if there are any.
Note: See TracChangeset for help on using the changeset viewer.