Changeset 13790
- Timestamp:
- 06/07/2024 05:29:29 AM (22 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/photo-directory/inc/user.php
r13788 r13790 11 11 12 12 /** 13 * Maximum number of pending/concurrent submissions .13 * Maximum number of pending/concurrent submissions. 14 14 * 15 15 * Once this threshold is met, a user will be unable to make another … … 24 24 25 25 /** 26 * The number of published posts before a given user is permitted to toggle 27 * all of the confirmation checkboxes when submitting a photo. 28 * 26 * Maximum number of pending/concurrent submissions for frequent contributors. 27 * 28 * Once this threshold is met, a user will be unable to make another 29 * submission until a current submission is approved or rejected. 30 * 31 * @see `get_concurrent_submission_limit()` for actually retrieving the maximum 32 * pending submissions for a user, since it can vary based on the user and may 33 * be filtered. 29 34 * @var int 30 35 */ 36 37 38 39 40 41 42 43 44 45 46 47 31 48 const TOGGLE_ALL_THRESHOLD = 30; 32 49 50 51 52 33 53 public static function init() { 34 54 } … … 344 364 345 365 /** 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 346 387 * Determines if a user is eligible to toggle all confirmation checkboxes on 347 388 * the photo upload form. … … 362 403 */ 363 404 public static function can_toggle_confirmation_checkboxes( $user_id = false ) { 364 $can = false; 365 366 if ( ! $user_id ) { 367 $user_id = get_current_user_id(); 368 } 369 370 if ( $user_id && self::count_published_photos( $user_id ) >= self::TOGGLE_ALL_THRESHOLD ) { 371 $can = true; 372 } 373 374 return $can; 405 return self::is_frequent_contributor( $user_id ); 375 406 } 376 407 … … 391 422 } 392 423 393 return apply_filters( 'wporg_photos_max_concurrent_submissions', self::MAX_PENDING_SUBMISSIONS, $user_id ); 424 $limit = self::is_frequent_contributor( $user_id ) 425 ? self::MAX_PENDING_SUBMISSIONS_FREQUENT 426 : self::MAX_PENDING_SUBMISSIONS; 427 428 return apply_filters( 'wporg_photos_max_concurrent_submissions', $limit, $user_id ); 394 429 } 395 430
Note: See TracChangeset
for help on using the changeset viewer.