Changeset 14183
- Timestamp:
- 11/20/2024 09:31:05 PM (7 weeks ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/photo-directory/inc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/photo-directory/inc/admin.php
r14067 r14183 828 828 829 829 // Show number of photos approved on this calendar day. 830 $approved_today_count = User::count_p ublished_photos_for_today();830 $approved_today_count = User::count_photos_for_today( 'publish' ); 831 831 if ( $approved_today_count ) { 832 832 $approved_today_link = add_query_arg( [ -
sites/trunk/wordpress.org/public_html/wp-content/plugins/photo-directory/inc/user.php
r13790 r14183 76 76 77 77 /** 78 * Returns a count of photos published by a user on this calendar day. 79 * 80 * @param int $user_id Optional. The user ID. If not defined, assumes global 81 * author. Default false. 82 * @return int 83 */ 84 public static function count_published_photos_for_today( $user_id = false ) { 78 * Returns a count of photos of a given post status(es) by a user on this calendar day. 79 * 80 * @param string|string[] $post_status Optional. The post status(es) of photos to find. 81 * Default 'publish'. 82 * @param int $user_id Optional. The user ID. If not defined, assumes 83 * global author. Default false. 84 * @return int 85 */ 86 public static function count_photos_for_today( $post_status = 'publish', $user_id = false ) { 85 87 if ( ! $user_id ) { 86 88 global $authordata; … … 99 101 $args = [ 100 102 'post_type' => Registrations::get_post_type(), 101 'post_status' => 'publish',103 'post_status' => $post_status, 102 104 'author' => $user_id, 103 105 'date_query' => [
Note: See TracChangeset
for help on using the changeset viewer.